0
私はAndroidアプリで作業しています。 LinearLayoutに2つのスピナーがあり、他のいくつかのEditTextがあります。上部のSpinnerには、リスト内の各項目のラジオボタンが表示されます。 2番目のスピナーの各行は最初のスピナーよりもはるかに薄いです。ここに私のXMLコードです。2スピナーのリストにラジオボタンが1つありません
<Spinner
android:id="@+id/new_type"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/list_prompt"
android:textColorHint="@android:color/white" />
<Spinner
android:id="@+id/new_course"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/enter_course"
android:textColorHint="@android:color/white" />
ここは私のJavaコードです。すべてのヘルプは非常に感謝を高く評価され2間そんなに差がある理由
Spinner spinner = (Spinner) findViewById(R.id.new_type);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,
R.array.type_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
Spinner cSpinner = (Spinner) findViewById(R.id.new_course);
ArrayAdapter<CharSequence> cAdapter = ArrayAdapter.createFromResource(this,
R.array.course_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
cSpinner.setAdapter(cAdapter);
2つのスピナー
は私が把握カントほとんど同じです。