Fix Wi-Fi "Network usage" and "Privacy" drop down

Currently, these are implemented with DropDownPreference, which keeps
disappearing after opening. This is because this page is special, many
other preferences on this page auto refreshed every some seconds,
causing the container RecyclerView to re-render (and a scrollbar is
displayed when re-render happens). This re-renders cause the drop downs
to auto dismiss.

Use ListPreference instead can solve this issue, because
DropDownPreference is extended from ListPreference, this is simple
change.

Fix: 209799515
Test: manual
Change-Id: Ib098922c39d9d6c56d645f12f5884489ea6688be
This commit is contained in:
Chaohui Wang
2022-04-30 13:05:41 +08:00
parent af5a015198
commit e0ff6f8dd6
3 changed files with 19 additions and 20 deletions

View File

@@ -58,14 +58,14 @@
android:title="@string/wifi_security"
android:selectable="false"/>
<DropDownPreference
<ListPreference
android:key="metered"
android:icon="@drawable/ic_attach_money_black_24dp"
android:title="@string/wifi_metered_title"
android:entries="@array/wifi_metered_entries"
android:entryValues="@array/wifi_metered_values"/>
<DropDownPreference
<ListPreference
android:key="privacy"
android:icon="@drawable/ic_wifi_privacy_24dp"
android:title="@string/wifi_privacy_settings"