In my application I want to provide an option to the give to user to choose the size of text, Is it possible??
And how can I do it?? Any suggestions??
Thanks in advance
In my application I want to provide an option to the give to user to choose the size of text, Is it possible??
And how can I do it?? Any suggestions??
Thanks in advance
Yes, why not? You can save an int entered by the user and set the size of the textview programmatically to this int.
if user select small A then change it to font 16sp if user select big A then change font size to 21sp.
if(small)
textView.setTextSize(16);
you can allow user to select from font list view and to create list view of font selection you can check Change font size in ListView - Android/Eclipse for details.
More on that you can http://mobile.tutsplus.com/tutorials/android/customize-android-fonts/ for details.
Thanks,
You can add spinner with list of fontsize
like
12
14
16
18
and in onItemSelect()
set fontSize(x);
its possible.
refer this link or even you can use input type for getting value from user then create a function with parameter "size" and change css "font-size" using this function.