-2
I Gebrauchsklasse RadioButtonCenter beiRadiogroup nicht korrekt angezeigt werden
Es funktionierte gut in unter API 24. Aber in API 24: Es ist nicht korrekt angezeigt haben.
wenn ich Tab neu klicke. Tab alt immer aktiv. Wenn ich zum Aktivitätsunterschied und zurück will. Es wird korrekt angezeigt.
Ich habe das Problem nicht gefunden. Bitte. Hilf mir!
Dies ist xml
<RadioGroup
android:id="@+id/bottom_navigation_on_main"
android:layout_width="match_parent"
android:layout_height="@dimen/item_height"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:weightSum="4">
<RadioButtonCenter
android:id="@+id/tab_home"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/selector_tab_main"
android:button="@null"
android:clickable="true"
android:gravity="center"
app:radioDrawable="@drawable/selector_tab_home" />
<RadioButtonCenter
android:id="@+id/tab_search"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:button="@null"
android:clickable="true"
android:background="@drawable/selector_tab_main"
android:gravity="center"
app:radioDrawable="@drawable/selector_tab_search" />
</RadioGroup>
Dieser Selektor
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_home_on" android:state_checked="true"
/>
<item android:drawable="@drawable/ic_home_on" android:state_activated="true"
/>
<item android:drawable="@drawable/ic_home_off" />
</selector>
Sie Frage ist nicht klar und prägnant fügen Sie bitte weitere Details und erarbeiten und teilen, was Sie versucht haben. –
Ich aktualisiere meine Frage –