Merge branch 'master' of ssh://github.com/osmandapp/Osmand

Conflicts:
	OsmAnd/res/values/styles.xml
This commit is contained in:
Alexey Pelykh 2015-01-30 15:01:15 +02:00
commit 311c067665
52 changed files with 454 additions and 267 deletions

View file

@ -141,8 +141,8 @@
<activity android:name="net.osmand.plus.activities.search.SearchActivity" android:label="@string/search_activity" />
<activity android:name="net.osmand.plus.activities.ShowRouteInfoActivity" android:label="@string/show_route" />
<activity android:name="net.osmand.plus.activities.FavouritesListActivity" android:label="@string/favourites_list_activity" />
<activity android:name="net.osmand.plus.activities.FavouritesActivity" android:windowSoftInputMode="adjustPan" />
<activity android:name="net.osmand.plus.activities.FavoritesListActivity" android:label="@string/favourites_list_activity" />
<activity android:name="net.osmand.plus.activities.FavoritesActivity" android:windowSoftInputMode="adjustPan" />
<activity android:name="net.osmand.plus.activities.PluginsActivity" />
<activity android:name="net.osmand.plus.activities.ContributionVersionActivity" android:configChanges="keyboardHidden|orientation" android:label="@string/contribution_activity" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_marginTop="?attr/actionBarSize">
<TextView
android:id="@+id/DescriptionText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:text=""
android:visibility="gone" />
<ExpandableListView
android:id="@android:id/list"
style="@style/OsmandListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:groupIndicator="@android:color/transparent"/>
</LinearLayout>

View file

@ -468,7 +468,7 @@
<string name="live_monitoring_interval">Interval for online sporing</string>
<string name="live_monitoring_url_descr">Angiv webadressen med parametersyntaks: lat={0}, long={1}, tidspunkt={2}, hdop={3}, højde={4}, hastighed={5}, kurs={6}</string>
<string name="live_monitoring_url">Webadresse for online sporing</string>
<string name="gpx_monitoring_disabled_warn">Log spor med GPX modul eller via \'Tur optagelse\' indstillinger.</string>
<string name="gpx_monitoring_disabled_warn">Log spor med GPX modul eller via indstillinger \'Tur optagelse\'.</string>
<string name="show_current_gpx_title">Vis aktuelt spor</string>
<string name="free_version_message">Den gratis version af OsmAnd er begrænset til at hente %1$s kort og understøtter ikke offline Wikipedia artikler.</string>
<string name="free_version_title">Gratis version</string>
@ -1005,7 +1005,7 @@
<string name="first_time_continue">Senere</string>
<string name="first_time_download">Hent regioner</string>
<string name="search_poi_location">Søger efter signal…</string>
<string name="search_near_map">Søg i nærheden af nuværende kortcenter</string>
<string name="search_near_map">Søg i nærheden af nuværende midte på kortet</string>
<string name="search_nearby">Søg i nærheden</string>
<string name="map_orientation_default">Samme som enhed</string>
<string name="map_orientation_portrait">Stående</string>
@ -1879,7 +1879,7 @@
<string name="rendering_value__name">Standard</string>
<string name="save_track_to_gpx_globally_headline">On demand sporingslogning</string>
<string name="navigation_over_track">Start navigation langs spor?</string>
<string name="avoid_roads_msg">Du kan generere en alternativ rute ved at vælge veje der skal undgås</string>
<string name="avoid_roads_msg">Generere en alternativ rute ved at vælge veje der skal undgås</string>
<string name="recents">SENESTE</string>
<string name="proxy_pref_title">Proxy</string>
<string name="proxy_pref_descr">Opsæt en proxy til internetkommunikation</string>

View file

@ -1696,4 +1696,11 @@
<string name="use_displayed_track_for_navigation">Θέλετε να χρησιμοποιήσετε το εμφανιζόμενο ίχνος για πλοήγηση;</string>
<string name="route_descr_destination">Προορισμός</string>
<string name="voices">Φωνητικές οδηγίες</string>
<string name="parking_place">Χώρος στάθμευσης</string>
<string name="gps_status">Κατάσταση GPS</string>
<string name="points">Σημεία</string>
<string name="tracks">Ίχνη</string>
<string name="my_location">Η τοποθεσία μου</string>
<string name="recents">ΠΡΟΣΦΑΤΑ</string>
<string name="navigation_over_track">Έναρξη πλοήγησης βάσει ίχνους;</string>
</resources>

View file

@ -1888,13 +1888,13 @@
<string name="rendering_value__name">Por defecto</string>
<string name="save_track_to_gpx_globally_headline">Registro de trazas bajo demanda</string>
<string name="navigation_over_track">¿Empezar navegación sobre traza?</string>
<string name="avoid_roads_msg">Puedes cambiar la ruta seleccionando los caminos a evitar</string>
<string name="avoid_roads_msg">Puedes obtener una ruta alternativa seleccionando las carreteras a evitar</string>
<string name="proxy_pref_title">Proxy</string>
<string name="proxy_pref_descr">Configurar un proxy de acceso a Internet</string>
<string name="settings_privacy">Privacidad</string>
<string name="recents">RECIENTES</string>
<string name="enable_proxy_title">Activar Proxy HTTP</string>
<string name="enable_proxy_descr">Configurar Proxy HTTP para todas las peticiones de red</string>
<string name="enable_proxy_descr">Configura Proxy HTTP para todas las peticiones de red</string>
<string name="proxy_host_title">Host proxy</string>
<string name="proxy_port_title">Puerto del proxy</string>
<string name="proxy_port_descr">Configurar el número de puerto de tu proxy (p.e. 8118)</string>
@ -1904,7 +1904,9 @@
<string name="gps_status">Estado GPS</string>
<string name="rendering_attr_streetLighting_name">Iluminación de la calle</string>
<string name="points">Puntos</string>
<string name="tracks">Pistas</string>
<string name="my_location">Mi localización</string>
<string name="tracks">Trazas</string>
<string name="my_location">Mi ubicación</string>
<string name="osm_editing_manage">Administrar</string>
<string name="parking_place">Área de aparcamiento</string>
<string name="remove_the_tag">QUITA LA ETIQUETA</string>
</resources>

View file

@ -293,7 +293,7 @@
<string name="init_native_library">Inicializuojama aparatinė biblioteka…</string>
<string name="choose_auto_follow_route">Automatinis žemėlapio centravimas</string>
<string name="choose_auto_follow_route_descr">Laikas po kurio žemėlapio vaizdas bus sinchronizuotas su dabartine pozicija</string>
<string name="auto_follow_route_never">Niekada</string>
<string name="auto_follow_route_never">Niekada (spauskite mėlyną rodyklę,jei norite naviguoti rankiniu būdu)</string>
<string name="auto_follow_route_navigation">Automatiškai centruoti tik navigacijos metu</string>
<string name="auto_follow_route_navigation_descr">Automatiškai centruoti žemėlapį tik, kai veikia navigacija.</string>
<string name="auto_follow_location_enabled">Naudojamas automatinis žemėlapio centravimas.</string>
@ -1192,7 +1192,7 @@
<string name="recording_context_menu_delete">Ištrinti įrašą</string>
<string name="recording_context_menu_play">Groti</string>
<string name="recording_description">Įrašas %1$s %2$s prie %3$s</string>
<string name="recording_default_name">įrašas</string>
<string name="recording_default_name">Įrašas</string>
<string name="av_control_start">Įrašyti</string>
<string name="map_widget_av_notes">Audio užrašai</string>
<string name="av_control_stop">Stop</string>
@ -1561,7 +1561,7 @@
<string name="osmo_plugin_description">"OpenStreetMap-Monitoring - pažangus tiesioginis stebėjimas http://osmo.mobi. Suteikia daug galimybių būti stebimam ir stebėti kitus įrenginius. Susikurkite anonimines grupes, bendrinkite vienas kito vietą ir bendraukite. Ši paslauga turi įvairių nustatymų vienkartiniam ir pastoviam sekimui. Anoniminės grupės gyvuoja tik kelias dienas su ribotomis funkcijomis, t.y. nėra nuotolinio valdymo ar grupės administratoriaus. Viso funkcionalumo grupes galima susikurti interneto svetainėje ir tik registruoti vartotojai galės prie jų prieiti. "</string>
<string name="osmo_plugin_name">OsMo (Pažangus tiesioginis stebėjimas)</string>
<string name="osmo_settings">OpenStreetMap stebėjimas</string>
<string name="keep_informing_never">Niekada</string>
<string name="keep_informing_never">Tik rankiniu būdu (spauskite rodyklę)</string>
<string name="keep_informing_descr">Maršruto instrukcijas pakartotinai pranešinėti reguliariais intervalais</string>
<string name="keep_informing">Pakartoti maršruto instrukcijas</string>
<string name="arrival_distance">Pranešimas apie atvykimą</string>
@ -1838,7 +1838,7 @@
<string name="rendering_attr_shareTaxiRoutes_name">Maršrutinis taksi</string>
<string name="rendering_category_hide">Slėpti</string>
<string name="wake_on_voice">Įjungti ekraną</string>
<string name="wake_on_voice_descr">Įjungti ekraną artėjant prie posūkio</string>
<string name="wake_on_voice_descr">Įjungti ekraną (jei išjungtas) artėjant prie posūkio</string>
<string name="lock_screen_request_explanation">%1$s prašo leidimo išjungti ekraną tausojant energiją.</string>
<string name="wake_on_voice_never">Niekada</string>
<string name="osmo_use_https">Naudoti HTTPS</string>
@ -1883,4 +1883,27 @@
<string name="speak_pedestrian">Pranešti apie perėjas</string>
<string name="traffic_warning_pedestrian">Pėčiųjų perėja</string>
<string name="rendering_value__name">Numatytasis</string>
<string name="parking_place">Parkavimo vieta</string>
<string name="remove_the_tag">PAŠALINTI ŽYMĄ</string>
<string name="gps_status">GPS statusas</string>
<string name="version_settings_descr">Atsisiųsti nightly sąrankas</string>
<string name="version_settings">Sąrankos</string>
<string name="rendering_attr_streetLighting_name">Gatvės apšvietimas</string>
<string name="proxy_pref_title">Proksi serveris</string>
<string name="proxy_pref_descr">Prisijungimo prie interneto per proksi serverį nustatymai</string>
<string name="settings_privacy">Privatumas</string>
<string name="points">Taškai</string>
<string name="tracks">Keliai</string>
<string name="my_location">Mano dabatinė vieta</string>
<string name="osm_editing_manage">Valdyti</string>
<string name="recents">PASTARIEJI</string>
<string name="navigation_over_track">Pradėti navigaciją keliu?</string>
<string name="avoid_roads_msg">Galite pasirinkti kitą maršrutą, pažymėdami norimus aplenkti kelius</string>
<string name="save_track_to_gpx_globally_headline">Privalomas kelio log įrašymas</string>
<string name="enable_proxy_title">Įjungti HTTP proksi serverį</string>
<string name="proxy_host_title">Proksi serverio adresas</string>
<string name="proxy_host_descr">Nurodykite jūsų proksi serverio pavadinimą (pvz., 127.0.0.1)</string>
<string name="proxy_port_title">Proksi serverio portas</string>
<string name="proxy_port_descr">Nurodykite jūsų proksi serverio porto numerį (pvz., 8118)</string>
<string name="enable_proxy_descr">Configure HTTP Proxy for all network requests</string>
</resources>

