android - Changing layout through user input -


im new app development.

i want add button on screen when clicked give user textedit in can enter data. can give brief description how done?

i'm not going write code scratch can give few pointers should help. can create new edittext like

public void onclick(view v) {      edittext et = new edittext(v.getcontext());      // add layout params, text, etc...  } 

then need add viewgroup such linearlayout in inflated layout viewgroupname.addview(et);

however, simpler way, if works you, have edittext defined in xml , set visibility either invisible or gone set visibility in onclick() visible.

hopefully enough started. if have questions feel free ask.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -