I'm new to this but I have some understanding. Currently I have an app that consists of lots of TextViews with a specific size , however i want to be able to implement a Button able change the TextView size of a TextView or all TextViews. Can I have some help please with this with examples of codes (I prefer java) Thank You!
Asked
Active
Viewed 87 times
0
-
3what you have tried so far? – Shayan Pourvatan Jan 07 '14 at 20:14
-
Welcome to SO! Asking for code without at least showing what you have tried so far to solve your problem such as your code example, links to other answers that are similar, or other such evidence of research effort on your part is unacceptable. Please at least post what you have so far. [Please see the help section about how to ask questions properly](http://stackoverflow.com/help) – codeMagic Jan 07 '14 at 20:36
-
http://stackoverflow.com/questions/15524221/change-the-font-size-of-an-textview-element-in-android – ninge Jan 08 '14 at 03:01
1 Answers
0
On click of button you can change layout params of the textview you want to resize as following:
TextView tv=<find>
LayoutParams lp = (LayoutParams) tv.getLayoutParams();
lp2.height = 100;
tv.setLayoutParams(lp);
tv.requestLayout();

vipul mittal
- 17,343
- 3
- 41
- 44