how to add button dynamically in android?
+3
A:
Button btn = new Button(this);
btn.setText("MyButton");
layout.addView(btn);
Have a look to this example: http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/ScrollView2.html
nico
2009-12-05 10:36:48
thnxs for ur help.Its working
deepthi
2010-02-16 10:56:50