Teo
Teo

Reputation: 3213

How to change size of text in application settings?

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

Upvotes: 1

Views: 1684

Answers (5)

Rikin Thakkar
Rikin Thakkar

Reputation: 1278

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.

Upvotes: 0

MAC
MAC

Reputation: 15847

You can add spinner with list of fontsize

like

12
14
16
18

and in onItemSelect() set fontSize(x);

Upvotes: 0

Jigar Pandya
Jigar Pandya

Reputation: 5987

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,

Upvotes: 0

Grt
Grt

Reputation: 141

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

Upvotes: 1

Padma Kumar
Padma Kumar

Reputation: 20041

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);

Upvotes: 0

Related Questions