Merge pull request #5452 from rokuz/simp-traffic-settings-android

[Android] Added simplified colors to settings
This commit is contained in:
Aleksandr Zatsepin 2017-02-20 18:09:24 +03:00 committed by GitHub
commit cc8deb008f
36 changed files with 93 additions and 4 deletions

View file

@ -333,6 +333,7 @@
<!-- Settings «Map» category: «Record track» title -->
<string name="pref_track_record_title">Недавний путь</string>
<string name="pref_map_auto_zoom">Автозум</string>
<string name="pref_traffic_simplified_colors_title">Простая цветовая схема для пробок</string>
<string name="duration_disabled">Выключено</string>
<string name="duration_1_hour">1 час</string>
<string name="duration_2_hours">2 часа</string>

View file

@ -51,6 +51,7 @@
<string name="pref_auto_zoom" translatable="false">AutoZoom</string>
<string name="pref_large_fonts_size" translatable="false">LargeFontSize</string>
<string name="pref_use_mobile_data" translatable="false">UseMobileData</string>
<string name="pref_traffic_simplified_colors" translatable="false">TrafficSimplifiedColors</string>
<string name="notification_ticker_ltr" translatable="false">%1$s: %2$s</string>
<string name="notification_ticker_rtl" translatable="false">%2$s :%1$s</string>

View file

@ -335,6 +335,7 @@
<!-- Settings «Map» category: «Record track» title -->
<string name="pref_track_record_title">Recent track</string>
<string name="pref_map_auto_zoom">Auto zoom</string>
<string name="pref_traffic_simplified_colors_title">Simplified colour scheme for traffic</string>
<string name="duration_disabled">Off</string>
<string name="duration_1_hour">1 hour</string>
<string name="duration_2_hours">2 hours</string>

View file

@ -19,8 +19,14 @@
android:switchTextOff=""/>
<SwitchPreference
android:key="@string/pref_auto_zoom"
android:title="@string/pref_map_auto_zoom"
android:switchTextOn=""
android:switchTextOff=""/>
android:key="@string/pref_auto_zoom"
android:title="@string/pref_map_auto_zoom"
android:switchTextOn=""
android:switchTextOff=""/>
<SwitchPreference
android:key="@string/pref_traffic_simplified_colors"
android:title="@string/pref_traffic_simplified_colors_title"
android:switchTextOn=""
android:switchTextOff=""/>
</PreferenceScreen>

View file

@ -17,4 +17,8 @@
<CheckBoxPreference
android:key="@string/pref_auto_zoom"
android:title="@string/pref_map_auto_zoom"/>
<CheckBoxPreference
android:key="@string/pref_traffic_simplified_colors"
android:title="@string/pref_traffic_simplified_colors_title"/>
</PreferenceScreen>

View file

@ -181,6 +181,20 @@ public class RoutePrefsFragment extends PreferenceFragment
}
});
boolean simplifiedColorsEnabled = Framework.nativeGetSimplifiedTrafficColorsEnabled();
final TwoStatePreference prefSimplifiedColors = (TwoStatePreference)findPreference(
getString(R.string.pref_traffic_simplified_colors));
prefSimplifiedColors.setChecked(simplifiedColorsEnabled);
prefSimplifiedColors.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
@Override
public boolean onPreferenceChange(Preference preference, Object newValue)
{
Framework.nativeSetSimplifiedTrafficColorsEnabled((Boolean)newValue);
return true;
}
});
update();
}

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "تكبير تلقائي";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "لا يعمل";
"duration_1_hour" = "1 ساعة";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automatické zvětšení";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Vypnuto";
"duration_1_hour" = "1 hodina";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Fra";
"duration_1_hour" = "1 time";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto-Zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Aus";
"duration_1_hour" = "1 Stunde";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Αυτόματη μεγέθυνση";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Απενεργ.";
"duration_1_hour" = "1 ώρα";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Off";
"duration_1_hour" = "1 hour";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Off";
"duration_1_hour" = "1 hour";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Autozoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Desactivada";
"duration_1_hour" = "1 hora";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automaattinen zoomaus";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Pois päältä";
"duration_1_hour" = "1 tunti";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Zoom automatique";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Désactivé";
"duration_1_hour" = "1 heure";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto-zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Kikapcsolva";
"duration_1_hour" = "1 óra";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Perbesar otomatis";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Nonaktif";
"duration_1_hour" = "1 jam";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Zoom automatico";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Disabilitato";
"duration_1_hour" = "1 ora";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "自動ズーム";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "オフ";
"duration_1_hour" = "1時間";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "자동 줌";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "선택 안 함";
"duration_1_hour" = "1시간";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automatisk zooming";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Av";
"duration_1_hour" = "1 time";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automatisch zoomen";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Uit";
"duration_1_hour" = "1 uur";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Auto zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Wyłączona";
"duration_1_hour" = "1 godzina";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Zoom automático";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Desligado";
"duration_1_hour" = "1 hora";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Zoom automat";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Oprit";
"duration_1_hour" = "1 oră";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Автозум";
"pref_traffic_simplified_colors_title" = "Простая цветовая схема для пробок";
"duration_disabled" = "Выключено";
"duration_1_hour" = "1 час";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automatický zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Vypnúť";
"duration_1_hour" = "1 hodina";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Automatisk zoom";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Av";
"duration_1_hour" = "1 timme";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "ซูมอัตโนมัติ";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "ปิด";
"duration_1_hour" = "1 ชั่วโมง";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Otomatik yakınlaştırma";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Kapalı";
"duration_1_hour" = "1 saat";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Автозум";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Вимкнуто";
"duration_1_hour" = "1 година";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "Ống dòm tự động";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "Tắt";
"duration_1_hour" = "1 giờ";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "自动缩放";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "关闭";
"duration_1_hour" = "1小时";

View file

@ -519,6 +519,8 @@
"pref_map_auto_zoom" = "自動縮放";
"pref_traffic_simplified_colors_title" = "Simplified colour scheme for traffic";
"duration_disabled" = "關閉";
"duration_1_hour" = "1小時";

View file

@ -5700,6 +5700,10 @@
el = Αυτόματη μεγέθυνση
sk = Automatický zoom
[pref_traffic_simplified_colors_title]
en = Simplified colour scheme for traffic
ru = Простая цветовая схема для пробок
[duration_disabled]
tags = ios,android
en = Off