Dynamiclly Add A Textview Using Existing Textview Layout Parameters
I am trying to add a TextView from the activity when a button has been pressed. I have found how to add a new textview from the activity, however instead of coding the required lay
Solution 1:
You can do One thing.
If you are trying to set just the Value of the Same TextValue every time and if the Layout properties of that TextView is same at all the time then follow below steps:
First Create the One Layout that only contain he TextView layout only with your appropriate properties. (Let name it as layout_textView.xml)
Now, do add that layout_textView.xml dynamically to your main view as per your requirement.
How it will Solve your issue.
If any query then let me know.
Solution 2:
Did you call requestLayout() after adding the textview?
Post a Comment for "Dynamiclly Add A Textview Using Existing Textview Layout Parameters"