mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 02:25:50 +01:00
Move the generic user info outside the miband preferences activity. They still have to be renamed.
This commit is contained in:
parent
703cbd1745
commit
94c8633bad
@ -13,6 +13,11 @@ import java.util.List;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandPreferencesActivity;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_USER_GENDER;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_USER_HEIGHT_CM;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_USER_WEIGHT_KG;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_USER_YEAR_OF_BIRTH;
|
||||
|
||||
public class SettingsActivity extends AbstractSettingsActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -127,6 +132,10 @@ public class SettingsActivity extends AbstractSettingsActivity {
|
||||
"canned_reply_14",
|
||||
"canned_reply_15",
|
||||
"canned_reply_16",
|
||||
PREF_USER_YEAR_OF_BIRTH,
|
||||
PREF_USER_GENDER,
|
||||
PREF_USER_HEIGHT_CM,
|
||||
PREF_USER_WEIGHT_KG,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -53,10 +53,6 @@ public class MiBandPreferencesActivity extends AbstractSettingsActivity {
|
||||
protected String[] getPreferenceKeysWithSummary() {
|
||||
return new String[]{
|
||||
PREF_USER_ALIAS,
|
||||
PREF_USER_YEAR_OF_BIRTH,
|
||||
PREF_USER_GENDER,
|
||||
PREF_USER_HEIGHT_CM,
|
||||
PREF_USER_WEIGHT_KG,
|
||||
PREF_MIBAND_WEARSIDE,
|
||||
PREF_MIBAND_ADDRESS,
|
||||
PREF_MIBAND_FITNESS_GOAL,
|
||||
|
@ -102,12 +102,12 @@
|
||||
<string name="discovery_connected_devices_hint">Mach Dein Gerät auffindbar. Derzeit verbundene Geräte sind in der Regel nicht auffindbar.</string>
|
||||
<string name="discovery_note">Tipp:</string>
|
||||
<string name="candidate_item_device_image">Bild des Geräts</string>
|
||||
<string name="miband_prefs_about_you">Über Dich</string>
|
||||
<string name="activity_prefs_about_you">Über Dich</string>
|
||||
<string name="miband_prefs_alias">Name/Alias</string>
|
||||
<string name="miband_prefs_year_birth">Geburtsjahr</string>
|
||||
<string name="miband_prefs_gender">Geschlecht</string>
|
||||
<string name="miband_prefs_height_cm">Größe in cm</string>
|
||||
<string name="miband_prefs_weight_kg">Gewicht in kg</string>
|
||||
<string name="activity_prefs_year_birth">Geburtsjahr</string>
|
||||
<string name="activity_prefs_gender">Geschlecht</string>
|
||||
<string name="activity_prefs_height_cm">Größe in cm</string>
|
||||
<string name="activity_prefs_weight_kg">Gewicht in kg</string>
|
||||
<string name="pref_header_vibration_count">Anzahl der Vibrationen</string>
|
||||
<string name="title_activity_sleepmonitor">Schlafmonitor</string>
|
||||
<string name="pref_write_logfiles">Log-Dateien schreiben (Neustart erforderlich)</string>
|
||||
|
@ -103,12 +103,12 @@
|
||||
<string name="discovery_connected_devices_hint">Haz visible tu dispositivo. No es probable que se detecten los dispositivos que ya están conectados.</string>
|
||||
<string name="discovery_note">Nota:</string>
|
||||
<string name="candidate_item_device_image">Imagen del dispositivo</string>
|
||||
<string name="miband_prefs_about_you">Sobre ti</string>
|
||||
<string name="activity_prefs_about_you">Sobre ti</string>
|
||||
<string name="miband_prefs_alias">Nombre/Apodo</string>
|
||||
<string name="miband_prefs_year_birth">Año de nacimiento</string>
|
||||
<string name="miband_prefs_gender">Sexo</string>
|
||||
<string name="miband_prefs_height_cm">Altura en cm</string>
|
||||
<string name="miband_prefs_weight_kg">Peso en kg</string>
|
||||
<string name="activity_prefs_year_birth">Año de nacimiento</string>
|
||||
<string name="activity_prefs_gender">Sexo</string>
|
||||
<string name="activity_prefs_height_cm">Altura en cm</string>
|
||||
<string name="activity_prefs_weight_kg">Peso en kg</string>
|
||||
<string name="pref_header_vibration_count">Número de vibraciones</string>
|
||||
<string name="title_activity_sleepmonitor">Monitor de sueño</string>
|
||||
<string name="pref_write_logfiles">Guardar logs (requiere reiniciar)</string>
|
||||
|
@ -103,12 +103,12 @@
|
||||
<string name="discovery_connected_devices_hint">Rendez votre appareil découvrable. Les appareils déjà connectés ne seront pas découverts.</string>
|
||||
<string name="discovery_note">Note:</string>
|
||||
<string name="candidate_item_device_image">Image de l\'appareil</string>
|
||||
<string name="miband_prefs_about_you">À propos de vous</string>
|
||||
<string name="activity_prefs_about_you">À propos de vous</string>
|
||||
<string name="miband_prefs_alias">Nom/Pseudo</string>
|
||||
<string name="miband_prefs_year_birth">Année de naissance</string>
|
||||
<string name="miband_prefs_gender">Genre</string>
|
||||
<string name="miband_prefs_height_cm">Taille en cm</string>
|
||||
<string name="miband_prefs_weight_kg">Poids en kg</string>
|
||||
<string name="activity_prefs_year_birth">Année de naissance</string>
|
||||
<string name="activity_prefs_gender">Genre</string>
|
||||
<string name="activity_prefs_height_cm">Taille en cm</string>
|
||||
<string name="activity_prefs_weight_kg">Poids en kg</string>
|
||||
<string name="pref_header_vibration_count">Nombre de vibrations</string>
|
||||
<string name="title_activity_sleepmonitor">Moniteur de sommeil</string>
|
||||
<string name="pref_write_logfiles">Écrire les fichiers journaux (redémarrage requis)</string>
|
||||
|
@ -95,12 +95,12 @@
|
||||
<string name="discovery_connected_devices_hint">Imposta il tuo dispositivo perchè sia rilevabile. I dispositivi attualmente connessi non saranno probabilmente rilevati.</string>
|
||||
<string name="discovery_note">Nota:</string>
|
||||
<string name="candidate_item_device_image">Immagine dispositivo</string>
|
||||
<string name="miband_prefs_about_you">Informazioni sull\'utilizzatore</string>
|
||||
<string name="activity_prefs_about_you">Informazioni sull\'utilizzatore</string>
|
||||
<string name="miband_prefs_alias">Nome / Soprannome</string>
|
||||
<string name="miband_prefs_year_birth">Anno di nascita</string>
|
||||
<string name="miband_prefs_gender">Genere</string>
|
||||
<string name="miband_prefs_height_cm">Altezza in cm</string>
|
||||
<string name="miband_prefs_weight_kg">Peso in kg</string>
|
||||
<string name="activity_prefs_year_birth">Anno di nascita</string>
|
||||
<string name="activity_prefs_gender">Genere</string>
|
||||
<string name="activity_prefs_height_cm">Altezza in cm</string>
|
||||
<string name="activity_prefs_weight_kg">Peso in kg</string>
|
||||
<string name="pref_header_vibration_count">Numero vibrazioni</string>
|
||||
<string name="title_activity_sleepmonitor">Monitoraggio del sonno</string>
|
||||
<string name="pref_write_logfiles">Salva il log su file (richiede riavvio)</string>
|
||||
|
@ -103,12 +103,12 @@
|
||||
<string name="discovery_connected_devices_hint">お使いのデバイスを検出可能にしてください。現在、接続されたデバイスは、おそらく検出されません。</string>
|
||||
<string name="discovery_note">注:</string>
|
||||
<string name="candidate_item_device_image">デバイスイメージ</string>
|
||||
<string name="miband_prefs_about_you">あなたについて</string>
|
||||
<string name="activity_prefs_about_you">あなたについて</string>
|
||||
<string name="miband_prefs_alias">名前/別名</string>
|
||||
<string name="miband_prefs_year_birth">誕生年</string>
|
||||
<string name="miband_prefs_gender">性別</string>
|
||||
<string name="miband_prefs_height_cm">身長(cm)</string>
|
||||
<string name="miband_prefs_weight_kg">体重(kg)</string>
|
||||
<string name="activity_prefs_year_birth">誕生年</string>
|
||||
<string name="activity_prefs_gender">性別</string>
|
||||
<string name="activity_prefs_height_cm">身長(cm)</string>
|
||||
<string name="activity_prefs_weight_kg">体重(kg)</string>
|
||||
<string name="pref_header_vibration_count">バイブレーション回数</string>
|
||||
<string name="title_activity_sleepmonitor">睡眠観測</string>
|
||||
<string name="pref_write_logfiles">ログファイルを出力 (再起動が必要)</string>
|
||||
|
@ -102,12 +102,12 @@
|
||||
<string name="discovery_connected_devices_hint">기기를 발견 가능하도록 설정하세요. 현재 연결된 기기들은 발견될 수 없습니다.</string>
|
||||
<string name="discovery_note">알림: </string>
|
||||
<string name="candidate_item_device_image">기기 이미지</string>
|
||||
<string name="miband_prefs_about_you">당신에 대해</string>
|
||||
<string name="activity_prefs_about_you">당신에 대해</string>
|
||||
<string name="miband_prefs_alias">이름/별명</string>
|
||||
<string name="miband_prefs_year_birth">출생년도</string>
|
||||
<string name="miband_prefs_gender">성별</string>
|
||||
<string name="miband_prefs_height_cm">키 (cm)</string>
|
||||
<string name="miband_prefs_weight_kg">몸무게 (kg)</string>
|
||||
<string name="activity_prefs_year_birth">출생년도</string>
|
||||
<string name="activity_prefs_gender">성별</string>
|
||||
<string name="activity_prefs_height_cm">키 (cm)</string>
|
||||
<string name="activity_prefs_weight_kg">몸무게 (kg)</string>
|
||||
<string name="pref_header_vibration_count">진동 횟수</string>
|
||||
<string name="title_activity_sleepmonitor">수면 측정계</string>
|
||||
<string name="pref_write_logfiles">기록 파일 작성 (재시작 필요)</string>
|
||||
|
@ -102,12 +102,12 @@
|
||||
<string name="discovery_connected_devices_hint">Uwidocznij swoje urządzenie. Aktualnie połączone urządzenia prawdopodobnie nie będą znalezione.</string>
|
||||
<string name="discovery_note">Uwaga</string>
|
||||
<string name="candidate_item_device_image">Obraz urządzenia</string>
|
||||
<string name="miband_prefs_about_you">O tobie</string>
|
||||
<string name="activity_prefs_about_you">O tobie</string>
|
||||
<string name="miband_prefs_alias">Nazwisko/Pseudonim</string>
|
||||
<string name="miband_prefs_year_birth">Data urodzenia</string>
|
||||
<string name="miband_prefs_gender">Płeć</string>
|
||||
<string name="miband_prefs_height_cm">Wzrost w cm</string>
|
||||
<string name="miband_prefs_weight_kg">Waga w kg</string>
|
||||
<string name="activity_prefs_year_birth">Data urodzenia</string>
|
||||
<string name="activity_prefs_gender">Płeć</string>
|
||||
<string name="activity_prefs_height_cm">Wzrost w cm</string>
|
||||
<string name="activity_prefs_weight_kg">Waga w kg</string>
|
||||
<string name="pref_header_vibration_count">Liczba wibracji</string>
|
||||
<string name="title_activity_sleepmonitor">Monitor snu</string>
|
||||
<string name="pref_write_logfiles">Zapisuj logi (wymaga restartu)</string>
|
||||
|
@ -103,12 +103,12 @@
|
||||
<string name="discovery_connected_devices_hint">Подключённые в настоящее время устройства, скорее всего, не будут обнаружены.</string>
|
||||
<string name="discovery_note">Заметка:</string>
|
||||
<string name="candidate_item_device_image">Изображение устройства</string>
|
||||
<string name="miband_prefs_about_you">Ваши данные</string>
|
||||
<string name="activity_prefs_about_you">Ваши данные</string>
|
||||
<string name="miband_prefs_alias">Имя/псевдоним</string>
|
||||
<string name="miband_prefs_year_birth">Год рождения</string>
|
||||
<string name="miband_prefs_gender">Пол</string>
|
||||
<string name="miband_prefs_height_cm">Рост в см</string>
|
||||
<string name="miband_prefs_weight_kg">Вес в кг</string>
|
||||
<string name="activity_prefs_year_birth">Год рождения</string>
|
||||
<string name="activity_prefs_gender">Пол</string>
|
||||
<string name="activity_prefs_height_cm">Рост в см</string>
|
||||
<string name="activity_prefs_weight_kg">Вес в кг</string>
|
||||
<string name="pref_header_vibration_count">Количество вибраций</string>
|
||||
<string name="title_activity_sleepmonitor">Анализ сна</string>
|
||||
<string name="pref_write_logfiles">Записывать файлы журнала (нужен перезапуск)</string>
|
||||
|
@ -93,12 +93,12 @@
|
||||
<string name="discovery_connected_devices_hint">Cihazınızı keşfedilebilir yapın. Bağlı durumdaki cihazlar tekrar keşfedilmeyebilir.</string>
|
||||
<string name="discovery_note">Not:</string>
|
||||
<string name="candidate_item_device_image">Cihaz resmi</string>
|
||||
<string name="miband_prefs_about_you">Hakkınızda</string>
|
||||
<string name="activity_prefs_about_you">Hakkınızda</string>
|
||||
<string name="miband_prefs_alias">İsim</string>
|
||||
<string name="miband_prefs_year_birth">Doğum yılı</string>
|
||||
<string name="miband_prefs_gender">Cinsiyet</string>
|
||||
<string name="miband_prefs_height_cm">Boy(cm)</string>
|
||||
<string name="miband_prefs_weight_kg">Ağırlık (kg)</string>
|
||||
<string name="activity_prefs_year_birth">Doğum yılı</string>
|
||||
<string name="activity_prefs_gender">Cinsiyet</string>
|
||||
<string name="activity_prefs_height_cm">Boy(cm)</string>
|
||||
<string name="activity_prefs_weight_kg">Ağırlık (kg)</string>
|
||||
<string name="pref_header_vibration_count">Titreşim adedi</string>
|
||||
|
||||
<string name="title_activity_sleepmonitor">Uyku Monitörü</string>
|
||||
|
@ -101,12 +101,12 @@
|
||||
<string name="discovery_connected_devices_hint">Під\'єднані на даний момент пристрої, скоріш за все не будуть виявлені.</string>
|
||||
<string name="discovery_note">Замітка:</string>
|
||||
<string name="candidate_item_device_image">Зображення пристрою</string>
|
||||
<string name="miband_prefs_about_you">Ваші дані</string>
|
||||
<string name="activity_prefs_about_you">Ваші дані</string>
|
||||
<string name="miband_prefs_alias">Ім\'я/нік</string>
|
||||
<string name="miband_prefs_year_birth">Рік народження</string>
|
||||
<string name="miband_prefs_gender">Стать</string>
|
||||
<string name="miband_prefs_height_cm">Зріст в см</string>
|
||||
<string name="miband_prefs_weight_kg">Вага в кг</string>
|
||||
<string name="activity_prefs_year_birth">Рік народження</string>
|
||||
<string name="activity_prefs_gender">Стать</string>
|
||||
<string name="activity_prefs_height_cm">Зріст в см</string>
|
||||
<string name="activity_prefs_weight_kg">Вага в кг</string>
|
||||
<string name="pref_header_vibration_count">Кількість вібрацій</string>
|
||||
<string name="title_activity_sleepmonitor">Аналіз сну</string>
|
||||
<string name="pref_write_logfiles">Записувати файли звіту (потрібен перезапуск)</string>
|
||||
|
@ -81,12 +81,12 @@
|
||||
<string name="appinstaller_install">Cài đặt</string>
|
||||
<string name="discovery_note">Ghi chú:</string>
|
||||
<string name="candidate_item_device_image">Ảnh thiết bị</string>
|
||||
<string name="miband_prefs_about_you">Thông tin về bạn</string>
|
||||
<string name="activity_prefs_about_you">Thông tin về bạn</string>
|
||||
<string name="miband_prefs_alias">Tên/Bí danh</string>
|
||||
<string name="miband_prefs_year_birth">Năm sinh</string>
|
||||
<string name="miband_prefs_gender">Giới tính</string>
|
||||
<string name="miband_prefs_height_cm">Chiều cao bằng cm</string>
|
||||
<string name="miband_prefs_weight_kg">Trọng lượng bằng kg</string>
|
||||
<string name="activity_prefs_year_birth">Năm sinh</string>
|
||||
<string name="activity_prefs_gender">Giới tính</string>
|
||||
<string name="activity_prefs_height_cm">Chiều cao bằng cm</string>
|
||||
<string name="activity_prefs_weight_kg">Trọng lượng bằng kg</string>
|
||||
<string name="title_activity_sleepmonitor">Trình giám sát giấc ngủ</string>
|
||||
<string name="pref_write_logfiles">Ghi tập tin nhật ký (cần khởi động lại)</string>
|
||||
<string name="initializing">đang khởi chạy</string>
|
||||
|
@ -117,12 +117,7 @@
|
||||
<string name="discovery_connected_devices_hint">Make your device discoverable. Currently connected devices will likely not be discovered.</string>
|
||||
<string name="discovery_note">Note:</string>
|
||||
<string name="candidate_item_device_image">Device Image</string>
|
||||
<string name="miband_prefs_about_you">About You</string>
|
||||
<string name="miband_prefs_alias">Name/Alias</string>
|
||||
<string name="miband_prefs_year_birth">Year of Birth</string>
|
||||
<string name="miband_prefs_gender">Gender</string>
|
||||
<string name="miband_prefs_height_cm">Height in cm</string>
|
||||
<string name="miband_prefs_weight_kg">Weight in kg</string>
|
||||
<string name="pref_header_vibration_count">Vibration Count</string>
|
||||
|
||||
<string name="title_activity_sleepmonitor">Sleep Monitor</string>
|
||||
@ -218,4 +213,11 @@
|
||||
<string name="miband_prefs_reserve_alarm_calendar">Alarms to reserve for upcoming events</string>
|
||||
<string name="waiting_for_reconnect">waiting for reconnect</string>
|
||||
<string name="appmananger_app_reinstall">Reinstall</string>
|
||||
|
||||
<string name="activity_prefs_about_you">About You</string>
|
||||
<string name="activity_prefs_year_birth">Year of Birth</string>
|
||||
<string name="activity_prefs_gender">Gender</string>
|
||||
<string name="activity_prefs_height_cm">Height in cm</string>
|
||||
<string name="activity_prefs_weight_kg">Weight in kg</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,39 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--TODO: this is actually "about your miband" and possibly refers to a single device (if the owner has multiple mibands, it may be that they are worn on different arms -->
|
||||
<PreferenceCategory
|
||||
android:key="pref_category_miband_personal"
|
||||
android:title="@string/miband_prefs_about_you">
|
||||
android:title="@string/activity_prefs_about_you">
|
||||
<EditTextPreference
|
||||
android:key="mi_user_alias"
|
||||
android:maxLength="17"
|
||||
android:title="@string/miband_prefs_alias" />
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_year_of_birth"
|
||||
android:maxLength="4"
|
||||
android:title="@string/miband_prefs_year_birth" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="male"
|
||||
android:entries="@array/gender"
|
||||
android:entryValues="@array/gender_values"
|
||||
android:key="mi_user_gender"
|
||||
android:title="@string/miband_prefs_gender" />
|
||||
|
||||
<!--TODO: support localized heights and weights -->
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_height_cm"
|
||||
android:maxLength="3"
|
||||
android:title="@string/miband_prefs_height_cm" />
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_weight_kg"
|
||||
android:maxLength="3"
|
||||
android:title="@string/miband_prefs_weight_kg" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="left"
|
||||
android:entries="@array/wearside"
|
||||
|
@ -124,6 +124,37 @@
|
||||
</PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="pref_category_activity_personal"
|
||||
android:title="@string/activity_prefs_about_you">
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_year_of_birth"
|
||||
android:maxLength="4"
|
||||
android:title="@string/activity_prefs_year_birth" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="male"
|
||||
android:entries="@array/gender"
|
||||
android:entryValues="@array/gender_values"
|
||||
android:key="mi_user_gender"
|
||||
android:title="@string/activity_prefs_gender" />
|
||||
|
||||
<!--TODO: support localized heights and weights -->
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_height_cm"
|
||||
android:maxLength="3"
|
||||
android:title="@string/activity_prefs_height_cm" />
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="mi_user_weight_kg"
|
||||
android:maxLength="3"
|
||||
android:title="@string/activity_prefs_weight_kg" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="pref_key_device_specific_category"
|
||||
android:title="@string/preferences_category_device_specific_settings">
|
||||
|
Loading…
Reference in New Issue
Block a user