0

I have a custom array adapter which has a imageview, 2 textviews an edittext and a checkbox. I need to get the text from my textviews and my edittext then send that data to another activitya textview when the checkbox is checked.

How can I set up a method to check if the edittext is empty as I need the checkbox only to trigger when there is a value in the edittext.

How can I get the data sent through to another activity.

Thanks

1 Answers1

0

Take your EditText variable and call getText() on that variable to check if it is empty.

E.g.

if (myEditText.getText().toString() == "") {
     // trigger checkbox
} 

To pass data from one activity to another you use intents. See here: How do I pass data between Activities in Android application?

Community
  • 1
  • 1
McGuile
  • 818
  • 1
  • 11
  • 29