I have two Textview and two buttons.
TextView TV1,TV2;
Button YES,NO;
Now
TV1.setText("1 2 3 4 5");
TV2.setText("3 4 5 6 7");
And
YES.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//here i want to show common number that is (3,4,5)
}
});
NO.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//here i want to show number no matched in both Textview
}
});
Now my question is that when i click on yes it show for (3,4,5 because common) FOR TV1 and when i click on no it show (1,2,6,7) TV1.
I can do it by set text but what if i have more numbers.