I am trying to set TextView width dynamically, Using setWidth(width)
method.
txtviewOne.setWidth(10);
txtviewTwo.setWidth(10);
But not success.
Please help me How can I set width of textview dynamically.
TextView tv;
----------------------
tv=new TextView(this); // or tv=new TextView(R.id.textview1);
LinearLayout.LayoutParams Params1 = new LinearLayout.LayoutParams(15,50);
tv.setLayoutParams(Params1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With