Android Forum » Android Developer Forum » Android Developer Forum (general) » How to Creat a dynamic button ???
created on May 1, 2012 12:25:55 PM
— modified on May 1, 2012 12:28:05 PM
I have a idea,
there are 2 editText (Enter weight and hight of button) and one button with name "Creat Button". When I click "Creat Button", program automatic creat a new button with weight and hight to EditText. Change value to EditText, click "CreatButton", => size of button change! Done!
Sorry, I come from VietNam, my English not good. Thanks all!
created on May 1, 2012 12:59:06 PM
help me ! Please
created on May 1, 2012 9:40:53 PM
This should not be too hard to do. What part are you having trouble with?
created on Feb 4, 2013 1:33:32 PM
Button b = new Button(Context);
that's your button created on click.
now store the value of which you want to change and apply it to height and width of button.
if you want to like as change in edittext the size will change than i think ontextchangelistener will help you
still prob let me know