android - CheckBox is checked send item to defferent activity -


In my application, when the checkbox is checked, then in the list list, Want to go Please help me or give me some hints on how to do this. I appreciate any help.

  Enhances the investigation of the public class {checkbox check; Textview TVITIM; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); Check = (Checkbox) FindById (R.id.checkBox1); TvItem = (TextView) findViewById (R.id.tvItem); Check.setOnCheckedChangeListener (New Compound Button On Checked Change Listener) {@Override Changed checked at Public Zero (compound button button view, boolean is checked) {If (checked) {} ​​else {}}}); }}  

What more code do I put in?

Actually, you need to set an onClickedListener for the checkbox, and a list view list Start the activity that passes enough information to start new activity. You may need to toggle the status of the checkbox, just for this, I have included the code for it, if something looks wrong then delete it.

  checkbox.setOnClickListener (New OnClickListener () {@Override Click Zero (see V) {checkbox.toggle (); // If the check box is correctly toggled, Then remove Intent intent = new Intent (MainActivity.This, OtherActivity.class); intent.putExtra ("data", someData); startActivity intent);}}  

examine any other purpose , Like this:

  @Override Create a public void form (bundle saved instenstate) {super.onCreate (INTENT intent = getIntent;); String Message = intent.getStringExtra (MainActivity.EXTRA_MESSAGE) ; // magic is here.}  

more Receive messages for more In detail, read this article very carefully.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -