Answer the question
In order to leave comments, you need to log in
How to implement my cneckbox android selection algorithm?
In my program I have a RadioGroup of three buttons: red, green and blue. I have this listener code:
RadioGroup radGrp = findViewById(R.id.radios);
radGrp.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() //слушатель для выбора цвета светодиода
{
@Override
public void onCheckedChanged(RadioGroup arg0, int id) {
byte k;
String color = null;
switch (id) {
case R.id.red:
color = "КРАСНЫЙ.";
k = 'R';
myThreadConnected.write2((byte) 'R');
break;
case R.id.green:
color = "ЗЕЛЕНЫЙ.";
k = 'G';
myThreadConnected.write2((byte) 'G');
break;
case R.id.blue:
color = "СИНИЙ.";
k = 'B';
myThreadConnected.write2((byte) 'B');
break;
default:
break;
}
selection.setText(getString(R.string.color, color));
}
});
Answer the question
In order to leave comments, you need to log in
Found!
In the play market, you need to search for "SMS Gateway", a bunch of applications will come out.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question