1

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

Teo
  • 3,143
  • 2
  • 29
  • 59
  • May be on first screen of your app can be a screen where user selects the text size may be a single choice list. And this size you can save in as your Application Data or may be preferences and use throughout your application. – Abhilasha Jul 23 '12 at 11:33
  • See my answer here http://stackoverflow.com/a/12591991/746347 – mixel Sep 25 '12 at 22:30

5 Answers5

1

Yes, why not? You can save an int entered by the user and set the size of the textview programmatically to this int.

Grt
  • 141
  • 1
  • 2
  • 11
  • yes, but so, i must `setTextSize()` for each textView, editText, etc.. and then i must take in the code the item that i create in xml.. it's right? – Teo Jul 23 '12 at 11:47
  • Yes, i don't belive there's a possibility to set the text size "global" but i'm not sure. – Grt Jul 23 '12 at 12:09
0

A

A

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);
Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
0

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,

Community
  • 1
  • 1
Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45
0

You can add spinner with list of fontsize

like

12
14
16
18

and in onItemSelect() set fontSize(x);

MAC
  • 15,799
  • 8
  • 54
  • 95
0

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.

Rikin Thakkar
  • 1,268
  • 3
  • 13
  • 27