View file

@ -725,7 +725,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="index_name_wiki">PDI Wikipedia mondiale</string>
<string name="update_poi_is_not_available_for_zoom">S\'agiornamentu de sos PDI non est disponìbile pro livellos de zoom bassos</string>
<string name="tip_update_index_t">"Mapas agiorndas sunt fundamentales pro sa visione sena lìnia, pro sa chirca tramite PDI/indiritzu, e pro su nàvigu sena lìnia. OsmAnd frunidi unu gestore de sas mapas pro las isgarrigare e pro chircare pro agiornamentos.
\n\nPro isgarrigare mapas bae in \'Impostaduras\' → \'Gesti documentos mapas\' → \'Isgàrriga\'.
\n\nPro isgarrigare mapas bae in \'Impostaduras\' → \'Amministra documentos de sas mapas\' → \'Isgàrriga\'.
\n\nA pustis chi sa lista globale de sas regiones at a èssere istada isgarrigada, carca in supra de unu ogetu pro isgarrigare o carrigare unu documentu. Pro piaghere nota s\'isseberadore de tiou de documentu in sa parte arta de s\'ischermu pro ischertare su tipu de isgarrigamentu chi boles (mapas regulares, umbraduras de sos rilievos, etc.).
\n\nPodes filtrare sa lista de sas regiones iscrivende carchi lètera, o ischertande s\'optzione \'Impostaduras\' → \'Filtra isgarrigadas \' pro bìere agiornamentos pro petzi sos datos chi tenes giai in su dispositivu.
\n\n\t* Boghes in \'birde\' indicana documentos de datos identicos in su dispositivu e in su server
@ -969,7 +969,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="history_search_desc">Cronologia chircas</string>
<string name="download_link_and_local_description">Carcare inoghe pro iscarrigare o carrigare documentos de mapas sena lìnia.
\nCarca un\'elementu esistente pro bìdere prus minujos, carca e mantène carcau pro deativare o cantzellare. Datos currentes in su dispositivu (%1$s lìberos):</string>
<string name="index_settings_descr">Iscàrriga e gesti sas mapas non in lìnia sarbadas in su dispositivu</string>
<string name="index_settings_descr">Iscàrriga e amministra sas mapas non in lìnia sarbadas in su dispositivu</string>
<string name="map_online_plugin_is_not_installed">Abìlita su plugin pro sas mapas sena lìnia pro ammustrare àteras mitzas</string>
<string name="osmand_monitoring_description">Ammustra sas impostaduras pro fatzilitare sa registratzione in unu documentu GPX o in lìnia impreande uu servìtziu web.</string>
<string name="hide_all_waypoints">Burralos totus</string>
@ -983,7 +983,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="poi_error_info_not_loaded">Informatziones relatas a su nodu non carrigadas</string>
<string name="poi_error_io_error_template">Errore de I/O durante s\'esecutzione de s\'atzione {0}.</string>
<string name="poi_action_succeded_template">Atzione {0} reseddida cumpridamente.</string>
<string name="first_time_msg">Gratzias pro s\'impreu de OsmAnd. Pro meda de sas caraterìsticas de s\'àplicu tènes bisongiu de datos locales sena lìnia, chi podent èssere icarrigadas dae \'Impostaduras\'→\'Gesti sos documentos mapas\'. A pustis at a èssere possìbile ammustrare mapas, chircare indirìtzos, PDI, e agatare trasportos pùblicos.</string>
<string name="first_time_msg">Gratzias pro s\'impreu de OsmAnd. Pro meda de sas caraterìsticas de s\'àplicu tènes bisongiu de datos locales sena lìnia, chi podent èssere icarrigadas dae \'Impostaduras\'→\'Amministra sos documentos de sas mapas\'. A pustis at a èssere possìbile ammustrare mapas, chircare indirìtzos, PDI, e agatare trasportos pùblicos.</string>
<string name="basemap_was_selected_to_download">Sa mapa de base est pedida pro su funtzionamentu curretu de s\'àplicu e est idada ischertada pro s\'iscarrigamentu.</string>
<string name="osmand_extra_settings_description">Ammustra sas impostaduras pro sa cunfiguratzione avantzada de sa mapa (comente aumentare sos minujos) e calicunas de dispositivos dislindados.</string>
<string name="osmand_development_plugin_description">Ammustra impostaduras pro funtzionalidades in isvilupu e debug comente su nàvigu animadu o ammustrare sa prestatzione de su rendering.</string>
@ -1005,7 +1005,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="osm_editing_plugin_description">Ammustra sasimpostaduras netzessàrias pro cuntribuire ad OSM comente sa regorta/muda de sos PDI de OSM, apèrrere/cummentare errores de OSM e inviare documentos GPX registrados (rechedet sas credentziales de OSM).</string>
<string name="play_commands_of_currently_selected_voice">Riprodui sos cumandos de sa boghe como seletzionada</string>
<string name="test_voice_prompts">Proa sos cumandos vocales</string>
<string name="switch_to_raster_map_to_see">Peruna mapa vetoriale est disponìbile pro custa positzione. Ne podes iscarrigare una in Impostaduras (Gesti sos datos mapas), o colare a sas mapas in lìnia (abìlita sas mapas in lìnia pro lu fàghere).</string>
<string name="switch_to_raster_map_to_see">Peruna mapa vetoriale est disponìbile pro custa positzione. Ne podes iscarrigare una in Impostaduras (Amministra sos documentos de sas mapas), o colare a sas mapas in lìnia (abìlita sas mapas in lìnia pro lu fàghere).</string>
<string name="tip_recent_changes_0_7_2_t">"Mudas in sa 0.7.2:
\n\t- Disinnu nativu pro totu sos dispositivos
\n\t- Creatzione sena lìnia de sos PDI
@ -1057,7 +1057,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="local_openstreetmap_upload">Càrriga sa modìfica in OSM</string>
<string name="local_openstreetmap_delete">Burra sa modìfica</string>
<string name="local_openstreetmap_descr_title">Muda asìncrona de OSM:</string>
<string name="local_openstreetmap_settings_descr">Ammustra e gesti sos PDI/errores OSM in intro de su database locale</string>
<string name="local_openstreetmap_settings_descr">Ammustra e amministra sos PDI/errores OSM in intro de su database locale</string>
<string name="live_monitoring_interval_descr">Dislinda s\'intervallu de s\'arrastamentu in lìnia</string>
<string name="live_monitoring_interval">Intervallu de s\'arrastamentu in dereta (in lìnia)</string>
<string name="live_monitoring_url_descr">Dislinda s\'indiritzu ìnternet cun sa sintassi de sos paràmetros: lat={0}, lon={1}, data/ora={2}, hdop={3}, artària={4}, lestresa={5}, àngulu={6}</string>
@ -1072,7 +1072,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="index_name_tts_voice">Indicatziones vocales (TTS-sintetizadas, preferìbiles)</string>
<string name="amenity_type_user_defined">Definidu dae s\'impitadore</string>
<string name="fav_export_confirmation">Esistint documentos cun prefèrridos esportados giai. Los boles remplasare?</string>
<string name="index_settings">Gesti sos documentos de sas mapas</string>
<string name="index_settings">Amministra sos documentos de sas mapas</string>
<string name="user_name_descr">Netzessàriu pro imbiare contributos a openstreetmap.org</string>
<string name="user_password_descr">Netzessària pro imbiare contributos a openstreetmap.org</string>
<string name="osmand_service">Servìtziu \"a reposu\"</string>
@ -1167,7 +1167,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="local_index_items_restored">%1$d de %2$d ogetu/os ativadu/os curretamente.</string>
<string name="local_index_no_items_to_do">Perunu ogetu dae %1$s</string>
<string name="local_index_action_do">Istas pro %1$s %2$s ogetu/os. Sighire?</string>
<string name="local_index_descr_title">Gesti sos documentos de sas mapas</string>
<string name="local_index_descr_title">Amministra sos documentos de sas mapas</string>
<string name="local_index_mi_restore">Ativa</string>
<string name="local_index_mi_backup">Deativa</string>
<string name="local_index_mi_delete">Burra</string>
@ -1675,7 +1675,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="off_router_service_no_gps_available">Su servìtziu de nàvigu a reposu de OsmAnd netzèssitat de su sistema de positzionamentu ativadu.</string>
<string name="tip_recent_changes_0_6_7_t">"Mudas in sa 0.6.7:
\n\t- Gestore datos non in lìnia (iscàrriga, burra, ativa / deativa datos sena lìnia deretamente dae OsmAnd)
\n\t- Puntos prefèrridos e grupos (categoriza, burra, gesti sos prefèrridos)
\n\t- Puntos prefèrridos e grupos (categoriza, burra, amministra sos prefèrridos)
\n\t- GPX Explorer in s\'aplicu (bie minujas de sas rastas, distantzia, lestresa, artària, etc.)
\n\t- Nàvigu GPX (prus optziones, sighi su nàvigu a pustis de un errore (crash), suportu pro sas rutundas)
\n\t- Funtzione pro sarbare s\'àndala in formatu GPX e l\'impreare sena lìnia\n\t- Megiorada sa compidada GPX (logos non pretzisos filtrados e datos pro cuidadu/artària/lestresa sarbados)
@ -1805,7 +1805,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="dash_download_msg_none">Boles iscarrigare una mapa non in lìnia?</string>
<string name="dash_download_msg">As iscarrigadu %1$s mapas</string>
<string name="dash_download_new_one">Iscàrriga una mapa noa</string>
<string name="dash_download_manage">Gesti</string>
<string name="dash_download_manage">Amministra</string>
<string name="rendering_attr_roadStyle_name">Istile disinnu de sas istradas</string>
<string name="rendering_value_default_name">Predefinidu</string>
<string name="rendering_value_orange_name">Arantzu</string>
@ -1838,7 +1838,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
<string name="points">Puntos</string>
<string name="tracks">Rastas</string>
<string name="my_location">Positzione mea</string>
<string name="osm_editing_manage">Gesti</string>
<string name="osm_editing_manage">Amministra</string>
<string name="gps_status">Istadu GPS</string>
<string name="parking_place">Parchègiu</string>
<string name="remove_the_tag">BOGA SU TAG</string>

