0

How do i on checkboxselected , show a toast that has data from database?

Thank you.

1
  • 1
    You take a ListView which contains a checkbox, register a listener and display the toast with the given data... could you at least show how far you got? Ask a specific question please.... Commented Aug 20, 2010 at 8:33

1 Answer 1

1

Although the question is not quite specific this could help (assuming that your checkbox is called CheckBox01 and the statement Checkbox myCheckBox; is somewhere above)

myCheckBox = (CheckBox) findViewById(R.id.CheckBox01);
myCheckBox.setOnClickListener(new View.OnClickListener() {
    @Override
        public void onClick(View v) {
        if (myCheckBox.isChecked()) Toast.makeText(getApplicationContext(), "Replace this with data from database string", Toast.LENGTH_LONG).show();
    }
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.