Android: Dynamically adding textviews to a scrollview -


i working on application functions text messaging app. working on layout of app now. in xml file have edit text on top of screen , 1 on bottom of screen. want dynamically create scrollview between 2 edit texts. scroll view enable scroll through multiple messages of app. when try create scrollview , textview dynamically replaces edittexts , disappear.

so question how go preventing edittexts disappearing , adding scrollview in between 2 edit texts ?

my code this:

   scrollview sv = new scrollview(this);    linearlayout ll = new linearlayout(this);    ll.setorientation(linearlayout.vertical);    sv.addview(ll);      textview tv = new textview(this);     tv.settext("dynamic layouts ftw!");     ll.addview(tv);     this.setcontentview(sv); 

what asking build listview. listview'ss have every function require , more. further, adapters, pretty quick. here decent turorial on using listviews.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -