私は物事のUI側を学ぼうとしているAndroidの初心者であり、頭を悩ませています.これが私が今持っているものです:
breedes_listing.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<ListView android:id="@+id/breedsListView"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:dividerHeight="0px" android:divider="#00000000"></ListView>
</LinearLayout>
breeds_listing_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/list_item_background"
android:orientation="horizontal" >
<TextView android:id="@+id/allbreeds_single_item"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:gravity="center_horizontal"></TextView>
</LinearLayout>
list_item_background.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#043402" />
<stroke android:width="3dp" color="#ffff8080" />
<corners android:radius="8dp" />
<padding android:left="10dp" android:top="10dp" android:right="10dp"
android:bottom="10dp" />
</shape>
私が理解するのに苦労しているのは、選択したアイテムをどのようにスタイルするかです? 現時点では、選択されたアイテムの背景は恐ろしいオレンジ色で、丸みを帯びた緑色の長方形の下にオレンジ色のアウトライン効果があります。私はベスト プラクティスに沿って物事を行っていないと確信しているので、提案や改善は大歓迎です。
どうもありがとう、D.