Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-04-05 22:54:05 +02:00
commit 4a2e0f61da
78 changed files with 496 additions and 193 deletions

View file

@ -103,7 +103,7 @@ a {
external-free { external-free {
word-wrap: break-word; word-wrap: break-word;
background-color: #black; background-color: black;
} }
pre { pre {
@ -114,8 +114,6 @@ pre {
word-wrap: break-word; word-wrap: break-word;
} }
.thumb-tright, .thumbinner { .thumb-tright, .thumbinner {
width: 100% !important; width: 100% !important;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/shared_string_explore"/>
</LinearLayout>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/saved_articles"/>
</LinearLayout>

View file

@ -37,8 +37,8 @@
android:layout_marginTop="@dimen/content_padding_small" android:layout_marginTop="@dimen/content_padding_small"
android:drawablePadding="@dimen/context_menu_padding_margin_small" android:drawablePadding="@dimen/context_menu_padding_margin_small"
android:gravity="center_vertical" android:gravity="center_vertical"
android:letterSpacing="0.01"
android:padding="@dimen/context_menu_padding_margin_tiny" android:padding="@dimen/context_menu_padding_margin_tiny"
android:textAllCaps="true"
android:textSize="@dimen/default_desc_text_size" android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium" osmand:typeface="@string/font_roboto_medium"
tools:background="@drawable/wikipedia_select_lang_bg_dark_n" tools:background="@drawable/wikipedia_select_lang_bg_dark_n"

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:osmand="http://schemas.android.com/apk/res-auto" xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -8,6 +9,12 @@
android:background="?attr/wikivoyage_bg_color" android:background="?attr/wikivoyage_bg_color"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -41,13 +48,13 @@
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:letterSpacing="0.01"
android:maxLines="1" android:maxLines="1"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingRight="16dp" android:paddingRight="16dp"
android:text="@string/shared_string_options" android:text="@string/shared_string_options"
android:textAllCaps="true"
android:textColor="?attr/wikivoyage_active_color" android:textColor="?attr/wikivoyage_active_color"
android:textSize="@dimen/default_list_text_size" android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"/> osmand:typeface="@string/font_roboto_medium"/>
</LinearLayout> </LinearLayout>
@ -84,4 +91,21 @@
</LinearLayout> </LinearLayout>
<net.osmand.plus.LockableViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/wikivoyage_card_bg_color"
app:itemBackground="?attr/wikivoyage_card_bg_color"
app:menu="@menu/wikivoyage_bottom_navigation"
tools:itemIconTint="@color/bottom_navigation_color_selector_light"
tools:itemTextColor="@color/bottom_navigation_color_selector_light"/>
</LinearLayout> </LinearLayout>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_explore"
android:icon="@drawable/ic_action_explore"
android:title="@string/shared_string_explore"/>
<item
android:id="@+id/action_saved_articles"
android:icon="@drawable/ic_action_read_later"
android:title="@string/saved_articles"/>
</menu>

View file

@ -463,7 +463,7 @@
<string name="poi_payment_toll_type">طريقة الدفع</string> <string name="poi_payment_toll_type">طريقة الدفع</string>
<string name="poi_traffic_signals_sound">الصوت</string> <string name="poi_traffic_signals_sound">الصوت</string>
<string name="poi_highway_crossing_type">نوع</string> <string name="poi_highway_crossing_type">نوع</string>
<string name="poi_service_car">خدمة</string> <string name="poi_service_general">خدمة</string>
<string name="poi_self_service">خدمة ذاتية</string> <string name="poi_self_service">خدمة ذاتية</string>
<string name="poi_parking_type">نوع</string> <string name="poi_parking_type">نوع</string>
<string name="poi_subway_station_filter">محطة مترو الإنفاق</string> <string name="poi_subway_station_filter">محطة مترو الإنفاق</string>

View file

@ -28,7 +28,7 @@
<string name="poi_payment_toll_type">Ödəniş növü</string> <string name="poi_payment_toll_type">Ödəniş növü</string>
<string name="poi_traffic_signals_sound">Səs</string> <string name="poi_traffic_signals_sound">Səs</string>
<string name="poi_highway_crossing_type">Növ</string> <string name="poi_highway_crossing_type">Növ</string>
<string name="poi_service_car">Xidmət</string> <string name="poi_service_general">Xidmət</string>
<string name="poi_self_service">Özünəxidmət</string> <string name="poi_self_service">Özünəxidmət</string>
<string name="poi_automated">Avtomatlaşdırılmış</string> <string name="poi_automated">Avtomatlaşdırılmış</string>
<string name="poi_parking_type">Növ</string> <string name="poi_parking_type">Növ</string>

View file

@ -25,7 +25,7 @@
<string name="poi_traffic_signals_sound">Soníu</string> <string name="poi_traffic_signals_sound">Soníu</string>
<string name="poi_highway_crossing_type">Triba</string> <string name="poi_highway_crossing_type">Triba</string>
<string name="poi_tactile_paving">Pavimentu táutil</string> <string name="poi_tactile_paving">Pavimentu táutil</string>
<string name="poi_service_car">Serviciu</string> <string name="poi_service_general">Serviciu</string>
<string name="poi_parking_type">Triba</string> <string name="poi_parking_type">Triba</string>
<string name="poi_subway_station_filter">Estación de metru</string> <string name="poi_subway_station_filter">Estación de metru</string>
<string name="poi_bicycle_parking_type">Triba</string> <string name="poi_bicycle_parking_type">Triba</string>

View file

@ -27,7 +27,7 @@
<string name="poi_payment_type">Tawsit n usellek</string> <string name="poi_payment_type">Tawsit n usellek</string>
<string name="poi_payment_fuel_type">Tikaṛḍiwin n tumast</string> <string name="poi_payment_fuel_type">Tikaṛḍiwin n tumast</string>
<string name="poi_service_car">Ameẓlu</string> <string name="poi_service_general">Ameẓlu</string>
<string name="poi_pump">Tamejγart</string> <string name="poi_pump">Tamejγart</string>
<string name="poi_city_capital">Tamaneγt</string> <string name="poi_city_capital">Tamaneγt</string>
<string name="poi_religion_type">Asγan</string> <string name="poi_religion_type">Asγan</string>

View file

@ -3076,7 +3076,7 @@
<string name="poi_traffic_signals_sound">Гукавы сігнал</string> <string name="poi_traffic_signals_sound">Гукавы сігнал</string>
<string name="poi_highway_crossing_type">Тып</string> <string name="poi_highway_crossing_type">Тып</string>
<string name="poi_tactile_paving">Тактыльнае пакрыцьцё</string> <string name="poi_tactile_paving">Тактыльнае пакрыцьцё</string>
<string name="poi_service_car">Паслугі</string> <string name="poi_service_general">Паслугі</string>
<string name="poi_brushless">Безкантактная</string> <string name="poi_brushless">Безкантактная</string>
<string name="poi_self_service">Самаабслугоўваньне</string> <string name="poi_self_service">Самаабслугоўваньне</string>
<string name="poi_parking_type">Тып</string> <string name="poi_parking_type">Тып</string>

View file

@ -2304,7 +2304,7 @@
<string name="poi_payment_toll_type">Tipus de pagament</string> <string name="poi_payment_toll_type">Tipus de pagament</string>
<string name="poi_traffic_signals_sound">So</string> <string name="poi_traffic_signals_sound">So</string>
<string name="poi_highway_crossing_type">Tipus</string> <string name="poi_highway_crossing_type">Tipus</string>
<string name="poi_service_car">Servei</string> <string name="poi_service_general">Servei</string>
<string name="poi_self_service">Autoservei</string> <string name="poi_self_service">Autoservei</string>
<string name="poi_automated">Automatitzat</string> <string name="poi_automated">Automatitzat</string>
<string name="poi_parking_type">Tipus</string> <string name="poi_parking_type">Tipus</string>

View file

@ -2985,7 +2985,7 @@
<string name="poi_fire_hydrant_water_source">Zdroj vody</string> <string name="poi_fire_hydrant_water_source">Zdroj vody</string>
<string name="poi_traffic_signals_sound">Zvuk</string> <string name="poi_traffic_signals_sound">Zvuk</string>
<string name="poi_tactile_paving">Dlažba pro slabozraké</string> <string name="poi_tactile_paving">Dlažba pro slabozraké</string>
<string name="poi_service_car">Servis</string> <string name="poi_service_general">Servis</string>
<string name="poi_brushless">Bezkartáčový</string> <string name="poi_brushless">Bezkartáčový</string>
<string name="poi_self_service">Samoobsluha</string> <string name="poi_self_service">Samoobsluha</string>
<string name="poi_automated">Automatické</string> <string name="poi_automated">Automatické</string>

View file

@ -3115,7 +3115,7 @@
<string name="poi_traffic_signals_sound">Lyd</string> <string name="poi_traffic_signals_sound">Lyd</string>
<string name="poi_highway_crossing_type">Type</string> <string name="poi_highway_crossing_type">Type</string>
<string name="poi_tactile_paving">Taktil brolægning</string> <string name="poi_tactile_paving">Taktil brolægning</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_brushless">Børsteløs</string> <string name="poi_brushless">Børsteløs</string>
<string name="poi_self_service">Selvbetjening</string> <string name="poi_self_service">Selvbetjening</string>
<string name="poi_automated">Automatiseret</string> <string name="poi_automated">Automatiseret</string>

View file

@ -3091,7 +3091,7 @@
<string name="poi_vending_type">Verkaufsart</string> <string name="poi_vending_type">Verkaufsart</string>
<string name="poi_bicycle_service">Fahrradwerkstatt</string> <string name="poi_bicycle_service">Fahrradwerkstatt</string>
<string name="poi_service_car">Dienstleistung</string> <string name="poi_service_general">Dienstleistung</string>
<string name="poi_self_service">Selbstbedienung</string> <string name="poi_self_service">Selbstbedienung</string>
<string name="poi_pharmacy_dispensing">Rezepte</string> <string name="poi_pharmacy_dispensing">Rezepte</string>
<string name="poi_archaeological_site_type">Typ</string> <string name="poi_archaeological_site_type">Typ</string>

View file

@ -3034,7 +3034,7 @@
<string name="poi_traffic_signals_sound">Sono</string> <string name="poi_traffic_signals_sound">Sono</string>
<string name="poi_highway_crossing_type">Speco</string> <string name="poi_highway_crossing_type">Speco</string>
<string name="poi_tactile_paving">Reliefo por blinduloj</string> <string name="poi_tactile_paving">Reliefo por blinduloj</string>
<string name="poi_service_car">Servo</string> <string name="poi_service_general">Servo</string>
<string name="poi_brushless">Senbrosa</string> <string name="poi_brushless">Senbrosa</string>
<string name="poi_self_service">Memservado</string> <string name="poi_self_service">Memservado</string>
<string name="poi_automated">Aŭtomatiĝa</string> <string name="poi_automated">Aŭtomatiĝa</string>

View file

@ -3084,7 +3084,7 @@
<string name="poi_traffic_signals_sound">Sonoro</string> <string name="poi_traffic_signals_sound">Sonoro</string>
<string name="poi_highway_crossing_type">Tipo de cruce</string> <string name="poi_highway_crossing_type">Tipo de cruce</string>
<string name="poi_tactile_paving">Pavimento táctil</string> <string name="poi_tactile_paving">Pavimento táctil</string>
<string name="poi_service_car">Servicio para el automóvil</string> <string name="poi_service_general">Servicio para el automóvil</string>
<string name="poi_self_service">Autoservicio</string> <string name="poi_self_service">Autoservicio</string>
<string name="poi_automated">Automatizado</string> <string name="poi_automated">Automatizado</string>
<string name="poi_parking_type">Tipo de estacionamiento</string> <string name="poi_parking_type">Tipo de estacionamiento</string>

View file

@ -2847,7 +2847,7 @@
<string name="poi_traffic_signals_sound">Sonoro</string> <string name="poi_traffic_signals_sound">Sonoro</string>
<string name="poi_highway_crossing_type">Tipo de cruce</string> <string name="poi_highway_crossing_type">Tipo de cruce</string>
<string name="poi_tactile_paving">Pavimento táctil</string> <string name="poi_tactile_paving">Pavimento táctil</string>
<string name="poi_service_car">Servicio para el automóvil</string> <string name="poi_service_general">Servicio para el automóvil</string>
<string name="poi_brushless">Cepillo giratorio</string> <string name="poi_brushless">Cepillo giratorio</string>
<string name="poi_self_service">Autoservicio</string> <string name="poi_self_service">Autoservicio</string>
<string name="poi_automated">Automatizado</string> <string name="poi_automated">Automatizado</string>

View file

@ -3073,7 +3073,7 @@
<string name="poi_traffic_signals_sound">Sonido</string> <string name="poi_traffic_signals_sound">Sonido</string>
<string name="poi_highway_crossing_type">Tipo de cruce</string> <string name="poi_highway_crossing_type">Tipo de cruce</string>
<string name="poi_tactile_paving">Pavimento táctil</string> <string name="poi_tactile_paving">Pavimento táctil</string>
<string name="poi_service_car">Servicio para el automóvil</string> <string name="poi_service_general">Servicio para el automóvil</string>
<string name="poi_brushless">Cepillo giratorio</string> <string name="poi_brushless">Cepillo giratorio</string>
<string name="poi_self_service">Autoservicio</string> <string name="poi_self_service">Autoservicio</string>
<string name="poi_automated">Automatizado</string> <string name="poi_automated">Automatizado</string>

View file

@ -1264,7 +1264,7 @@
<string name="poi_payment_toll_type">Ordainketa mota</string> <string name="poi_payment_toll_type">Ordainketa mota</string>
<string name="poi_traffic_signals_sound">Soinua</string> <string name="poi_traffic_signals_sound">Soinua</string>
<string name="poi_highway_crossing_type">Mota</string> <string name="poi_highway_crossing_type">Mota</string>
<string name="poi_service_car">Zerbitzua</string> <string name="poi_service_general">Zerbitzua</string>
<string name="poi_brushless">Eskuila gabekoa</string> <string name="poi_brushless">Eskuila gabekoa</string>
<string name="poi_self_service">Autozerbitzua</string> <string name="poi_self_service">Autozerbitzua</string>
<string name="poi_automated">Automatizatua</string> <string name="poi_automated">Automatizatua</string>

View file

@ -677,7 +677,7 @@
<string name="poi_parking_type">نوع پارکینگ</string> <string name="poi_parking_type">نوع پارکینگ</string>
<string name="poi_covered">سرپوشیده</string> <string name="poi_covered">سرپوشیده</string>
<string name="poi_bicycle_parking_type">نوع پارکینگ دوچرخه</string> <string name="poi_bicycle_parking_type">نوع پارکینگ دوچرخه</string>
<string name="poi_service_car">میکانیکی</string> <string name="poi_service_general">میکانیکی</string>
<string name="poi_brushless">بدون برس</string> <string name="poi_brushless">بدون برس</string>
<string name="poi_self_service">سلف سرویس</string> <string name="poi_self_service">سلف سرویس</string>
<string name="poi_subway_station_filter">ایستگاه مترو</string> <string name="poi_subway_station_filter">ایستگاه مترو</string>

View file

@ -50,7 +50,7 @@
<string name="poi_payment_toll_type">Maksutapa</string> <string name="poi_payment_toll_type">Maksutapa</string>
<string name="poi_traffic_signals_sound">Ääni</string> <string name="poi_traffic_signals_sound">Ääni</string>
<string name="poi_highway_crossing_type">Tapa</string> <string name="poi_highway_crossing_type">Tapa</string>
<string name="poi_service_car">Palvelu</string> <string name="poi_service_general">Palvelu</string>
<string name="poi_self_service">Itsepalvelu</string> <string name="poi_self_service">Itsepalvelu</string>
<string name="poi_automated">Automatisoitu</string> <string name="poi_automated">Automatisoitu</string>
<string name="poi_parking_type">Tyyppi</string> <string name="poi_parking_type">Tyyppi</string>

View file

@ -2148,7 +2148,7 @@
<string name="poi_fire_hydrant_water_source">Source de l\'eau</string> <string name="poi_fire_hydrant_water_source">Source de l\'eau</string>
<string name="poi_payment_toll_type">Type de paiement</string> <string name="poi_payment_toll_type">Type de paiement</string>
<string name="poi_highway_crossing_type">Type</string> <string name="poi_highway_crossing_type">Type</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_self_service">Libre service</string> <string name="poi_self_service">Libre service</string>
<string name="poi_automated">Automatisé</string> <string name="poi_automated">Automatisé</string>
<string name="poi_parking_type">Type</string> <string name="poi_parking_type">Type</string>

View file

@ -1079,7 +1079,7 @@
<string name="poi_traffic_signals_sound">Son</string> <string name="poi_traffic_signals_sound">Son</string>
<string name="poi_highway_crossing_type">Tipo</string> <string name="poi_highway_crossing_type">Tipo</string>
<string name="poi_tactile_paving">Pavimentación táctil</string> <string name="poi_tactile_paving">Pavimentación táctil</string>
<string name="poi_service_car">Servizo</string> <string name="poi_service_general">Servizo</string>
<string name="poi_self_service">Auto-servizo</string> <string name="poi_self_service">Auto-servizo</string>
<string name="poi_automated">Automatizado</string> <string name="poi_automated">Automatizado</string>
<string name="poi_parking_type">Tipo</string> <string name="poi_parking_type">Tipo</string>

View file

@ -141,7 +141,7 @@
<string name="poi_payment_type">סוג תשלום</string> <string name="poi_payment_type">סוג תשלום</string>
<string name="poi_bicycle_service">שירות אופניים</string> <string name="poi_bicycle_service">שירות אופניים</string>
<string name="poi_fire_hydrant_water_source">מקור מים</string> <string name="poi_fire_hydrant_water_source">מקור מים</string>
<string name="poi_service_car">שירות</string> <string name="poi_service_general">שירות</string>
<string name="poi_subway_station_filter">תחנת רכבת תחתית</string> <string name="poi_subway_station_filter">תחנת רכבת תחתית</string>
<string name="poi_pump">משאבה</string> <string name="poi_pump">משאבה</string>
<string name="poi_aerialway_bicycle">תחבורת אופניים</string> <string name="poi_aerialway_bicycle">תחבורת אופניים</string>

View file

@ -1989,7 +1989,7 @@
<string name="poi_transport_construction">Út- vagy vasútépítés</string> <string name="poi_transport_construction">Út- vagy vasútépítés</string>
<string name="poi_square">Tér</string> <string name="poi_square">Tér</string>
<string name="poi_clothes_type">Típus</string> <string name="poi_clothes_type">Típus</string>
<string name="poi_service_car">Szolgáltatás</string> <string name="poi_service_general">Szolgáltatás</string>
<string name="poi_ferry_terminal_cargo">Rakomány</string> <string name="poi_ferry_terminal_cargo">Rakomány</string>
<string name="poi_aerialway_heating">Fűtés</string> <string name="poi_aerialway_heating">Fűtés</string>
<string name="poi_pump">Szivattyú</string> <string name="poi_pump">Szivattyú</string>

View file

@ -182,7 +182,7 @@
<string name="poi_fire_hydrant_position">Staðsetning</string> <string name="poi_fire_hydrant_position">Staðsetning</string>
<string name="poi_payment_toll_type">Greiðslumáti</string> <string name="poi_payment_toll_type">Greiðslumáti</string>
<string name="poi_highway_crossing_type">Tegund</string> <string name="poi_highway_crossing_type">Tegund</string>
<string name="poi_service_car">Þjónusta</string> <string name="poi_service_general">Þjónusta</string>
<string name="poi_self_service">Sjálfsafgreiðsla</string> <string name="poi_self_service">Sjálfsafgreiðsla</string>
<string name="poi_parking_type">Tegund</string> <string name="poi_parking_type">Tegund</string>
<string name="poi_subway_station_filter">Neðanjarðarlestarstöð</string> <string name="poi_subway_station_filter">Neðanjarðarlestarstöð</string>

View file

@ -752,7 +752,7 @@
<string name="poi_traffic_signals_sound">Suono</string> <string name="poi_traffic_signals_sound">Suono</string>
<string name="poi_highway_crossing_type">Tipo</string> <string name="poi_highway_crossing_type">Tipo</string>
<string name="poi_tactile_paving">Pavimentazione tattile</string> <string name="poi_tactile_paving">Pavimentazione tattile</string>
<string name="poi_service_car">Servizio</string> <string name="poi_service_general">Servizio</string>
<string name="poi_brushless">Senza spazzola (acqua ad alta pressione)</string> <string name="poi_brushless">Senza spazzola (acqua ad alta pressione)</string>
<string name="poi_self_service">Self-service</string> <string name="poi_self_service">Self-service</string>
<string name="poi_automated">Automatizzato</string> <string name="poi_automated">Automatizzato</string>

View file

@ -1848,7 +1848,7 @@
<string name="poi_vending_parking_tickets">駐車場のチケット</string> <string name="poi_vending_parking_tickets">駐車場のチケット</string>
<string name="poi_parking_surface">駐車場舗装種別</string> <string name="poi_parking_surface">駐車場舗装種別</string>
<string name="poi_service_car">提供可能サービス(Service)</string> <string name="poi_service_general">提供可能サービス(Service)</string>
<string name="poi_cafeteria">カフェテリア・セルフ形式</string> <string name="poi_cafeteria">カフェテリア・セルフ形式</string>
<string name="poi_fast_food_cafeteria">肯定</string> <string name="poi_fast_food_cafeteria">肯定</string>

View file

@ -123,7 +123,7 @@
<string name="poi_fire_hydrant_water_source">Vandens šaltinis</string> <string name="poi_fire_hydrant_water_source">Vandens šaltinis</string>
<string name="poi_payment_toll_type">Mokėjimo tipas</string> <string name="poi_payment_toll_type">Mokėjimo tipas</string>
<string name="poi_highway_crossing_type">Tipas</string> <string name="poi_highway_crossing_type">Tipas</string>
<string name="poi_service_car">Paslauga</string> <string name="poi_service_general">Paslauga</string>
<string name="poi_self_service">Savitarna</string> <string name="poi_self_service">Savitarna</string>
<string name="poi_automated">Automatizuotas</string> <string name="poi_automated">Automatizuotas</string>
<string name="poi_parking_type">Tipas</string> <string name="poi_parking_type">Tipas</string>

View file

@ -15,7 +15,7 @@
<string name="poi_traffic_signals_sound">Skaņa</string> <string name="poi_traffic_signals_sound">Skaņa</string>
<string name="poi_highway_crossing_type">Veids</string> <string name="poi_highway_crossing_type">Veids</string>
<string name="poi_tactile_paving">Taktīlais segums (īpaša reljefaina josla)</string> <string name="poi_tactile_paving">Taktīlais segums (īpaša reljefaina josla)</string>
<string name="poi_service_car">Serviss</string> <string name="poi_service_general">Serviss</string>
<string name="poi_brushless">Bezkontaktu</string> <string name="poi_brushless">Bezkontaktu</string>
<string name="poi_self_service">Pašapkalpošanās</string> <string name="poi_self_service">Pašapkalpošanās</string>
<string name="poi_automated">Automatizētie</string> <string name="poi_automated">Automatizētie</string>

View file

@ -861,7 +861,7 @@
<string name="poi_traffic_signals_sound">ശബ്ദമുണ്ടാക്കുന്ന ട്രാ‌ഫിക് സിഗ്നല്‍</string> <string name="poi_traffic_signals_sound">ശബ്ദമുണ്ടാക്കുന്ന ട്രാ‌ഫിക് സിഗ്നല്‍</string>
<string name="poi_highway_crossing_type">തരം [ക്രോ‌സിങ്ങ്]</string> <string name="poi_highway_crossing_type">തരം [ക്രോ‌സിങ്ങ്]</string>
<string name="poi_tactile_paving">ടാക്ടൈല്‍ പേവിങ്ങോട് കൂടിയത്</string> <string name="poi_tactile_paving">ടാക്ടൈല്‍ പേവിങ്ങോട് കൂടിയത്</string>
<string name="poi_service_car">സെര്‍വീസ്</string> <string name="poi_service_general">സെര്‍വീസ്</string>
<string name="poi_self_service">സ്വയംസേവനം</string> <string name="poi_self_service">സ്വയംസേവനം</string>
<string name="poi_automated">ഓട്ടോ‌മാറ്റിക്</string> <string name="poi_automated">ഓട്ടോ‌മാറ്റിക്</string>
<string name="poi_parking_type">തരം</string> <string name="poi_parking_type">തരം</string>

View file

@ -579,7 +579,7 @@
<string name="poi_fire_hydrant_type">Type</string> <string name="poi_fire_hydrant_type">Type</string>
<string name="poi_fire_hydrant_position">Posisjon</string> <string name="poi_fire_hydrant_position">Posisjon</string>
<string name="poi_highway_crossing_type">Type</string> <string name="poi_highway_crossing_type">Type</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_diet">Diett</string> <string name="poi_diet">Diett</string>
<string name="poi_beach_surface_type">Overflate</string> <string name="poi_beach_surface_type">Overflate</string>
<string name="poi_office">Kontor</string> <string name="poi_office">Kontor</string>

View file

@ -1511,7 +1511,7 @@
<string name="poi_traffic_signals_sound">Geluidssignaal</string> <string name="poi_traffic_signals_sound">Geluidssignaal</string>
<string name="poi_highway_crossing_type">Soort</string> <string name="poi_highway_crossing_type">Soort</string>
<string name="poi_tactile_paving">Blindengeleidestrook</string> <string name="poi_tactile_paving">Blindengeleidestrook</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_brushless">Borstelloos</string> <string name="poi_brushless">Borstelloos</string>
<string name="poi_self_service">Zelfbediening</string> <string name="poi_self_service">Zelfbediening</string>
<string name="poi_automated">Automaat</string> <string name="poi_automated">Automaat</string>

View file

@ -3058,7 +3058,7 @@
<string name="poi_traffic_signals_sound">Sygnał dźwiękowy</string> <string name="poi_traffic_signals_sound">Sygnał dźwiękowy</string>
<string name="poi_highway_crossing_type">Typ</string> <string name="poi_highway_crossing_type">Typ</string>
<string name="poi_tactile_paving">Wypustki dla niewidomych</string> <string name="poi_tactile_paving">Wypustki dla niewidomych</string>
<string name="poi_service_car">Usługa</string> <string name="poi_service_general">Usługa</string>
<string name="poi_brushless">Bezszczotkowa</string> <string name="poi_brushless">Bezszczotkowa</string>
<string name="poi_self_service">Samoobsługa</string> <string name="poi_self_service">Samoobsługa</string>
<string name="poi_automated">Automatyczna</string> <string name="poi_automated">Automatyczna</string>

View file

@ -2697,7 +2697,7 @@
<string name="poi_traffic_signals_sound">Som</string> <string name="poi_traffic_signals_sound">Som</string>
<string name="poi_highway_crossing_type">Tipo</string> <string name="poi_highway_crossing_type">Tipo</string>
<string name="poi_tactile_paving">Pavimentação tátil</string> <string name="poi_tactile_paving">Pavimentação tátil</string>
<string name="poi_service_car">Serviço</string> <string name="poi_service_general">Serviço</string>
<string name="poi_self_service">Self-service</string> <string name="poi_self_service">Self-service</string>
<string name="poi_automated">Automatizado</string> <string name="poi_automated">Automatizado</string>
<string name="poi_parking_type">Tipo</string> <string name="poi_parking_type">Tipo</string>

View file

@ -150,7 +150,7 @@
<string name="poi_car_repair">Автосервис</string> <string name="poi_car_repair">Автосервис</string>
<string name="poi_service_car">Услуги</string> <string name="poi_service_general">Услуги</string>
<string name="poi_service_tyres">Шиномонтаж</string> <string name="poi_service_tyres">Шиномонтаж</string>
<string name="poi_vehicle_inspection">Пункт техосмотра</string> <string name="poi_vehicle_inspection">Пункт техосмотра</string>
<string name="poi_car_wash">Автомойка</string> <string name="poi_car_wash">Автомойка</string>
@ -3754,4 +3754,27 @@
<string name="poi_amusement_arcade">Игровой зал</string> <string name="poi_amusement_arcade">Игровой зал</string>
<string name="poi_adult_gaming_centre">Игровой зал для взрослых</string> <string name="poi_adult_gaming_centre">Игровой зал для взрослых</string>
<string name="poi_service_car">Автоуслуги</string>
<string name="poi_service_vehicle_tyres_yes">Шиномонтаж</string>
<string name="poi_service_vehicle_car_repair_yes">Ремонт</string>
<string name="poi_service_vehicle_oil_change_yes">Замена масла</string>
<string name="poi_service_vehicle_used_car_sales_yes">Продажа подержанных автомобилей</string>
<string name="poi_service_vehicle_brakes_yes">Тормоза</string>
<string name="poi_service_vehicle_new_car_sales_yes">Продажа новых автомобилей</string>
<string name="poi_service_vehicle_diagnostics_yes">Диагностика</string>
<string name="poi_service_vehicle_car_parts_yes">Запчасти</string>
<string name="poi_service_vehicle_batteries_yes">Аккумуляторы</string>
<string name="poi_service_vehicle_air_conditioning_yes">Кондиционеры</string>
<string name="poi_service_vehicle_body_repair_yes">Кузовной ремонт</string>
<string name="poi_service_vehicle_electrical_yes">Электрика</string>
<string name="poi_service_vehicle_wheels_yes">Колёса</string>
<string name="poi_service_vehicle_glass_yes">Стекло</string>
<string name="poi_service_vehicle_truck_repair_yes">Ремонт грузовиков</string>
<string name="poi_service_vehicle_muffler_yes">Глушитель</string>
<string name="poi_service_vehicle_alignment_yes">Развал-схождение</string>
<string name="poi_service_vehicle_transmission_repair_yes">Ремонт трансмиссии</string>
<string name="poi_service_vehicle_motor_yes">Двигатель</string>
<string name="poi_service_vehicle_insurance_yes">Страхование</string>
</resources> </resources>

View file

@ -1921,7 +1921,7 @@
<string name="poi_traffic_signals_sound">Sonu</string> <string name="poi_traffic_signals_sound">Sonu</string>
<string name="poi_highway_crossing_type">Casta</string> <string name="poi_highway_crossing_type">Casta</string>
<string name="poi_tactile_paving">Pamentu tàtile</string> <string name="poi_tactile_paving">Pamentu tàtile</string>
<string name="poi_service_car">Servìtziu</string> <string name="poi_service_general">Servìtziu</string>
<string name="poi_brushless">Chene ispàtzula</string> <string name="poi_brushless">Chene ispàtzula</string>
<string name="poi_self_service">Servìtziu a sa sola</string> <string name="poi_self_service">Servìtziu a sa sola</string>
<string name="poi_automated">Automatizadu</string> <string name="poi_automated">Automatizadu</string>

View file

@ -2113,7 +2113,7 @@
<string name="poi_traffic_signals_sound">Zvuk</string> <string name="poi_traffic_signals_sound">Zvuk</string>
<string name="poi_highway_crossing_type">Typ</string> <string name="poi_highway_crossing_type">Typ</string>
<string name="poi_tactile_paving">Dlažba pre nevidiacich</string> <string name="poi_tactile_paving">Dlažba pre nevidiacich</string>
<string name="poi_service_car">Servis</string> <string name="poi_service_general">Servis</string>
<string name="poi_brushless">Bez kefy</string> <string name="poi_brushless">Bez kefy</string>
<string name="poi_self_service">Samoobsluha</string> <string name="poi_self_service">Samoobsluha</string>
<string name="poi_automated">Automatické</string> <string name="poi_automated">Automatické</string>

View file

@ -14,5 +14,5 @@
<string name="poi_payment_toll_type">Начин плаћања</string> <string name="poi_payment_toll_type">Начин плаћања</string>
<string name="poi_traffic_signals_sound">Звук</string> <string name="poi_traffic_signals_sound">Звук</string>
<string name="poi_highway_crossing_type">Врста</string> <string name="poi_highway_crossing_type">Врста</string>
<string name="poi_service_car">Одржавање</string> <string name="poi_service_general">Одржавање</string>
</resources> </resources>

View file

@ -31,7 +31,7 @@
<string name="poi_traffic_signals_sound">Ljud</string> <string name="poi_traffic_signals_sound">Ljud</string>
<string name="poi_highway_crossing_type">Typ</string> <string name="poi_highway_crossing_type">Typ</string>
<string name="poi_tactile_paving">Taktil markering</string> <string name="poi_tactile_paving">Taktil markering</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_brushless">Borstlös</string> <string name="poi_brushless">Borstlös</string>
<string name="poi_self_service">Självbetjäning</string> <string name="poi_self_service">Självbetjäning</string>
<string name="poi_automated">Automatiserad</string> <string name="poi_automated">Automatiserad</string>

View file

@ -1065,7 +1065,7 @@
<string name="poi_traffic_signals_sound">Ses</string> <string name="poi_traffic_signals_sound">Ses</string>
<string name="poi_highway_crossing_type">Tür</string> <string name="poi_highway_crossing_type">Tür</string>
<string name="poi_tactile_paving">Parke kaldırım</string> <string name="poi_tactile_paving">Parke kaldırım</string>
<string name="poi_service_car">Hizmet</string> <string name="poi_service_general">Hizmet</string>
<string name="poi_brushless">Fırçasız</string> <string name="poi_brushless">Fırçasız</string>
<string name="poi_self_service">Kendin yap</string> <string name="poi_self_service">Kendin yap</string>
<string name="poi_automated">Kendiliğinden</string> <string name="poi_automated">Kendiliğinden</string>

View file

@ -562,7 +562,7 @@
<string name="poi_traffic_signals_sound">Звуковий сигнал</string> <string name="poi_traffic_signals_sound">Звуковий сигнал</string>
<string name="poi_highway_crossing_type">Тип</string> <string name="poi_highway_crossing_type">Тип</string>
<string name="poi_tactile_paving">Тактильне покриття</string> <string name="poi_tactile_paving">Тактильне покриття</string>
<string name="poi_service_car">Послуги</string> <string name="poi_service_general">Послуги</string>
<string name="poi_brushless">Безконтактна</string> <string name="poi_brushless">Безконтактна</string>
<string name="poi_self_service">Самообслуговування</string> <string name="poi_self_service">Самообслуговування</string>
<string name="poi_automated">Автоматизація</string> <string name="poi_automated">Автоматизація</string>

View file

@ -17,7 +17,7 @@
<string name="poi_beauty_salon_service">服务</string> <string name="poi_beauty_salon_service">服务</string>
<string name="poi_shop_food">便利店和超市</string> <string name="poi_shop_food">便利店和超市</string>
<string name="poi_traffic_signals_sound">语音</string> <string name="poi_traffic_signals_sound">语音</string>
<string name="poi_service_car">服务</string> <string name="poi_service_general">服务</string>
<string name="poi_brushless">无刷</string> <string name="poi_brushless">无刷</string>
<string name="poi_animal_training_type">类型</string> <string name="poi_animal_training_type">类型</string>
<string name="poi_embassy_type">类型</string> <string name="poi_embassy_type">类型</string>

View file

@ -2435,7 +2435,7 @@
<string name="poi_traffic_signals_sound">聲音</string> <string name="poi_traffic_signals_sound">聲音</string>
<string name="poi_highway_crossing_type">類型</string> <string name="poi_highway_crossing_type">類型</string>
<string name="poi_tactile_paving">導盲磚</string> <string name="poi_tactile_paving">導盲磚</string>
<string name="poi_service_car">服務</string> <string name="poi_service_general">服務</string>
<string name="poi_brushless">無刷</string> <string name="poi_brushless">無刷</string>
<string name="poi_self_service">自助服務</string> <string name="poi_self_service">自助服務</string>
<string name="poi_automated">自動化</string> <string name="poi_automated">自動化</string>

View file

@ -18,7 +18,7 @@
<string name="poi_traffic_signals_sound">Sound</string> <string name="poi_traffic_signals_sound">Sound</string>
<string name="poi_highway_crossing_type">Type</string> <string name="poi_highway_crossing_type">Type</string>
<string name="poi_tactile_paving">Tactile paving</string> <string name="poi_tactile_paving">Tactile paving</string>
<string name="poi_service_car">Service</string> <string name="poi_service_general">Service</string>
<string name="poi_brushless">Brushless</string> <string name="poi_brushless">Brushless</string>
<string name="poi_self_service">Self service</string> <string name="poi_self_service">Self service</string>
<string name="poi_automated">Automated</string> <string name="poi_automated">Automated</string>
@ -104,6 +104,7 @@
<string name="poi_socket_type3_output_filter">Type 3 output</string> <string name="poi_socket_type3_output_filter">Type 3 output</string>
<string name="poi_socket_cee_blue_output_filter">CEE blue output</string> <string name="poi_socket_cee_blue_output_filter">CEE blue output</string>
<string name="poi_socket_schuko_output_filter">Schuko output</string> <string name="poi_socket_schuko_output_filter">Schuko output</string>
<string name="poi_service_car">Car service</string>
<!-- categories --> <!-- categories -->
<string name="poi_shop">Store</string> <string name="poi_shop">Store</string>
@ -3773,4 +3774,25 @@
<string name="poi_amusement_arcade">Amusement arcade</string> <string name="poi_amusement_arcade">Amusement arcade</string>
<string name="poi_adult_gaming_centre">Adult gaming centre</string> <string name="poi_adult_gaming_centre">Adult gaming centre</string>
<string name="poi_service_vehicle_car_repair_yes">Car repair</string>
<string name="poi_service_vehicle_oil_change_yes">Oil change</string>
<string name="poi_service_vehicle_used_car_sales_yes">Used car sales</string>
<string name="poi_service_vehicle_brakes_yes">Brakes</string>
<string name="poi_service_vehicle_new_car_sales_yes">New car sales</string>
<string name="poi_service_vehicle_diagnostics_yes">Diagnostics</string>
<string name="poi_service_vehicle_car_parts_yes">Car parts</string>
<string name="poi_service_vehicle_batteries_yes">Batteries</string>
<string name="poi_service_vehicle_air_conditioning_yes">Air conditioning</string>
<string name="poi_service_vehicle_body_repair_yes">Body repair</string>
<string name="poi_service_vehicle_electrical_yes">Electrical</string>
<string name="poi_service_vehicle_wheels_yes">Wheels</string>
<string name="poi_service_vehicle_glass_yes">Glass</string>
<string name="poi_service_vehicle_truck_repair_yes">Truck repair</string>
<string name="poi_service_vehicle_muffler_yes">Muffler</string>
<string name="poi_service_vehicle_alignment_yes">Alignment</string>
<string name="poi_service_vehicle_transmission_repair_yes">Transmission repair</string>
<string name="poi_service_vehicle_motor_yes">Motor</string>
<string name="poi_service_vehicle_insurance_yes">Insurance</string>
<string name="poi_service_vehicle_tyres_yes">Tyres</string>
</resources> </resources>

View file

@ -9,6 +9,8 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
--> -->
<string name="saved_articles">Saved articles</string>
<string name="shared_string_explore">Explore</string>
<string name="shared_string_result">Result</string> <string name="shared_string_result">Result</string>
<string name="use_two_digits_longitude">Use two digits longitude</string> <string name="use_two_digits_longitude">Use two digits longitude</string>
<string name="shared_string_travel">Travel</string> <string name="shared_string_travel">Travel</string>

View file

@ -13,7 +13,6 @@ import android.graphics.drawable.StateListDrawable;
import android.os.Build; import android.os.Build;
import android.os.IBinder; import android.os.IBinder;
import android.support.annotation.ColorRes; import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.design.widget.Snackbar; import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.text.Spannable; import android.text.Spannable;
@ -143,35 +142,50 @@ public class AndroidUtils {
return null; return null;
} }
public static ColorStateList createColorStateList(Context ctx, @ColorRes int normal, @ColorRes int pressed) { public static ColorStateList createCheckedColorStateList(Context ctx, boolean night,
return createColorStateList(ctx, false, normal, pressed, 0, 0); @ColorRes int lightNormal, @ColorRes int lightChecked,
@ColorRes int darkNormal, @ColorRes int darkChecked) {
return createColorStateList(ctx, night, android.R.attr.state_checked,
lightNormal, lightChecked, darkNormal, darkChecked);
} }
public static ColorStateList createColorStateList(Context ctx, boolean night, public static ColorStateList createPressedColorStateList(Context ctx, @ColorRes int normal, @ColorRes int pressed) {
return createPressedColorStateList(ctx, false, normal, pressed, 0, 0);
}
public static ColorStateList createPressedColorStateList(Context ctx, boolean night,
@ColorRes int lightNormal, @ColorRes int lightPressed, @ColorRes int lightNormal, @ColorRes int lightPressed,
@ColorRes int darkNormal, @ColorRes int darkPressed) { @ColorRes int darkNormal, @ColorRes int darkPressed) {
return createColorStateList(ctx, night, android.R.attr.state_pressed,
lightNormal, lightPressed, darkNormal, darkPressed);
}
private static ColorStateList createColorStateList(Context ctx, boolean night, int state,
@ColorRes int lightNormal, @ColorRes int lightState,
@ColorRes int darkNormal, @ColorRes int darkState) {
return new ColorStateList( return new ColorStateList(
new int[][]{ new int[][]{
new int[]{android.R.attr.state_pressed}, new int[]{state},
new int[]{} new int[]{}
}, },
new int[]{ new int[]{
ContextCompat.getColor(ctx, night ? darkPressed : lightPressed), ContextCompat.getColor(ctx, night ? darkState : lightState),
ContextCompat.getColor(ctx, night ? darkNormal : lightNormal) ContextCompat.getColor(ctx, night ? darkNormal : lightNormal)
} }
); );
} }
public static StateListDrawable createStateListDrawable(Context ctx, boolean night, public static StateListDrawable createCheckedStateListDrawable(Drawable normal, Drawable checked) {
@DrawableRes int lightNormal, @DrawableRes int lightPressed, return createStateListDrawable(normal, checked, android.R.attr.state_checked);
@DrawableRes int darkNormal, @DrawableRes int darkPressed) {
return createStateListDrawable(ContextCompat.getDrawable(ctx, night ? darkNormal : lightNormal),
ContextCompat.getDrawable(ctx, night ? darkPressed : lightPressed));
} }
public static StateListDrawable createStateListDrawable(Drawable normal, Drawable pressed) { public static StateListDrawable createPressedStateListDrawable(Drawable normal, Drawable pressed) {
return createStateListDrawable(normal, pressed, android.R.attr.state_pressed);
}
private static StateListDrawable createStateListDrawable(Drawable normal, Drawable stateDrawable, int state) {
StateListDrawable res = new StateListDrawable(); StateListDrawable res = new StateListDrawable();
res.addState(new int[]{android.R.attr.state_pressed}, pressed); res.addState(new int[]{state}, stateDrawable);
res.addState(new int[]{}, normal); res.addState(new int[]{}, normal);
return res; return res;
} }

View file

@ -62,7 +62,7 @@ import net.osmand.plus.views.BaseMapLayer;
import net.osmand.plus.views.MapControlsLayer; import net.osmand.plus.views.MapControlsLayer;
import net.osmand.plus.views.MapTileLayer; import net.osmand.plus.views.MapTileLayer;
import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.wikivoyage.WikivoyageExploreDialogFragment; import net.osmand.plus.wikivoyage.explore.WikivoyageExploreDialogFragment;
import net.osmand.plus.wikivoyage.data.WikivoyageDbHelper; import net.osmand.plus.wikivoyage.data.WikivoyageDbHelper;
import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter;
@ -761,7 +761,7 @@ public class MapActivityActions implements DialogProvider {
Intent intent = new Intent(mapActivity, OsmLiveActivity.class); Intent intent = new Intent(mapActivity, OsmLiveActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
mapActivity.startActivity(intent); mapActivity.startActivity(intent);
return false; return true;
} }
}).createItem()); }).createItem());
} }

View file

@ -970,7 +970,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private void enableDisableButtons(View buttonView, TextView button, boolean enabled) { private void enableDisableButtons(View buttonView, TextView button, boolean enabled) {
if (enabled) { if (enabled) {
ColorStateList buttonColorStateList = AndroidUtils.createColorStateList(getContext(), nightMode, ColorStateList buttonColorStateList = AndroidUtils.createPressedColorStateList(getContext(), nightMode,
R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p, R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p,
R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p); R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p);

View file

@ -952,7 +952,7 @@ public class MenuBuilder {
int paddingSides = dpToPx(10f); int paddingSides = dpToPx(10f);
button.setPadding(paddingSides, paddingSides, paddingSides, paddingSides); button.setPadding(paddingSides, paddingSides, paddingSides, paddingSides);
if (!selected) { if (!selected) {
ColorStateList buttonColorStateList = AndroidUtils.createColorStateList(context, !light, ColorStateList buttonColorStateList = AndroidUtils.createPressedColorStateList(context, !light,
R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p, R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p,
R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p); R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p);
button.setTextColor(buttonColorStateList); button.setTextColor(buttonColorStateList);

View file

@ -690,7 +690,7 @@ public abstract class MenuController extends BaseMenuController implements Colla
} }
private StateListDrawable getStateListDrawable(@DrawableRes int iconResId) { private StateListDrawable getStateListDrawable(@DrawableRes int iconResId) {
return AndroidUtils.createStateListDrawable(getNormalIcon(iconResId), getPressedIcon(iconResId)); return AndroidUtils.createPressedStateListDrawable(getNormalIcon(iconResId), getPressedIcon(iconResId));
} }
public abstract void buttonPressed(); public abstract void buttonPressed();

View file

@ -103,7 +103,7 @@ public class WikipediaDialogFragment extends DialogFragment {
TextView titleTextView = (TextView) mainView.findViewById(R.id.title_text_view); TextView titleTextView = (TextView) mainView.findViewById(R.id.title_text_view);
titleTextView.setTextColor(toolbarTextColor); titleTextView.setTextColor(toolbarTextColor);
ColorStateList buttonColorStateList = AndroidUtils.createColorStateList(getContext(), darkMode, ColorStateList buttonColorStateList = AndroidUtils.createPressedColorStateList(getContext(), darkMode,
R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p, R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p,
R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p); R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p);

View file

@ -235,7 +235,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
button.setTextSize(14); button.setTextSize(14);
int paddingSides = dpToPx(10f); int paddingSides = dpToPx(10f);
button.setPadding(paddingSides, 0, paddingSides, 0); button.setPadding(paddingSides, 0, paddingSides, 0);
ColorStateList buttonColorStateList = AndroidUtils.createColorStateList(view.getContext(), !light, ColorStateList buttonColorStateList = AndroidUtils.createPressedColorStateList(view.getContext(), !light,
R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p, R.color.ctx_menu_controller_button_text_color_light_n, R.color.ctx_menu_controller_button_text_color_light_p,
R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p); R.color.ctx_menu_controller_button_text_color_dark_n, R.color.ctx_menu_controller_button_text_color_dark_p);
button.setTextColor(buttonColorStateList); button.setTextColor(buttonColorStateList);
@ -255,7 +255,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
Drawable pressed = app.getIconsCache().getIcon(R.drawable.ic_action_read_text, Drawable pressed = app.getIconsCache().getIcon(R.drawable.ic_action_read_text,
light ? R.color.ctx_menu_controller_button_text_color_light_p : R.color.ctx_menu_controller_button_text_color_dark_p); light ? R.color.ctx_menu_controller_button_text_color_light_p : R.color.ctx_menu_controller_button_text_color_dark_p);
button.setCompoundDrawablesWithIntrinsicBounds(Build.VERSION.SDK_INT >= 21 button.setCompoundDrawablesWithIntrinsicBounds(Build.VERSION.SDK_INT >= 21
? AndroidUtils.createStateListDrawable(normal, pressed) : normal, null, null, null); ? AndroidUtils.createPressedStateListDrawable(normal, pressed) : normal, null, null, null);
button.setCompoundDrawablePadding(dpToPx(8f)); button.setCompoundDrawablePadding(dpToPx(8f));
llText.addView(button); llText.addView(button);
} }

View file

@ -70,7 +70,7 @@ public class MapMarkerMenuController extends MenuController {
: R.color.ctx_menu_controller_button_text_color_dark_p; : R.color.ctx_menu_controller_button_text_color_dark_p;
int icPressed = isLight() ? R.color.ctx_menu_controller_button_text_color_light_n int icPressed = isLight() ? R.color.ctx_menu_controller_button_text_color_light_n
: R.color.ctx_menu_controller_button_bg_color_dark_p; : R.color.ctx_menu_controller_button_bg_color_dark_p;
return AndroidUtils.createStateListDrawable(createPassedIcon(getPassedIconBgNormalColorId(), 0), return AndroidUtils.createPressedStateListDrawable(createPassedIcon(getPassedIconBgNormalColorId(), 0),
createPassedIcon(bgPressed, icPressed)); createPassedIcon(bgPressed, icPressed));
} }
@ -89,7 +89,7 @@ public class MapMarkerMenuController extends MenuController {
int bgPressed = isLight() ? R.color.ctx_menu_controller_button_text_color_light_p int bgPressed = isLight() ? R.color.ctx_menu_controller_button_text_color_light_p
: R.color.ctx_menu_controller_button_text_color_dark_p; : R.color.ctx_menu_controller_button_text_color_dark_p;
int icPressed = isLight() ? R.color.osmand_orange : R.color.route_info_go_btn_bg_dark_p; int icPressed = isLight() ? R.color.osmand_orange : R.color.route_info_go_btn_bg_dark_p;
return AndroidUtils.createStateListDrawable(createShowOnTopbarIcon(getDeviceTopNormalColorId(), R.color.dashboard_blue), return AndroidUtils.createPressedStateListDrawable(createShowOnTopbarIcon(getDeviceTopNormalColorId(), R.color.dashboard_blue),
createShowOnTopbarIcon(bgPressed, icPressed)); createShowOnTopbarIcon(bgPressed, icPressed));
} }

View file

@ -407,9 +407,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
@DrawableRes int itemBg = lightTheme ? R.drawable.keyboard_item_light_bg : R.drawable.keyboard_item_dark_bg; @DrawableRes int itemBg = lightTheme ? R.drawable.keyboard_item_light_bg : R.drawable.keyboard_item_dark_bg;
@DrawableRes int controlItemBg = lightTheme ? R.drawable.keyboard_item_control_light_bg : R.drawable.keyboard_item_control_dark_bg; @DrawableRes int controlItemBg = lightTheme ? R.drawable.keyboard_item_control_light_bg : R.drawable.keyboard_item_control_dark_bg;
ColorStateList clearItemTextColorStateList = AndroidUtils.createColorStateList(getContext(), ColorStateList clearItemTextColorStateList = AndroidUtils.createPressedColorStateList(getContext(),
R.color.keyboard_item_divider_control_color_light, R.color.keyboard_item_divider_control_color_light_pressed); R.color.keyboard_item_divider_control_color_light, R.color.keyboard_item_divider_control_color_light_pressed);
ColorStateList numberColorStateList = AndroidUtils.createColorStateList(getContext(), ColorStateList numberColorStateList = AndroidUtils.createPressedColorStateList(getContext(),
R.color.keyboard_item_text_color_light, R.color.keyboard_item_text_color_light_pressed); R.color.keyboard_item_text_color_light, R.color.keyboard_item_text_color_light_pressed);
@ColorInt int textColorDark = getResolvedColor(R.color.keyboard_item_text_color_dark); @ColorInt int textColorDark = getResolvedColor(R.color.keyboard_item_text_color_dark);

View file

@ -120,7 +120,7 @@ public class CoordinateInputAdapter extends RecyclerView.Adapter<MapMarkerItemVi
private Drawable getRemoveBtnBgSelector() { private Drawable getRemoveBtnBgSelector() {
if (nightTheme) { if (nightTheme) {
return AndroidUtils.createStateListDrawable( return AndroidUtils.createPressedStateListDrawable(
getColoredIcon(R.drawable.marker_circle_background_dark_n_with_inset, R.color.keyboard_item_control_dark_bg), getColoredIcon(R.drawable.marker_circle_background_dark_n_with_inset, R.color.keyboard_item_control_dark_bg),
ContextCompat.getDrawable(mapActivity, R.drawable.marker_circle_background_p_with_inset) ContextCompat.getDrawable(mapActivity, R.drawable.marker_circle_background_p_with_inset)
); );

View file

@ -23,6 +23,7 @@ import net.osmand.IndexConstants;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.wikivoyage.data.WikivoyageArticle; import net.osmand.plus.wikivoyage.data.WikivoyageArticle;
import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper; import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper;
import net.osmand.util.Algorithms;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
@ -62,7 +63,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar)); setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar));
ColorStateList selectedLangColorStateList = AndroidUtils.createColorStateList( ColorStateList selectedLangColorStateList = AndroidUtils.createPressedColorStateList(
getContext(), nightMode, getContext(), nightMode,
R.color.icon_color, R.color.wikivoyage_active_light, R.color.icon_color, R.color.wikivoyage_active_light,
R.color.icon_color, R.color.wikivoyage_active_dark R.color.icon_color, R.color.wikivoyage_active_dark
@ -139,7 +140,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
selectedLang = langs.get(0); selectedLang = langs.get(0);
} }
selectedLangTv.setText(selectedLang); selectedLangTv.setText(Algorithms.capitalizeFirstLetter(selectedLang));
WikivoyageArticle article = getMyApplication().getWikivoyageDbHelper() WikivoyageArticle article = getMyApplication().getWikivoyageDbHelper()
.getArticle(cityId, selectedLang); .getArticle(cityId, selectedLang);
@ -183,7 +184,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
Drawable normal = getContentIcon(R.drawable.ic_action_map_language); Drawable normal = getContentIcon(R.drawable.ic_action_map_language);
if (Build.VERSION.SDK_INT >= 21) { if (Build.VERSION.SDK_INT >= 21) {
Drawable active = getActiveIcon(R.drawable.ic_action_map_language); Drawable active = getActiveIcon(R.drawable.ic_action_map_language);
return AndroidUtils.createStateListDrawable(normal, active); return AndroidUtils.createPressedStateListDrawable(normal, active);
} }
return normal; return normal;
} }

View file

@ -36,9 +36,12 @@ public class WikivoyageBaseDialogFragment extends BaseOsmAndDialogFragment {
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar; int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar;
Dialog dialog = new Dialog(getContext(), themeId); Dialog dialog = new Dialog(getContext(), themeId);
if (Build.VERSION.SDK_INT >= 21) {
Window window = dialog.getWindow(); Window window = dialog.getWindow();
if (window != null) { if (window != null) {
if (!getSettings().DO_NOT_USE_ANIMATIONS.get()) {
window.getAttributes().windowAnimations = R.style.Animations_Alpha;
}
if (Build.VERSION.SDK_INT >= 21) {
window.setStatusBarColor(getResolvedColor(getStatusBarColor())); window.setStatusBarColor(getResolvedColor(getStatusBarColor()));
} }
} }

View file

@ -1,49 +0,0 @@
package net.osmand.plus.wikivoyage;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import net.osmand.plus.R;
import net.osmand.plus.wikivoyage.search.WikivoyageSearchDialogFragment;
public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragment {
public static final String TAG = "WikivoyageExploreDialogFragment";
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View mainView = inflate(R.layout.fragment_wikivoyage_explore_dialog, container);
setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar));
((ImageView) mainView.findViewById(R.id.search_icon))
.setImageDrawable(getContentIcon(R.drawable.ic_action_search_dark));
mainView.findViewById(R.id.search_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
WikivoyageSearchDialogFragment.showInstance(getFragmentManager());
}
});
return mainView;
}
public static boolean showInstance(FragmentManager fm) {
try {
WikivoyageExploreDialogFragment fragment = new WikivoyageExploreDialogFragment();
fragment.show(fm, TAG);
return true;
} catch (RuntimeException e) {
return false;
}
}
}

View file

@ -71,6 +71,12 @@ public class WikivoyageDbHelper {
collator = OsmAndCollator.primaryCollator(); collator = OsmAndCollator.primaryCollator();
} }
@Nullable
private SQLiteConnection openConnection() {
String path = getDbFile(application).getAbsolutePath();
return application.getSQLiteAPI().openByAbsolutePath(path, true);
}
@NonNull @NonNull
public List<WikivoyageSearchResult> search(final String searchQuery) { public List<WikivoyageSearchResult> search(final String searchQuery) {
List<WikivoyageSearchResult> res = new ArrayList<>(); List<WikivoyageSearchResult> res = new ArrayList<>();
@ -188,10 +194,38 @@ public class WikivoyageDbHelper {
return res; return res;
} }
@Nullable @NonNull
private SQLiteConnection openConnection() { public ArrayList<String> getArticleLangs(long cityId) {
String path = getDbFile(application).getAbsolutePath(); ArrayList<String> res = new ArrayList<>();
return application.getSQLiteAPI().openByAbsolutePath(path, true); SQLiteConnection conn = openConnection();
if (conn != null) {
try {
SQLiteCursor cursor = conn.rawQuery("SELECT " + ARTICLES_COL_LANG +
" FROM " + ARTICLES_TABLE_NAME +
" WHERE " + ARTICLES_COL_CITY_ID + " = ?",
new String[]{String.valueOf(cityId)});
if (cursor.moveToFirst()) {
String baseLang = application.getLanguage();
do {
String lang = cursor.getString(0);
if (lang.equals(baseLang)) {
res.add(0, lang);
} else if (lang.equals("en")) {
if (res.size() > 0 && res.get(0).equals(baseLang)) {
res.add(1, lang);
} else {
res.add(0, lang);
}
} else {
res.add(lang);
}
} while (cursor.moveToNext());
}
} finally {
conn.close();
}
}
return res;
} }
@NonNull @NonNull

View file

@ -15,6 +15,8 @@ import gnu.trove.map.hash.TLongObjectHashMap;
public class WikivoyageLocalDataHelper { public class WikivoyageLocalDataHelper {
private static final int HISTORY_ITEMS_LIMIT = 300;
private static WikivoyageLocalDataHelper instance; private static WikivoyageLocalDataHelper instance;
private WikivoyageLocalDataDbHelper dbHelper; private WikivoyageLocalDataDbHelper dbHelper;
@ -70,6 +72,12 @@ public class WikivoyageLocalDataHelper {
} else { } else {
dbHelper.updateHistoryItem(item); dbHelper.updateHistoryItem(item);
} }
if (historyMap.size() > HISTORY_ITEMS_LIMIT) {
List<WikivoyageSearchHistoryItem> allHistory = getAllHistory();
WikivoyageSearchHistoryItem lastItem = allHistory.get(allHistory.size() - 1);
dbHelper.removeHistoryItem(lastItem);
historyMap.remove(lastItem.cityId);
}
} }
private static class WikivoyageLocalDataDbHelper { private static class WikivoyageLocalDataDbHelper {
@ -183,6 +191,18 @@ public class WikivoyageLocalDataHelper {
} }
} }
void removeHistoryItem(WikivoyageSearchHistoryItem item) {
SQLiteConnection conn = openConnection(false);
if (conn != null) {
try {
conn.execSQL("DELETE FROM " + HISTORY_TABLE_NAME + " WHERE " + HISTORY_COL_CITY_ID + " = ?",
new Object[]{item.cityId});
} finally {
conn.close();
}
}
}
private WikivoyageSearchHistoryItem readHistoryItem(SQLiteCursor cursor) { private WikivoyageSearchHistoryItem readHistoryItem(SQLiteCursor cursor) {
WikivoyageSearchHistoryItem res = new WikivoyageSearchHistoryItem(); WikivoyageSearchHistoryItem res = new WikivoyageSearchHistoryItem();

View file

@ -0,0 +1,20 @@
package net.osmand.plus.wikivoyage.explore;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.osmand.plus.R;
import net.osmand.plus.base.BaseOsmAndFragment;
public class ExploreTabFragment extends BaseOsmAndFragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_explore_tab, container, false);
}
}

View file

@ -0,0 +1,20 @@
package net.osmand.plus.wikivoyage.explore;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.osmand.plus.R;
import net.osmand.plus.base.BaseOsmAndFragment;
public class SavedArticlesTabFragment extends BaseOsmAndFragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_saved_articles_tab, container, false);
}
}

View file

@ -0,0 +1,120 @@
package net.osmand.plus.wikivoyage.explore;
import android.content.res.ColorStateList;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.BottomNavigationView.OnNavigationItemSelectedListener;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import net.osmand.AndroidUtils;
import net.osmand.plus.LockableViewPager;
import net.osmand.plus.R;
import net.osmand.plus.wikivoyage.WikivoyageBaseDialogFragment;
import net.osmand.plus.wikivoyage.search.WikivoyageSearchDialogFragment;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragment {
public static final String TAG = "WikivoyageExploreDialogFragment";
private static final int EXPLORE_POSITION = 0;
private static final int SAVED_ARTICLES_POSITION = 1;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View mainView = inflate(R.layout.fragment_wikivoyage_explore_dialog, container);
setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar));
((ImageView) mainView.findViewById(R.id.search_icon))
.setImageDrawable(getContentIcon(R.drawable.ic_action_search_dark));
mainView.findViewById(R.id.search_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
WikivoyageSearchDialogFragment.showInstance(getFragmentManager());
}
});
final LockableViewPager viewPager = (LockableViewPager) mainView.findViewById(R.id.view_pager);
viewPager.setOffscreenPageLimit(2);
viewPager.setSwipeLocked(true);
viewPager.setAdapter(new ViewPagerAdapter(getChildFragmentManager()));
final ColorStateList navColorStateList = createBottomNavColorStateList();
final BottomNavigationView bottomNav = (BottomNavigationView) mainView.findViewById(R.id.bottom_navigation);
bottomNav.setItemIconTintList(navColorStateList);
bottomNav.setItemTextColor(navColorStateList);
bottomNav.setOnNavigationItemSelectedListener(new OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
int position = -1;
switch (item.getItemId()) {
case R.id.action_explore:
position = EXPLORE_POSITION;
break;
case R.id.action_saved_articles:
position = SAVED_ARTICLES_POSITION;
break;
}
if (position != -1 && position != viewPager.getCurrentItem()) {
viewPager.setCurrentItem(position);
return true;
}
return false;
}
});
return mainView;
}
private ColorStateList createBottomNavColorStateList() {
return AndroidUtils.createCheckedColorStateList(getContext(), nightMode,
R.color.icon_color, R.color.wikivoyage_active_light,
R.color.icon_color, R.color.wikivoyage_active_dark);
}
public static boolean showInstance(FragmentManager fm) {
try {
WikivoyageExploreDialogFragment fragment = new WikivoyageExploreDialogFragment();
fragment.show(fm, TAG);
return true;
} catch (RuntimeException e) {
return false;
}
}
private static class ViewPagerAdapter extends FragmentPagerAdapter {
private final List<Fragment> fragments = new ArrayList<>();
ViewPagerAdapter(FragmentManager fm) {
super(fm);
fragments.addAll(Arrays.asList(new ExploreTabFragment(), new SavedArticlesTabFragment()));
}
@Override
public Fragment getItem(int position) {
return fragments.get(position);
}
@Override
public int getCount() {
return fragments.size();
}
}
}

