button_sbm.setOnClickListener( new View.OnClickListener(){ @Override publicvoidonClick(View v){ int selected_id = radio_g.getCheckedRadioButtonId(); radio_b =(RadioButton)findViewById(selected_id); Toast.makeText(MainActivity.this, radio_b.getText().toString(),Toast.LENGTH_SHORT).show(); } } ); }
@Override publicbooleanonCreateOptionsMenu(Menu menu){ // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); returntrue; }
@Override publicbooleanonOptionsItemSelected(MenuItem item){ // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId();
java - How to manage layout with Radio Button in Android Android RadioButton Control - Searches related to Radio Button in android radio button in android Searches related to radiobutton android radiogroup android checkbox android radiobutton android style radiobutton android selected android radiobutton group android radiobutton onclick radio button android listener radio button android java listview with RadioButton in android example listview with RadioButton in android dynamic RadioButton in android RadioButton in android eclipse RadioButton in android programmatically toggle button in android android RadioButton size
0 comments:
Post a Comment