配列アダプターを使用して listView を作成しています。これは私のコードです。
listView = new ListView(context);
ArrayAdapter<String>adapter = new ArrayAdapter<String>(context,android.R.layout.simple_list_item_single_choice, choice);
listView.setAdapter(adapter);
これにより、テキストに黒色が提供されます。テキストの色を青色に変更する必要があります。どうすればこれを変更できますか。私は配列アダプタで私のレイアウトを使用しました。これがコードです
listView = new ListView(context);
ArrayAdapter<String>adapter = new ArrayAdapter<String>(context,layout.my_single_choice, choice);
listView.setAdapter(adapter);
my_single_choice.xml のコードを以下に示します
<?xml version="1.0" encoding="utf-8"?>
<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:id="@+id/my_choice_radio"
android:layout_height="match_parent"
android:button="@null"
android:drawableRight="@android:drawable/btn_radio"
android:text="Option"
style="@style/ListItemTextColor" />
これは機能しません。すべてのラジオボタンを選択できます。そして、clickListenerが機能していないときは...? どうすれば解決できますか