誰かがこのコードで私を助けてくれれば幸いです:
1- ユーザー用の 3 つのアクティビティ English.class、France.class、Italian.class 用に 3 つの RadioButton があります アプリの起動時に既定の言語を選択します。誰かがそれを実装する方法を手伝ってもらえますか..?
public class Settings extends Activity {
private RadioGroup radioLaGroup;
private RadioButton radioLaButton;
private CheckBox chk_clear;
private Button btnDisplay;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.settings);
addListenerOnButton();
addListenerClear();
}
public void addListenerOnButton() {
radioLaGroup = (RadioGroup) findViewById(R.id.radioLa);
btnDisplay = (Button) findViewById(R.id.btnDisplay);
btnDisplay.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// get selected radio button from radioGroup
int selectedId = radioLaGroup.getCheckedRadioButtonId();
// find the radiobutton by returned id
radioLaButton = (RadioButton) findViewById(selectedId);
}
});
}
}
前もって感謝します.....