Add Button to Activity
package app.Test; import android.app.Activity; import android.os.Bundle; import android.widget.Button; public class appTest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button bn = new Button(this); bn.setText("jdf"); setContentView(bn); } }