View file

@ -3,7 +3,7 @@
<color name="actionbar_dark_color">#39464d</color>
<color name="tool_bar_dark_color">#CC080B0D</color>
<color name="actionbar_light_color">#ff8f00</color>
<color name="tool_bar_light_color">#CC080B0D</color>
<color name="tool_bar_light_color">#b4ff8f00</color>
<color name="dashboard_descr_colol">#727272</color>
<color name="dashboard_background">#eaeaea</color>

View file

@ -67,14 +67,25 @@
<style name="OsmandLightTheme" parent="Theme.AppCompat.Light">
<item name="expandable_category_color">@color/group_background</item>
<item name="android:actionDropDownStyle">@style/Widget.LightSpinner</item>
<item name="actionDropDownStyle">@style/Widget.LightSpinner</item>
<item name="reset_image">@drawable/ic_action_delete_light</item> <!-- @drawable/a_1_navigation_cancel_light -->
<item name="windowActionBarOverlay">true</item>
<item name="bottomToolBarColor">@color/tool_bar_light_color</item>
<item name="pstsTabBackground">@color/actionbar_light_color</item>
<item name="pstsUnderlineColor">@color/actionbar_light_color</item>
<item name="pstsIndicatorColor">@color/color_white</item>
<item name="pstsTextColor">@color/color_white</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
<item name="android:actionModeBackground">@color/actionbar_light_color</item>
<item name="actionModeBackground">@color/actionbar_light_color</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
<item name="android:actionModeCloseDrawable">@drawable/action_mode_back</item>
<item name="actionModeCloseDrawable">@drawable/action_mode_back</item>
<item name="android:actionModeStyle">@style/WhiteActionMode</item>
<item name="actionModeStyle">@style/WhiteActionMode</item>
<item name="android:actionMenuTextColor">@color/color_white</item>
<item name="actionMenuTextColor">@color/color_white</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
<item name="card_bg">@drawable/bg_card_light</item>
<item name="ic_action_check">@drawable/ic_action_check_light</item>
<item name="ic_extension">@drawable/ic_extension_light</item>
@ -84,12 +95,18 @@
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
<item name="reset_image">@drawable/ic_action_delete_dark</item> <!-- @drawable/a_1_navigation_cancel_dark -->
<item name="android:actionDropDownStyle">@style/Widget.DarkActionSpinner</item>
<item name="actionDropDownStyle">@style/Widget.DarkActionSpinner</item>
<item name="expandable_category_color">?android:attr/colorBackground</item>
<item name="android:spinnerStyle">@style/Widget.Spinner</item>
<item name="android:spinnerStyle">@style/Widget.DarkSpinner</item>
<item name="windowActionBarOverlay">true</item>
<item name="bottomToolBarColor">@color/tool_bar_dark_color</item>
<item name="pstsTabBackground">@color/actionbar_dark_color</item>
<item name="pstsUnderlineColor">@color/actionbar_dark_color</item>
<item name="pstsIndicatorColor">@color/actionbar_light_color</item>
<item name="pstsTextColor">@color/color_white</item>
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
<item name="actionModeBackground">@color/actionbar_dark_color</item>
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
<item name="card_bg">@drawable/bg_card_dark</item>
@ -125,11 +142,30 @@
<item name="android:textColor">@color/color_white</item>
</style>
<style name="Widget.Spinner" parent="android:Widget">
<item name="android:colorBackground">@color/dashboard_black</item>
<item name="android:clickable">true</item>
<style name="Widget.DarkSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:popupBackground">@color/actionbar_dark_color</item>
<item name="android:textColor">@color/color_white</item>
</style>
<style name="Widget.DarkActionSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:popupBackground">@color/actionbar_dark_color</item>
<item name="android:textColor">@color/color_white</item>
</style>
<style name="Widget.LightSpinner" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:popupBackground">@color/actionbar_light_color</item>
<item name="android:textColor">@color/color_white</item>
</style>
<style name="WhiteActionMode" parent="@style/Widget.AppCompat.ActionMode">
<item name="android:titleTextStyle">@style/WhiteActionModeTitleTextStyle</item>
<item name="titleTextStyle">@style/WhiteActionModeTitleTextStyle</item>
</style>
<style name="WhiteActionModeTitleTextStyle" parent="@style/TextAppearance.AppCompat.Widget.ActionMode.Title">
<item name="android:textColor">@color/color_white</item>
</style>
<!-- Dialog popup -->
<style name="Animations" />
<!-- PopDownMenu -->

View file

@ -1,7 +1,7 @@
package net.osmand.access;
import android.support.v7.app.ActionBarActivity;
import android.view.MotionEvent;
import net.osmand.plus.activities.OsmandActionBarActivity;
// Provide some additional accessibility means for activity view elements.
//
@ -9,7 +9,7 @@ import android.view.MotionEvent;
// and then add view elements you wish to be accessible
// to the accessibleContent list.
//
public class AccessibleActivity extends ActionBarActivity implements AccessibleContent.Callback {
public class AccessibleActivity extends OsmandActionBarActivity implements AccessibleContent.Callback {
// List of accessible views. Use accessibleContent.add(element)
// to add element to it.

View file

@ -10,7 +10,7 @@ import net.osmand.IndexConstants;
import net.osmand.Location;
import net.osmand.data.LocationPoint;
import net.osmand.plus.activities.MainMenuActivity;
import net.osmand.plus.activities.FavouritesActivity;
import net.osmand.plus.activities.FavoritesActivity;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.PluginsActivity;
import net.osmand.plus.activities.SettingsActivity;
@ -60,8 +60,8 @@ public class OsmAndAppCustomization {
return SearchActivity.class;
}
public Class<FavouritesActivity> getFavoritesActivity(){
return FavouritesActivity.class;
public Class<FavoritesActivity> getFavoritesActivity(){
return FavoritesActivity.class;
}
public Class<MainMenuActivity> getMainMenuActivity() {

View file

@ -2,7 +2,9 @@ package net.osmand.plus.activities;
import android.app.Activity;
import android.content.res.TypedArray;
import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
@ -37,20 +39,18 @@ public abstract class ActionBarPreferenceActivity extends PreferenceActivity {
shadowView = null;
}
toolbar.setClickable(true);
toolbar.setNavigationIcon(getResIdFromAttribute(this, R.attr.homeAsUpIndicator));
Drawable back = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
back.setColorFilter(0xffffffff, PorterDuff.Mode.MULTIPLY);
toolbar.setNavigationIcon(back);
toolbar.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
finish();
}
});
if (((OsmandApplication)getApplication()).getSettings().isLightActionBar()){
toolbar.setBackgroundColor(getResources().getColor(R.color.actionbar_light_color));
toolbar.setTitleTextColor(getResources().getColor(R.color.color_white));
} else {
toolbar.setBackgroundColor(getResources().getColor(R.color.actionbar_dark_color));
}
getSpinner().setVisibility(View.GONE);
setProgressVisibility(false);
}

