Tag Archives: onclick

27,896 views

Create RadioButton RadioGroup dynamically – Android sample

public class MainActivity extends Activity implements OnClickListener {   @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);   LinearLayout layout = (LinearLayout) findViewById(R.id.layout); RadioGroup radioGroup = new RadioGroup(this);   LinearLayout.LayoutParams p = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT ); layout.addView(radioGroup, p);   … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on Create RadioButton RadioGroup dynamically – Android sample