View file

@ -22,6 +22,7 @@ import net.osmand.plus.R;
import net.osmand.plus.wikivoyage.WikivoyageArticleDialogFragment; import net.osmand.plus.wikivoyage.WikivoyageArticleDialogFragment;
import net.osmand.plus.wikivoyage.WikivoyageBaseDialogFragment; import net.osmand.plus.wikivoyage.WikivoyageBaseDialogFragment;
import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper; import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper;
import net.osmand.plus.wikivoyage.data.WikivoyageSearchHistoryItem;
import net.osmand.plus.wikivoyage.data.WikivoyageSearchResult; import net.osmand.plus.wikivoyage.data.WikivoyageSearchResult;
import java.util.ArrayList; import java.util.ArrayList;
@ -106,6 +107,16 @@ public class WikivoyageSearchDialogFragment extends WikivoyageBaseDialogFragment
WikivoyageSearchResult res = (WikivoyageSearchResult) item; WikivoyageSearchResult res = (WikivoyageSearchResult) item;
WikivoyageArticleDialogFragment.showInstance(getFragmentManager(), WikivoyageArticleDialogFragment.showInstance(getFragmentManager(),
res.getCityId(), new ArrayList<>(res.getLangs())); res.getCityId(), new ArrayList<>(res.getLangs()));
} else if (item instanceof WikivoyageSearchHistoryItem) {
WikivoyageSearchHistoryItem historyItem = (WikivoyageSearchHistoryItem) item;
ArrayList<String> langs = getMyApplication().getWikivoyageDbHelper()
.getArticleLangs(historyItem.getCityId());
boolean selectedLangExists = langs.remove(historyItem.getLang());
if (selectedLangExists) {
langs.add(0, historyItem.getLang());
}
WikivoyageArticleDialogFragment.showInstance(getFragmentManager(),
historyItem.getCityId(), langs);
} }
} }
} }