View file

@ -1,7 +1,6 @@
package net.osmand.plus.activities;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.ProgressBar;
@ -9,7 +8,7 @@ import android.widget.ProgressBar;
* Created by Denis
* on 23.01.15.
*/
public class ActionBarProgressActivity extends ActionBarActivity {
public class ActionBarProgressActivity extends OsmandActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {

View file

@ -12,6 +12,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import android.content.pm.ActivityInfo;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.view.ActionMode;
@ -30,6 +31,7 @@ import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.util.Algorithms;
import android.app.Activity;
import android.app.AlertDialog;
@ -131,8 +133,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu = ((FavouritesActivity) getActivity()).getClearToolbar(true).getMenu();
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_dark,
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
searchView = new SearchView(getActivity());
@ -152,6 +154,14 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
});
if (isOrientationPortrait()) {
menu = ((FavoritesActivity) getActivity()).getClearToolbar(true).getMenu();
} else {
((FavoritesActivity) getActivity()).getClearToolbar(false);
}
optionsMenuAdapter = new ContextMenuAdapter(getActivity());
OnContextMenuClick listener = new OnContextMenuClick() {
@Override
@ -162,7 +172,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
} else if (itemId == R.string.show_gpx_route) {
openShowOnMapMode();
} else if (itemId == R.string.local_index_mi_delete) {
openSelectionMode(itemId, R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light,
openSelectionMode(itemId, R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark,
new DialogInterface.OnClickListener() {
@Override
@ -175,23 +185,38 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
};
optionsMenuAdapter.item(R.string.show_gpx_route)
.icons(R.drawable.ic_action_map_marker_dark, R.drawable.ic_action_map_marker_light).listen(listener).reg();
.icons(R.drawable.ic_action_map_marker_dark, R.drawable.ic_action_map_marker_dark).listen(listener).reg();
optionsMenuAdapter.item(R.string.local_index_mi_delete)
.icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light).listen(listener).reg();
.icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark).listen(listener).reg();
optionsMenuAdapter.item(R.string.local_index_mi_reload)
.icons(R.drawable.ic_action_refresh_dark, R.drawable.ic_action_refresh_light).listen(listener).reg();
.icons(R.drawable.ic_action_refresh_dark, R.drawable.ic_action_refresh_dark).listen(listener).reg();
OsmandPlugin.onOptionsMenuActivity(getActivity(), this, optionsMenuAdapter);
for (int j = 0; j < optionsMenuAdapter.length(); j++) {
MenuItem item;
final MenuItem item;
item = menu.add(0, optionsMenuAdapter.getElementId(j), j + 1, optionsMenuAdapter.getItemName(j));
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
if (isOrientationPortrait()){
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
onOptionsItemSelected(item);
return true;
}
});
}
if (optionsMenuAdapter.getImageId(j, isLightActionBar()) != 0) {
item.setIcon(optionsMenuAdapter.getImageId(j, isLightActionBar()));
item.setIcon(optionsMenuAdapter.getImageId(j, false));
}
}
}
private boolean isOrientationPortrait() {
int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
return orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
}
public void doAction(int actionResId) {
if (actionResId == R.string.local_index_mi_delete) {
operationTask = new DeleteGpxTask();
@ -217,12 +242,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
}
public void showProgressBar() {
//getActivity().setSupportProgressBarIndeterminateVisibility(true);
((FavoritesActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(true);
}
public void hideProgressBar() {
if (getActivity() != null){
//getActivity().setSupportProgressBarIndeterminateVisibility(false);
((FavoritesActivity)getActivity()).setSupportProgressBarIndeterminateVisibility(false);
}
}
@ -236,7 +261,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
private void enableSelectionMode(boolean selectionMode) {
this.selectionMode = selectionMode;
((FavouritesActivity)getActivity()).setToolbarVisibility(!selectionMode);
if (isOrientationPortrait()) {
((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode);
}
}
private void openShowOnMapMode() {
@ -251,7 +278,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
enableSelectionMode(true);
updateSelectionMode(mode);
MenuItem it = menu.add(R.string.show_gpx_route);
it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_light);
it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_dark);
MenuItemCompat.setShowAsAction(it, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
@ -674,7 +701,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
View v = convertView;
final GpxInfo child = (GpxInfo) getChild(groupPosition, childPosition);
final GpxInfo child = getChild(groupPosition, childPosition);
if (v == null) {
LayoutInflater inflater = getActivity().getLayoutInflater();
v = inflater.inflate(net.osmand.plus.R.layout.local_index_list_item, parent, false);
@ -881,12 +908,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPreExecute() {
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(true);
getActivity().setProgressBarIndeterminateVisibility(true);
}
@Override
protected void onPostExecute(String result) {
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(false);
getActivity().setProgressBarIndeterminateVisibility(false);
AccessibleToast.makeText(getActivity(), result, Toast.LENGTH_LONG).show();
}
}
@ -933,7 +960,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPostExecute(String result) {
selectedGpxHelper.runUiListeners();
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(false);
getActivity().setProgressBarIndeterminateVisibility(false);
if (showOnMap && toShow != null) {
getMyApplication().getSettings().setMapLocationToShow(toShow.lat, toShow.lon,
getMyApplication().getSettings().getLastKnownMapZoom());
@ -964,13 +991,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment {
@Override
protected void onPreExecute() {
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(true);
getActivity().setProgressBarIndeterminateVisibility(true);
}
@Override
protected void onPostExecute(Void result) {
if (getActivity() != null){
((ActionBarActivity)getActivity()).setProgressBarIndeterminateVisibility(false);
getActivity().setProgressBarIndeterminateVisibility(false);
}
if (info.gpx != null){
getMyApplication().getSelectedGpxHelper().selectGpxFile(info.gpx, selected, true);

View file

@ -32,7 +32,7 @@ import net.osmand.plus.views.controls.PagerSlidingTabStrip;
/**
*
*/
public class FavouritesActivity extends TabActivity {
public class FavoritesActivity extends TabActivity {
private static final String FAVOURITES_INFO = "FAVOURITES_INFO";
private static final String TRACKS = "TRACKS";
@ -51,11 +51,9 @@ public class FavouritesActivity extends TabActivity {
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(icicle);
setSupportProgressBarIndeterminateVisibility(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.favorites_Button);
getSupportActionBar().setElevation(0);
// getSupportActionBar().setTitle("");
// getSupportActionBar().setIcon(R.drawable.tab_search_favorites_icon);
File[] lf = ((OsmandApplication) getApplication()).getAppPath(TRACKS).listFiles();
boolean hasGpx = false;
if(lf != null) {
@ -69,7 +67,7 @@ public class FavouritesActivity extends TabActivity {
if(!hasGpx) {
setContentView(R.layout.search_activity_single);
getSupportFragmentManager().beginTransaction().add(R.id.layout, new FavouritesTreeFragment()).commit();
getSupportFragmentManager().beginTransaction().add(R.id.layout, new FavoritesTreeFragment()).commit();
} else {
setContentView(R.layout.tab_content);
@ -79,7 +77,7 @@ public class FavouritesActivity extends TabActivity {
ViewPager mViewPager = (ViewPager) findViewById(R.id.pager);
List<TabItem> mTabs = new ArrayList<TabItem>();
mTabs.add(getTabIndicator(R.string.my_favorites, FavouritesTreeFragment.class));
mTabs.add(getTabIndicator(R.string.my_favorites, FavoritesTreeFragment.class));
mTabs.add(getTabIndicator(R.string.my_tracks, AvailableGPXFragment.class));
mTabs.add(getTabIndicator(R.string.selected_track, SelectedGPXFragment.class));
@ -98,6 +96,7 @@ public class FavouritesActivity extends TabActivity {
}
updateSelectedTracks();
}
//setupHomeButton();
}
@Override
@ -108,7 +107,7 @@ public class FavouritesActivity extends TabActivity {
@Override
protected void onResume() {
super.onResume();
((OsmandApplication) getApplication()).getSelectedGpxHelper().setUiListener(FavouritesActivity.class,new Runnable() {
((OsmandApplication) getApplication()).getSelectedGpxHelper().setUiListener(FavoritesActivity.class,new Runnable() {
@Override
public void run() {
@ -120,7 +119,7 @@ public class FavouritesActivity extends TabActivity {
@Override
protected void onPause() {
super.onPause();
((OsmandApplication) getApplication()).getSelectedGpxHelper().setUiListener(FavouritesActivity.class, null);
((OsmandApplication) getApplication()).getSelectedGpxHelper().setUiListener(FavoritesActivity.class, null);
}
public void updateSelectedTracks() {

View file

@ -1,21 +1,19 @@
package net.osmand.plus.activities;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import net.osmand.plus.OsmandApplication;
import android.os.Bundle;
public class FavouritesListActivity extends ActionBarActivity {
public class FavoritesListActivity extends OsmandActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (savedInstanceState == null) {
// During initial setup, plug in the details fragment.
FavouritesListFragment details = new FavouritesListFragment();
FavoritesListFragment details = new FavoritesListFragment();
details.setArguments(getIntent().getExtras());
getSupportFragmentManager().beginTransaction().add(android.R.id.content, details).commit();
}

View file

@ -37,7 +37,7 @@ import android.widget.TextView.BufferType;
/**
*
*/
public class FavouritesListFragment extends ListFragment implements SearchActivityChild {
public class FavoritesListFragment extends ListFragment implements SearchActivityChild {
public static final String SELECT_FAVORITE_POINT_INTENT_KEY = "SELECT_FAVORITE_POINT_INTENT_KEY";
public static final int SELECT_FAVORITE_POINT_RESULT_OK = 1;

View file

@ -1,5 +1,6 @@
package net.osmand.plus.activities;
import android.content.pm.ActivityInfo;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.view.ActionMode;
import android.support.v7.widget.SearchView;
@ -30,11 +31,10 @@ import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.activities.search.SearchActivity;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.helpers.WaypointDialogHelper;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.util.MapUtils;
import android.app.Activity;
import android.app.AlertDialog;
@ -62,7 +62,7 @@ import android.widget.TextView;
import android.widget.Toast;
public class FavouritesTreeFragment extends OsmandExpandableListFragment {
public class FavoritesTreeFragment extends OsmandExpandableListFragment {
public static final int SEARCH_ID = -1;
// public static final int EXPORT_ID = 0;
@ -300,15 +300,12 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu = ((FavouritesActivity) getActivity()).getClearToolbar(true).getMenu();
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS
| MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_dark,
R.drawable.ic_action_search_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
searchView = new SearchView(getActivity());
MenuItemCompat.setActionView(mi, searchView);
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
favouritesAdapter.getFilter().filter(query);
@ -322,7 +319,6 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
}
});
MenuItemCompat.setOnActionExpandListener(mi, new MenuItemCompat.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
return true;
@ -337,12 +333,23 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
}
});
int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
boolean portrait = orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
if (portrait) {
menu = ((FavoritesActivity) getActivity()).getClearToolbar(true).getMenu();
} else {
((FavoritesActivity) getActivity()).getClearToolbar(false);
}
if (!MenuItemCompat.isActionViewExpanded(mi)) {
createMenuItem(menu, SHARE_ID, R.string.share_fav, R.drawable.ic_action_gshare_light,
createMenuItem(menu, SHARE_ID, R.string.share_fav, R.drawable.ic_action_gshare_dark,
R.drawable.ic_action_gshare_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
createMenuItem(menu, SELECT_DESTINATIONS_ID, R.string.select_destination_and_intermediate_points, R.drawable.ic_action_flage_light,
createMenuItem(menu, SELECT_DESTINATIONS_ID, R.string.select_destination_and_intermediate_points, R.drawable.ic_action_flage_dark,
R.drawable.ic_action_flage_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
createMenuItem(menu, DELETE_ID, R.string.default_buttons_delete, R.drawable.ic_action_delete_light,
createMenuItem(menu, DELETE_ID, R.string.default_buttons_delete, R.drawable.ic_action_delete_dark,
R.drawable.ic_action_delete_dark, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
// createMenuItem(menu, EXPORT_ID, R.string.export_fav, R.drawable.ic_action_gsave_light,
// R.drawable.ic_action_gsave_dark, MenuItem.SHOW_AS_ACTION_IF_ROOM);
@ -365,7 +372,7 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
enableSelectionMode(true);
createMenuItem(menu, SELECT_DESTINATIONS_ACTION_MODE_ID, R.string.select_destination_and_intermediate_points,
R.drawable.ic_action_flage_light, R.drawable.ic_action_flage_dark,
R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_dark,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
favoritesSelected.clear();
groupsToDelete.clear();
@ -421,7 +428,7 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
enableSelectionMode(true);
createMenuItem(menu, DELETE_ACTION_ID, R.string.default_buttons_delete,
R.drawable.ic_action_delete_light, R.drawable.ic_action_delete_dark,
R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_dark,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
favoritesSelected.clear();
groupsToDelete.clear();
@ -456,7 +463,7 @@ public class FavouritesTreeFragment extends OsmandExpandableListFragment {
private void enableSelectionMode(boolean selectionMode) {
this.selectionMode = selectionMode;
((FavouritesActivity)getActivity()).setToolbarVisibility(!selectionMode);
((FavoritesActivity)getActivity()).setToolbarVisibility(!selectionMode);
}
protected void openChangeGroupDialog(final FavoriteGroup group) {

View file

@ -8,7 +8,6 @@ import java.io.InputStreamReader;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBarActivity;
import android.view.*;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@ -17,7 +16,7 @@ import android.webkit.WebView;
import android.webkit.WebViewClient;
public class HelpActivity extends ActionBarActivity {
public class HelpActivity extends OsmandActionBarActivity {
private static final String FILE_ANDROID_ASSET_HELP = "file:///android_asset/help/";
public static final String URL = "url";
@ -37,7 +36,6 @@ public class HelpActivity extends ActionBarActivity {
}
super.onCreate(savedInstanceState);
wv = new WebView(this);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
String title = getString(R.string.help);
String url = "index.html";
if(getIntent() != null) {

View file

@ -144,6 +144,7 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
protected void onCreate(Bundle savedInstanceState) {
getMyApplication().applyTheme(this);
super.onCreate(savedInstanceState);
haveHomeButton = false;
if (getIntent() != null) {
Intent intent = getIntent();
if (intent.getExtras() != null && intent.getExtras().containsKey(APP_EXIT_KEY)) {

View file

@ -859,16 +859,6 @@ public class MapActivityActions implements DialogProvider {
}).reg();
optionsMenuHelper.item(R.string.configure_map).icons(R.drawable.ic_action_layers_dark, R.drawable.ic_action_layers_light)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
currentDrawer = DrawerType.CONFIGURE_MAP;
prepareConfigureMap();
return false;
}
}).reg();
optionsMenuHelper.item(R.string.show_point_options)
.icons(R.drawable.ic_action_marker_dark, R.drawable.ic_action_marker_light)
.listen(new OnContextMenuClick() {
@ -878,17 +868,16 @@ public class MapActivityActions implements DialogProvider {
return true;
}
}).reg();
optionsMenuHelper.item(R.string.settings_activity)
.icons(R.drawable.ic_action_settings_light, R.drawable.ic_action_settings_dark)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
final Intent settings = new Intent(mapActivity, getMyApplication().getAppCustomization().getSettingsActivity());
mapActivity.startActivity(settings);
return true;
}
}).reg();
optionsMenuHelper.item(R.string.configure_map).icons(R.drawable.ic_action_layers_dark, R.drawable.ic_action_layers_light)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
currentDrawer = DrawerType.CONFIGURE_MAP;
prepareConfigureMap();
return false;
}
}).reg();
optionsMenuHelper.item(R.string.layer_map_appearance).icons(R.drawable.ic_configure_screen_dark, R.drawable.ic_configure_screen_light)
.listen(new OnContextMenuClick() {
@ -899,7 +888,17 @@ public class MapActivityActions implements DialogProvider {
}
}).reg();
optionsMenuHelper.item(R.string.settings_activity)
.icons(R.drawable.ic_action_settings_dark, R.drawable.ic_action_settings_light)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
final Intent settings = new Intent(mapActivity, getMyApplication().getAppCustomization().getSettingsActivity());
mapActivity.startActivity(settings);
return true;
}
}).reg();
//////////// Others
final OsmAndLocationProvider loc = app.getLocationProvider();
// this is development functionality so it should stay preferrably here

View file

@ -5,6 +5,7 @@ import java.text.DecimalFormatSymbols;
import java.util.Locale;
import java.util.StringTokenizer;
import android.content.pm.ActivityInfo;
import android.support.v4.view.MenuItemCompat;
import net.osmand.PlatformUtil;
import net.osmand.data.LatLon;
@ -15,6 +16,7 @@ import net.osmand.plus.activities.search.SearchActivity;
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.dialogs.FavoriteDialogs;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.util.MapUtils;
import android.app.Dialog;
import android.content.Intent;
@ -111,13 +113,21 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
@Override
public void onCreateOptionsMenu(Menu onCreate, MenuInflater inflater) {
OsmandApplication app = (OsmandApplication) getActivity().getApplication();
int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
boolean portrait = orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
boolean light = app.getSettings().isLightActionBar();
Menu menu = onCreate;
if(getActivity() instanceof SearchActivity) {
menu = ((SearchActivity) getActivity()).getClearToolbar(true).getMenu();
if (portrait) {
menu = ((SearchActivity) getActivity()).getClearToolbar(true).getMenu();
} else {
((SearchActivity) getActivity()).getClearToolbar(false);
}
light = false;
}
MenuItem menuItem = menu.add(0, NAVIGATE_TO, 0, R.string.context_menu_item_directions_to);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_gdirections_light : R.drawable.ic_action_gdirections_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@ -130,12 +140,12 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
TargetPointsHelper targets = app.getTargetPointsHelper();
if (targets.getPointToNavigate() != null) {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_intermediate_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_flage_light
: R.drawable.ic_action_flage_dark);
} else {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_destination_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_flag_light
: R.drawable.ic_action_flag_dark);
}
@ -148,7 +158,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
});
//}
menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.search_shown_on_map);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_marker_light : R.drawable.ic_action_marker_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@ -160,7 +170,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
});
menuItem = menu.add(0, ADD_TO_FAVORITE, 0, R.string.add_to_favourite);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_fav_light : R.drawable.ic_action_fav_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {

View file

@ -0,0 +1,50 @@
package net.osmand.plus.activities;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.ViewGroup;
import net.osmand.plus.R;
/**
* Created by Denis
* on 28.01.15.
*/
public class OsmandActionBarActivity extends ActionBarActivity {
protected boolean haveHomeButton = true;
//should be called after set content view
protected void setupHomeButton(){
Drawable back = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
back.setColorFilter(0xffffffff, PorterDuff.Mode.MULTIPLY);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(back);
}
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
if (haveHomeButton) {
setupHomeButton();
}
}
@Override
public void setContentView(View view) {
super.setContentView(view);
if (haveHomeButton) {
setupHomeButton();
}
}
@Override
public void setContentView(View view, ViewGroup.LayoutParams params) {
super.setContentView(view, params);
if (haveHomeButton) {
setupHomeButton();
}
}
}

View file

@ -23,7 +23,6 @@ public abstract class OsmandExpandableListActivity extends
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

View file

@ -25,7 +25,6 @@ public abstract class OsmandListActivity extends
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

View file

@ -40,7 +40,6 @@ public class PrintDialogActivity extends ActionBarProgressActivity {
}
super.onCreate(icicle);
setSupportProgressBarIndeterminateVisibility(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.print_route);
setContentView(R.layout.print_dialog);

View file

@ -243,7 +243,7 @@ public class SelectedGPXFragment extends OsmandExpandableListFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
((FavouritesActivity) getActivity()).getClearToolbar(false);
((FavoritesActivity) getActivity()).getClearToolbar(false);
// MenuItem mi = createMenuItem(menu, SEARCH_ID, R.string.search_poi_filter, R.drawable.ic_action_search_light,
// R.drawable.ic_action_search_dark, MenuItem.SHOW_AS_ACTION_ALWAYS
// | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);

View file

@ -40,8 +40,6 @@ public class SettingsActivity extends SettingsBaseActivity {
PreferenceScreen screen = getPreferenceScreen();
localIndexes =(Preference) screen.findPreference("local_indexes");
localIndexes.setOnPreferenceClickListener(this);
// bidforfix = (Preference) screen.findPreference("bidforfix");
// bidforfix.setOnPreferenceClickListener(this);
plugins = (Preference) screen.findPreference("plugins");
plugins.setOnPreferenceClickListener(this);
general = (Preference) screen.findPreference("general_settings");

View file

@ -9,6 +9,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.preference.*;
import android.view.MenuItem;
import android.widget.AdapterView;

View file

@ -384,8 +384,8 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
registerListPreference(
settings.OSMAND_THEME, misc,
new String[] { "Dark", "Light", "Dark ActionBar" }, new Integer[] { OsmandSettings.OSMAND_DARK_THEME,
OsmandSettings.OSMAND_LIGHT_THEME, OsmandSettings.OSMAND_LIGHT_DARK_ACTIONBAR_THEME });
new String[] { "Dark", "Light" }, new Integer[] { OsmandSettings.OSMAND_DARK_THEME,
OsmandSettings.OSMAND_LIGHT_THEME});
misc.addPreference(createCheckBoxPreference(settings.USE_KALMAN_FILTER_FOR_COMPASS, R.string.use_kalman_filter_compass, R.string.use_kalman_filter_compass_descr));

View file

@ -16,8 +16,8 @@ import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.FavouritesListActivity;
import net.osmand.plus.activities.FavouritesListFragment;
import net.osmand.plus.activities.FavoritesListActivity;
import net.osmand.plus.activities.FavoritesListFragment;
import net.osmand.plus.activities.NavigatePointFragment;
import net.osmand.plus.activities.TabActivity;
import net.osmand.plus.views.controls.PagerSlidingTabStrip;
@ -84,7 +84,6 @@ public class SearchActivity extends TabActivity implements OsmAndLocationListene
settings = ((OsmandApplication) getApplication()).getSettings();
Integer tab = settings.SEARCH_TAB.get();
showOnlyOneTab = getIntent() != null && getIntent().getBooleanExtra(SHOW_ONLY_ONE_TAB, false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("");
getSupportActionBar().setElevation(0);
@ -172,7 +171,7 @@ public class SearchActivity extends TabActivity implements OsmAndLocationListene
} else if(tab == TRANSPORT_TAB_INDEX) {
return SearchTransportFragment.class;
} else if(tab == FAVORITES_TAB_INDEX) {
return FavouritesListFragment.class;
return FavoritesListFragment.class;
}
return SearchPoiFilterFragment.class;
}
@ -219,9 +218,9 @@ public class SearchActivity extends TabActivity implements OsmAndLocationListene
if (position == POSITION_LAST_MAP_VIEW) {
updateSearchPoint(settings.getLastKnownMapLocation(), getString(R.string.select_search_position) + " " + getString(R.string.search_position_map_view), false);
} else if (position == POSITION_FAVORITES) {
Intent intent = new Intent(SearchActivity.this, FavouritesListActivity.class);
Intent intent = new Intent(SearchActivity.this, FavoritesListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.putExtra(FavouritesListFragment.SELECT_FAVORITE_POINT_INTENT_KEY, (Serializable) null);
intent.putExtra(FavoritesListFragment.SELECT_FAVORITE_POINT_INTENT_KEY, (Serializable) null);
startActivityForResult(intent, REQUEST_FAVORITE_SELECT);
getSupportActionBar().setSelectedNavigationItem(0);
} else if (position == POSITION_ADDRESS) {
@ -250,8 +249,8 @@ public class SearchActivity extends TabActivity implements OsmAndLocationListene
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode == REQUEST_FAVORITE_SELECT && resultCode == FavouritesListFragment.SELECT_FAVORITE_POINT_RESULT_OK){
FavouritePoint p = (FavouritePoint) data.getSerializableExtra(FavouritesListFragment.SELECT_FAVORITE_POINT_INTENT_KEY);
if(requestCode == REQUEST_FAVORITE_SELECT && resultCode == FavoritesListFragment.SELECT_FAVORITE_POINT_RESULT_OK){
FavouritePoint p = (FavouritePoint) data.getSerializableExtra(FavoritesListFragment.SELECT_FAVORITE_POINT_INTENT_KEY);
if (p != null) {
LatLon latLon = new LatLon(p.getLatitude(), p.getLongitude());
updateSearchPoint(latLon, getString(R.string.select_search_position) + " " + p.getName(), false);

View file

@ -1,14 +1,14 @@
package net.osmand.plus.activities.search;
import android.os.Build;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import net.osmand.plus.OsmandApplication;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import net.osmand.plus.activities.OsmandActionBarActivity;
public class SearchAddressActivity extends ActionBarActivity {
public class SearchAddressActivity extends OsmandActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -17,7 +17,6 @@ public class SearchAddressActivity extends ActionBarActivity {
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
}
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (savedInstanceState == null) {
// During initial setup, plug in the details fragment.
SearchAddressFragment details = new SearchAddressFragment();

View file

@ -1,12 +1,10 @@
package net.osmand.plus.activities.search;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import android.content.pm.ActivityInfo;
import android.support.v4.app.Fragment;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@ -20,6 +18,7 @@ import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.dialogs.FavoriteDialogs;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.plus.resources.RegionAddressRepository;
import net.osmand.util.Algorithms;
import android.app.Dialog;
@ -72,7 +71,7 @@ public class SearchAddressFragment extends Fragment {
cityButton = (Button) findViewById(R.id.CityButton);
countryButton = (Button) findViewById(R.id.CountryButton);
buildingButton = (Button) findViewById(R.id.BuildingButton);
osmandSettings = ((OsmandApplication) getApplication()).getSettings();
osmandSettings = getApplication().getSettings();
attachListeners();
setHasOptionsMenu(true);
return view;
@ -82,10 +81,18 @@ public class SearchAddressFragment extends Fragment {
@Override
public void onCreateOptionsMenu(Menu onCreate, MenuInflater inflater) {
boolean light = ((OsmandApplication) getApplication()).getSettings().isLightActionBar();
boolean light = getApplication().getSettings().isLightActionBar();
Menu menu = onCreate;
int orientation = ScreenOrientationHelper.getScreenOrientation(getActivity());
boolean portrait = orientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ||
orientation == ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
if(getActivity() instanceof SearchActivity) {
menu = ((SearchActivity) getActivity()).getClearToolbar(true).getMenu();
if (portrait) {
menu = ((SearchActivity) getActivity()).getClearToolbar(true).getMenu();
} else {
((SearchActivity) getActivity()).getClearToolbar(false);
}
light = false;
}
if(getActivity() instanceof SearchAddressActivity) {
MenuItem menuItem = menu.add(0, SELECT_POINT, 0, "");
@ -100,7 +107,7 @@ public class SearchAddressFragment extends Fragment {
});
} else {
MenuItem menuItem = menu.add(0, NAVIGATE_TO, 0, R.string.context_menu_item_directions_to);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_gdirections_light : R.drawable.ic_action_gdirections_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@ -109,14 +116,14 @@ public class SearchAddressFragment extends Fragment {
return true;
}
});
TargetPointsHelper targets = ((OsmandApplication) getApplication()).getTargetPointsHelper();
TargetPointsHelper targets = getApplication().getTargetPointsHelper();
if (targets.getPointToNavigate() != null) {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_intermediate_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_flage_light : R.drawable.ic_action_flage_dark);
} else {
menuItem = menu.add(0, ADD_WAYPOINT, 0, R.string.context_menu_item_destination_point);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_flag_light : R.drawable.ic_action_flag_dark);
}
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@ -127,7 +134,7 @@ public class SearchAddressFragment extends Fragment {
}
});
menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.search_shown_on_map);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_marker_light : R.drawable.ic_action_marker_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@ -139,8 +146,8 @@ public class SearchAddressFragment extends Fragment {
});
menuItem = menu.add(0, ADD_TO_FAVORITE, 0, R.string.add_to_favourite);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_fav_light : R.drawable.ic_action_fav_dark);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(R.drawable.ic_action_fav_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@ -150,7 +157,7 @@ public class SearchAddressFragment extends Fragment {
}
});
menuItem = menu.add(0, ONLINE_SEARCH, 0, R.string.search_online_address);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
menuItem = menuItem.setIcon(light ? R.drawable.ic_action_gnext_light : R.drawable.ic_action_gnext_dark);
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
@ -473,7 +480,7 @@ public class SearchAddressFragment extends Fragment {
street = null;
building = null;
region = osmandSettings.getLastSearchedRegion();
RegionAddressRepository reg = ((OsmandApplication)getApplication()).getResourceManager().getRegionRepository(region);
RegionAddressRepository reg = getApplication().getResourceManager().getRegionRepository(region);
if(reg != null && reg.useEnglishNames() != osmandSettings.usingEnglishNames()){
reg.setUseEnglishNames(osmandSettings.usingEnglishNames());
}

View file

@ -85,8 +85,6 @@ public abstract class SearchByNameAbstractActivity<T> extends OsmandListActivity
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
}
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.search_activity);
getSupportActionBar().setIcon(R.drawable.tab_search_address_icon);
}

View file

@ -2,18 +2,16 @@ package net.osmand.plus.dashboard;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.*;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.activities.OsmandActionBarActivity;
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
import java.util.ArrayList;
@ -23,7 +21,7 @@ import java.util.List;
* Created by Denis
* on 23.12.2014.
*/
public class DashAudioVideoNotesActivity extends ActionBarActivity {
public class DashAudioVideoNotesActivity extends OsmandActionBarActivity {
AudioVideoNotesPlugin plugin;
List<AudioVideoNotesPlugin.Recording> items;
NotesAdapter listAdapter;
@ -42,8 +40,7 @@ public class DashAudioVideoNotesActivity extends ActionBarActivity {
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(R.string.audionotes_plugin_name);
actionBar.setIcon(android.R.color.transparent);
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
findViewById(android.R.id.list).setBackgroundColor(getResources().getColor(R.color.dashboard_background));
}

View file

@ -5,12 +5,12 @@ import java.util.LinkedHashSet;
import java.util.Set;
import android.os.Build;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import net.osmand.IndexConstants;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.OsmandActionBarActivity;
import net.osmand.plus.voice.AbstractPrologCommandPlayer;
import net.osmand.plus.voice.CommandBuilder;
import net.osmand.plus.voice.CommandPlayer;
@ -36,7 +36,7 @@ import android.widget.Toast;
/**
* Test Voice activity
*/
public class TestVoiceActivity extends ActionBarActivity {
public class TestVoiceActivity extends OsmandActionBarActivity {
@ -48,8 +48,7 @@ public class TestVoiceActivity extends ActionBarActivity {
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
}
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final OsmandApplication app = ((OsmandApplication) getApplication());

View file

@ -8,6 +8,8 @@ import java.util.Map;
import android.app.FragmentManager;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.support.v4.app.FragmentPagerAdapter;
import net.osmand.IndexConstants;
import net.osmand.plus.OsmandApplication;
@ -151,9 +153,6 @@ public class DownloadActivity extends BaseDownloadActivity {
}
}
changeType(downloadTypes.get(0));
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

View file

@ -149,8 +149,7 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment {
if (getMyApplication().getAppCustomization().showDownloadExtraActions()) {
if (SHOW_ONLY_RELOAD) {
MenuItem item = menu.add(0, RELOAD_ID, 0, R.string.update_downlod_list);
item.setIcon(isLightActionBar() ? R.drawable.ic_action_refresh_light :
R.drawable.ic_action_refresh_dark);
item.setIcon(R.drawable.ic_action_refresh_dark);
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
} else {
SubMenu s = menu.addSubMenu(0, MORE_ID, 0, R.string.default_buttons_other_actions);

View file

@ -501,16 +501,16 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
}
};
optionsMenuAdapter.item(R.string.local_index_mi_reload)
.icons(R.drawable.ic_action_refresh_dark, R.drawable.ic_action_refresh_light)
.icon(R.drawable.ic_action_refresh_dark)
.listen(listener).position(1).reg();
optionsMenuAdapter.item(R.string.local_index_mi_backup)
.icons(R.drawable.ic_action_undo_dark, R.drawable.ic_action_undo_light)
.icon(R.drawable.ic_action_undo_dark)
.listen(listener).position(2).reg();
optionsMenuAdapter.item(R.string.local_index_mi_restore)
.icons(R.drawable.ic_action_redo_dark, R.drawable.ic_action_redo_dark)
.icon(R.drawable.ic_action_redo_dark)
.listen(listener).position(3).reg();
optionsMenuAdapter.item(R.string.local_index_mi_delete)
.icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light)
.icon(R.drawable.ic_action_delete_dark)
.listen(listener).position(4).reg();
OsmandPlugin.onOptionsMenuActivity(getDownloadActivity(), null, optionsMenuAdapter);
// doesn't work correctly

View file

@ -107,8 +107,7 @@ public class UpdatesIndexFragment extends ListFragment {
if (getMyApplication().getAppCustomization().showDownloadExtraActions()) {
MenuItem item = menu.add(0, DownloadIndexFragment.RELOAD_ID, 0, R.string.update_downlod_list);
item.setIcon(isLightActionBar() ? R.drawable.ic_action_refresh_light :
R.drawable.ic_action_refresh_dark);
item.setIcon(R.drawable.ic_action_refresh_dark);
MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
SubMenu s = menu.addSubMenu(0, DownloadIndexFragment.MORE_ID, 0, R.string.default_buttons_other_actions);
s.add(0, DownloadIndexFragment.SELECT_ALL_ID, 0, R.string.select_all);

View file

@ -0,0 +1,77 @@
package net.osmand.plus.helpers;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Surface;
import net.osmand.PlatformUtil;
/**
* Created by dummy on 28.01.15.
*/
public class ScreenOrientationHelper {
public static int getScreenOrientation(Activity activity) {
int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();
DisplayMetrics dm = new DisplayMetrics();
activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
int width = dm.widthPixels;
int height = dm.heightPixels;
int orientation;
// if the device's natural orientation is portrait:
if ((rotation == Surface.ROTATION_0
|| rotation == Surface.ROTATION_180) && height > width ||
(rotation == Surface.ROTATION_90
|| rotation == Surface.ROTATION_270) && width > height) {
switch(rotation) {
case Surface.ROTATION_0:
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
case Surface.ROTATION_90:
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
case Surface.ROTATION_180:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
break;
case Surface.ROTATION_270:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
break;
default:
Log.e(PlatformUtil.TAG, "Unknown screen orientation. Defaulting to " +
"portrait.");
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
}
}
// if the device's natural orientation is landscape or if the device
// is square:
else {
switch(rotation) {
case Surface.ROTATION_0:
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
case Surface.ROTATION_90:
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
case Surface.ROTATION_180:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
break;
case Surface.ROTATION_270:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
break;
default:
Log.e(PlatformUtil.TAG, "Unknown screen orientation. Defaulting to " +
"landscape.");
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
}
}
return orientation;
}
}

View file

@ -183,13 +183,13 @@ public class OsmEditingPlugin extends OsmandPlugin {
if (fragment instanceof AvailableGPXFragment) {
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)
.icons(R.drawable.ic_action_gup_dark, R.drawable.ic_action_gup_light)
.icon(R.drawable.ic_action_gup_dark)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
f.openSelectionMode(R.string.local_index_mi_upload_gpx, R.drawable.ic_action_gup_dark,
R.drawable.ic_action_gup_light, new OnClickListener() {
R.drawable.ic_action_gup_dark, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
List<GpxInfo> selectedItems = f.getSelectedItems();

View file

@ -138,7 +138,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
new OsMoIntentHandler(app, osMoPlugin).execute(getIntent());
}
}
setContentView(R.layout.expandable_list);
setContentView(R.layout.osmo_group_list);
getSupportActionBar().setTitle(R.string.osmo_activity);
setSupportProgressBarIndeterminateVisibility(false);
setupHeader();
@ -952,13 +952,13 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
0, 0,/*R.drawable.ic_action_marker_light,*/
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
createMenuItem(menu, SHARE_SESSION, R.string.osmo_share_session,
R.drawable.ic_action_gshare_light, R.drawable.ic_action_gshare_dark,
R.drawable.ic_action_gshare_dark, R.drawable.ic_action_gshare_dark,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
createMenuItem(menu, CREATE_GROUP, R.string.osmo_create_group,
R.drawable.ic_action_plus_light, R.drawable.ic_action_plus_dark,
R.drawable.ic_action_plus_dark, R.drawable.ic_action_plus_dark,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
createMenuItem(menu, SETTINGS_ID, R.string.settings,
R.drawable.ic_action_settings_light, R.drawable.ic_action_settings_dark,
R.drawable.ic_action_settings_dark, R.drawable.ic_action_settings_dark,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
return super.onCreateOptionsMenu(menu);
}

View file

@ -46,6 +46,7 @@ public class RendererRegistry {
internalRenderers.put("LightRS", "LightRS" + ".render.xml");
internalRenderers.put("High-contrast-roads", "High-contrast-roads" + ".render.xml");
internalRenderers.put("Winter-and-ski", "Winter-and-ski" + ".render.xml");
internalRenderers.put("Nautical", "nautical" + ".render.xml");
}
public RenderingRulesStorage defaultRender() {

View file

@ -5,12 +5,12 @@ import java.util.WeakHashMap;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import net.osmand.data.LatLon;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.OsmandActionBarActivity;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.sherpafy.TourInformation.StageFavorite;
import net.osmand.plus.sherpafy.TourInformation.StageInformation;
@ -33,7 +33,7 @@ import android.widget.TextView;
/**
*/
public class TourViewActivity extends ActionBarActivity {
public class TourViewActivity extends OsmandActionBarActivity {
private enum viewState {
STATE_LOADING,
@ -81,8 +81,6 @@ public class TourViewActivity extends ActionBarActivity {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setTitle(R.string.sherpafy_app_name);
setContentView(R.layout.sherpafy_browse_tour);

View file

@ -13,6 +13,7 @@ import net.osmand.plus.OsmandSettings;
import net.osmand.plus.OsmandSettings.CommonPreference;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.helpers.WaypointDialogHelper;
import net.osmand.plus.views.controls.MapRoutePlanControl;
@ -91,7 +92,7 @@ public class MapControlsLayer extends OsmandMapLayer {
// default buttons
zoomControls = init(new MapZoomControls(mapActivity, showUIHandler, scaleCoefficient), parent,
rightGravity);
if (getScreenOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT){
if (ScreenOrientationHelper.getScreenOrientation(mapActivity) == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT){
zoomSideControls = init(new MapZoomControls(mapActivity, showUIHandler, scaleCoefficient), parent,
rightCenterGravity);
} else {
@ -335,66 +336,5 @@ public class MapControlsLayer extends OsmandMapLayer {
mapInfoNavigationControl.setShowDialog();
}
private int getScreenOrientation() {
int rotation = mapActivity.getWindowManager().getDefaultDisplay().getRotation();
DisplayMetrics dm = new DisplayMetrics();
mapActivity.getWindowManager().getDefaultDisplay().getMetrics(dm);
int width = dm.widthPixels;
int height = dm.heightPixels;
int orientation;
// if the device's natural orientation is portrait:
if ((rotation == Surface.ROTATION_0
|| rotation == Surface.ROTATION_180) && height > width ||
(rotation == Surface.ROTATION_90
|| rotation == Surface.ROTATION_270) && width > height) {
switch(rotation) {
case Surface.ROTATION_0:
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
case Surface.ROTATION_90:
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
case Surface.ROTATION_180:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
break;
case Surface.ROTATION_270:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
break;
default:
Log.e(PlatformUtil.TAG, "Unknown screen orientation. Defaulting to " +
"portrait.");
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
}
}
// if the device's natural orientation is landscape or if the device
// is square:
else {
switch(rotation) {
case Surface.ROTATION_0:
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
case Surface.ROTATION_90:
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
case Surface.ROTATION_180:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
break;
case Surface.ROTATION_270:
orientation =
ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
break;
default:
Log.e(PlatformUtil.TAG, "Unknown screen orientation. Defaulting to " +
"landscape.");
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
break;
}
}
return orientation;
}
}

View file

@ -3,13 +3,10 @@ package net.osmand.plus.views.controls;
import java.util.ArrayList;
import java.util.List;
import android.graphics.Point;
import android.os.SystemClock;
import android.view.*;
import net.osmand.data.FavouritePoint;
import net.osmand.data.LatLon;
import net.osmand.data.RotatedTileBox;
import net.osmand.data.RotatedTileBox.RotatedTileBoxBuilder;
import net.osmand.plus.OsmAndLocationProvider;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
@ -17,8 +14,7 @@ import net.osmand.plus.development.OsmandDevelopmentPlugin;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.activities.FavouritesListFragment.FavouritesAdapter;
import net.osmand.plus.activities.IntermediatePointsDialog;
import net.osmand.plus.activities.FavoritesListFragment.FavouritesAdapter;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.ShowRouteInfoActivity;
import net.osmand.plus.routing.RouteDirectionInfo;

View file

@ -43,6 +43,7 @@ import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.plus.R;
import net.osmand.plus.helpers.FontCache;
import java.util.Locale;
@ -50,7 +51,7 @@ import java.util.Locale;
public class PagerSlidingTabStrip extends HorizontalScrollView {
private static final float OPAQUE = 1.0f;
private static final float HALF_TRANSP = 0.5f;
private static final float HALF_TRANSP = 0.6f;
public interface CustomTabProvider {
public View getCustomTabView(ViewGroup parent, int position);
@ -110,7 +111,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private int tabPadding = 12;
private int tabTextSize = 14;
private int tabTextColor = 0;
private float tabTextAlpha = OPAQUE;
private float tabTextAlpha = HALF_TRANSP;
private float tabTextSelectedAlpha = OPAQUE;
private int padding = 0;
@ -120,8 +121,8 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
private boolean isPaddingMiddle = false;
private Typeface tabTypeface = null;
private int tabTypefaceStyle = Typeface.BOLD;
private int tabTypefaceSelectedStyle = Typeface.BOLD;
private int tabTypefaceStyle = Typeface.NORMAL;
private int tabTypefaceSelectedStyle = Typeface.NORMAL;
private int scrollOffset;
private int lastScrollX = 0;
@ -159,13 +160,7 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
// get system attrs (android:textSize and android:textColor)
TypedArray a = context.obtainStyledAttributes(attrs, ATTRS);
tabTextSize = a.getDimensionPixelSize(TEXT_SIZE_INDEX, tabTextSize);
ColorStateList colorStateList = a.getColorStateList(TEXT_COLOR_INDEX);
int textPrimaryColor = a.getColor(TEXT_COLOR_PRIMARY, android.R.color.white);
// if (colorStateList != null) {
// tabTextColor = colorStateList;
// } else {
// tabTextColor = getColorStateList(textPrimaryColor);
// }
underlineColor = textPrimaryColor;
dividerColor = textPrimaryColor;
@ -195,8 +190,9 @@ public class PagerSlidingTabStrip extends HorizontalScrollView {
isPaddingMiddle = a.getBoolean(R.styleable.PagerSlidingTabStrip_pstsPaddingMiddle, isPaddingMiddle);
tabTypefaceStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextStyle, Typeface.BOLD);
tabTypefaceSelectedStyle = a.getInt(R.styleable.PagerSlidingTabStrip_pstsTextSelectedStyle, Typeface.BOLD);
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, OPAQUE);
tabTextAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextAlpha, HALF_TRANSP);
tabTextSelectedAlpha = a.getFloat(R.styleable.PagerSlidingTabStrip_pstsTextSelectedAlpha, OPAQUE);
tabTypeface = FontCache.getRobotoMedium(context);
a.recycle();
setMarginBottomTabContainer();