mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 01:21:56 +01:00
Amazfit TRex: add missing menu items, remove non-existent
This commit is contained in:
parent
85da3594fc
commit
aa6e2a291a
@ -21,8 +21,11 @@ import android.net.Uri;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfittrex.AmazfitTRexFWHelper;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbips.AmazfitBipSSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgts.AmazfitGTSSupport;
|
||||
|
||||
public class AmazfitTRexSupport extends AmazfitGTSSupport {
|
||||
@ -32,4 +35,10 @@ public class AmazfitTRexSupport extends AmazfitGTSSupport {
|
||||
return new AmazfitTRexFWHelper(uri, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AmazfitTRexSupport setDisplayItems(TransactionBuilder builder) {
|
||||
setDisplayItemsNew(builder, false, R.array.pref_trex_display_items_default);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -631,6 +631,57 @@
|
||||
<item>@string/p_menuitem_settings</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_trex_display_items">
|
||||
<item>@string/menuitem_status</item>
|
||||
<item>@string/menuitem_pai</item>
|
||||
<item>@string/menuitem_hr</item>
|
||||
<item>@string/menuitem_workout</item>
|
||||
<item>@string/menuitem_activity</item>
|
||||
<item>@string/menuitem_weather</item>
|
||||
<item>@string/menuitem_music</item>
|
||||
<item>@string/menuitem_alarm</item>
|
||||
<item>@string/menuitem_eventreminder</item>
|
||||
<item>@string/menuitem_stopwatch</item>
|
||||
<item>@string/menuitem_timer</item>
|
||||
<item>@string/menuitem_findphone</item>
|
||||
<item>@string/menuitem_compass</item>
|
||||
<item>@string/menuitem_settings</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_trex_display_items_values">
|
||||
<item>@string/p_menuitem_status</item>
|
||||
<item>@string/p_menuitem_pai</item>
|
||||
<item>@string/p_menuitem_hr</item>
|
||||
<item>@string/p_menuitem_workout</item>
|
||||
<item>@string/p_menuitem_activity</item>
|
||||
<item>@string/p_menuitem_weather</item>
|
||||
<item>@string/p_menuitem_music</item>
|
||||
<item>@string/p_menuitem_alarm</item>
|
||||
<item>@string/p_menuitem_eventreminder</item>
|
||||
<item>@string/p_menuitem_stopwatch</item>
|
||||
<item>@string/p_menuitem_timer</item>
|
||||
<item>@string/p_menuitem_findphone</item>
|
||||
<item>@string/p_menuitem_compass</item>
|
||||
<item>@string/p_menuitem_settings</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_trex_display_items_default">
|
||||
<item>@string/p_menuitem_status</item>
|
||||
<item>@string/p_menuitem_pai</item>
|
||||
<item>@string/p_menuitem_hr</item>
|
||||
<item>@string/p_menuitem_workout</item>
|
||||
<item>@string/p_menuitem_activity</item>
|
||||
<item>@string/p_menuitem_weather</item>
|
||||
<item>@string/p_menuitem_music</item>
|
||||
<item>@string/p_menuitem_alarm</item>
|
||||
<item>@string/p_menuitem_eventreminder</item>
|
||||
<item>@string/p_menuitem_stopwatch</item>
|
||||
<item>@string/p_menuitem_timer</item>
|
||||
<item>@string/p_menuitem_findphone</item>
|
||||
<item>@string/p_menuitem_compass</item>
|
||||
<item>@string/p_menuitem_settings</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_bips_display_items">
|
||||
<item>@string/menuitem_status</item>
|
||||
<item>@string/menuitem_hr</item>
|
||||
|
21
app/src/main/res/xml/devicesettings_amazfittrex.xml
Normal file
21
app/src/main/res/xml/devicesettings_amazfittrex.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<com.mobeta.android.dslv.DragSortListPreference
|
||||
android:icon="@drawable/ic_widgets"
|
||||
android:defaultValue="@array/pref_trex_display_items_default"
|
||||
android:dialogTitle="@string/mi2_prefs_display_items"
|
||||
android:entries="@array/pref_trex_display_items"
|
||||
android:entryValues="@array/pref_trex_display_items_values"
|
||||
android:key="display_items_sortable"
|
||||
android:persistent="true"
|
||||
android:summary="@string/mi2_prefs_display_items_summary"
|
||||
android:title="@string/mi2_prefs_display_items" />
|
||||
<ListPreference
|
||||
android:icon="@drawable/ic_language"
|
||||
android:defaultValue="auto"
|
||||
android:entries="@array/pref_amazfitbip_language"
|
||||
android:entryValues="@array/pref_amazfitbip_language_values"
|
||||
android:key="language"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_title_language" />
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user