I have a String which should shows my value out of a total value, Like 2/5 ,But what i want to do is show it as 2 or the number before the "/" is of a comparatively larger size then the number after the "/" . This is what i have tried so far, and it has no effect.
SpannableString ss1= new SpannableString(String.valueOf(connectedDevices + "/" + totalDevices));
ss1.setSpan(new RelativeSizeSpan(2f), 0,1, 0); // set size
mData.get(0).setCurrentCount(String.valueOf(ss1) );
notifyDataSetChanged();
I want the size of connectedDevices to be N (e.g. N=3) times of the size of totalDevices. How can I format this string?
The difference from the link this question is marked as duplicate is that I am storing this text in a string or in any variable and then using it later on through the adapter of a recyclerview.