From 812d010b1365459322c295cb8d882a2d6e7c4b75 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 16 Jul 2013 01:43:40 +0200 Subject: [PATCH] Add profile dialog to settings --- OsmAnd/res/drawable-hdpi/ic_browse_map.png | Bin 0 -> 4498 bytes OsmAnd/res/drawable-mdpi/ic_browse_map.png | Bin 0 -> 2651 bytes OsmAnd/res/drawable-xhdpi/ic_browse_map.png | Bin 0 -> 6547 bytes OsmAnd/res/layout/mode_toggles.xml | 2 +- .../plus/activities/MapActivityActions.java | 10 ++-- .../plus/activities/SettingsBaseActivity.java | 46 ++++++++++++++---- .../SettingsNavigationActivity.java | 4 ++ .../SettingsMonitoringActivity.java | 1 + 8 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 OsmAnd/res/drawable-hdpi/ic_browse_map.png create mode 100644 OsmAnd/res/drawable-mdpi/ic_browse_map.png create mode 100644 OsmAnd/res/drawable-xhdpi/ic_browse_map.png diff --git a/OsmAnd/res/drawable-hdpi/ic_browse_map.png b/OsmAnd/res/drawable-hdpi/ic_browse_map.png new file mode 100644 index 0000000000000000000000000000000000000000..5526afb7b70c2877380a25528c7192a91c4525af GIT binary patch literal 4498 zcmb_g=Q|sY;|xJbZLzgx?LFF~iGzdNdi55g)ZLyuL#VD>BqJmixo4RS-n<38hC4^MYbdE*{5?XA}wt-gsR z#jFvM$`HmK%u^c+&jMgW;Kg>_l=RXtW$~j2=Z0%MDh{c1dvyC>i8wU>ub8#ka&RYneY!s8JG*9;GXc1y;;`p2nt~=8+p%f_) zq-Zpm>VX_QQjFbK;xh(VrzWuB&lBh`V)yG;Ze0dJO%kE?7E{J@u3a2wU!O&N@T;T1 zdD$mIb%t*h9xE2aP@U~@M3EuBatIG~D>NWitN&ciI;YmF0+q@_feg zg#-r;Asnyle6FkAulBkh(svO8LDhRY5s<8}gf#%sWO7KL9MYY;fhGZXXr0Fynunzm$F0?8lz66C{>Mav_cC5+p9By!mbj&6h8nwz|Ji{WwR} z36_yZ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aGO%pxN2+2r`EjoaCNS2>dZ_?#3JVN_cP{cQP=kpUv+wkmh)zb{{zfAL z#bXvIelI9ap)Y&~Kf;;V4@X>sV~=c~Q4SF*Qb?B50ARS0^-=}^yR!iHRuf&UV!Qv- zQpm5sFc0$__O9q)Yr4|oq~*b!+cBpj-T)k*!*X*p5e;_ku9hZpfYdj94hv<>e24TZ~>gygee`xNgRYKX9J1)cw9Xb^Rd z)DM4#UlgES`9P>U6pk;c2AgtgjIV`xoK`fM&rPxbr6MbK_{$hV;V(sjaT;HrYtmL4 z&gde!35CBmXCxG+N>4NyO0-*vs2EepNi>uk+4}$wx=5UK%$wUPeptJtq%F|^dyRh< z3b6mc^UNeeB*>+7IDuG_|I|~ZQnBQ+hU{$<*sv^Vs&h6Eks;;$aT`qXcX;q%=F(xT z7F!UBCzasJlm^GB1Brx=l)zXOTpz{lROLL4<^{ zT`Gy`Wh3s6jhDOYJ4WJ%5QWo4Jz#LqQ>WfUNtM2j%@ueJ@y7ibFNuW#h%JihBjSDFlBEf~B}+E9?*~Ycf83k; zIAWhdeW1G^Wr~7#5^zJWT3I|Qbj*v9Pw0^h3$TlI*u{$80HEqIa)fX?-DUUW6enHv z7b7H)?$ubVEj?yu zuuDUlPo?@3@z)K8&Z;~z-GY82-anGopv9_WVpUZPwe0Ve(J z6PZ{w2JA;tm+htQGdYFx2{r%UwtN*f}v-8NZL+;j7y%T1+xI8 z3CMmsO_l-ucI(n4c$NWa0}+v002ov JPDHLkV1nLq57z(y literal 0 HcmV?d00001 diff --git a/OsmAnd/res/drawable-xhdpi/ic_browse_map.png b/OsmAnd/res/drawable-xhdpi/ic_browse_map.png new file mode 100644 index 0000000000000000000000000000000000000000..c6645486f1c9feb43acd4a87276e964e8076bcce GIT binary patch literal 6547 zcmcIpRZ|-bv<$An-Q67u6xRa9ogxK-JCsr=8Ui%96pFjMdvS;2#a#+P3PnTk``y2A zXYRwPDiNmeD=PEuRBz#%?FL0DZfnYw&tl|mR@0A1cNT() zgV)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I~|`6%G=p;a_wYosC6%%pNcLwAhNMTO(_3ST_F*R@!AF?M)BHpDbv&{Qdp4y_KgrnDdAXKX^q!ukCgu8eu zqFr4C#a5d~3Z1tj1Q#P?=IL(Ulgw65{)<1|CZe@`CkU2MMG&WGZM-Ryj+I(#P2}ME zUcoLia?)IHZ!_1Z#Mh^KI5oaBC51lwuDUYuzX*9~KH*o{qKmbD&7$yt8}-n8p;H-| zlY9qFZRtOhKqebXIaz@-nZgc49G@BX_Ir>B0yR(n>X575o&PqC-2HvpojWAxP4yBt z1%t?Y!_PeBcYEi#`t@AdvF1vwexk@BQSr&}TUvqx(cM7|bHaZKu3T`36W4?hU=-6x zVv|2IfHHV!i*ZyfT7=A6YIJ~1mWEPBnt|;e03W^ka!TWn()j{Nyv$)T0c`v3h2Lu{ z>$P4n!vjIS(=X>khIRJfb0yc(u61j$MnQ_^^Jj`awjulXO?W7_*d?wfWrF}wMp6At z9|{J24m*8WTJ(CXhK%{@K|qEAXV$~909Z3}D#e}_eT?M&>Vh^D$yLF%ROD1Zu2g5D zG*|-HiWnqZ@&Sq@6rm@2``a3jMUcfgC4rmBnbKI1hljEfzM|o@^na4Re+?nM#soND S + android:orientation="horizontal" > selected) { + public static View showActivityActionsDialog(Activity a, final Set selected, boolean showDefault) { View view = a.getLayoutInflater().inflate(R.layout.mode_toggles, null); OsmandSettings settings = ((OsmandApplication) a.getApplication()).getSettings(); boolean lc = settings.isLightContentMenu(); final ToggleButton[] buttons = new ToggleButton[ApplicationMode.values().length]; - buttons[ApplicationMode.DEFAULT.ordinal()] = (ToggleButton) view.findViewById(R.id.DefaultButton); - buttons[ApplicationMode.DEFAULT.ordinal()].setButtonDrawable(R.drawable.ic_action_globus_light ); + if(showDefault) { + buttons[ApplicationMode.DEFAULT.ordinal()] = (ToggleButton) view.findViewById(R.id.DefaultButton); + buttons[ApplicationMode.DEFAULT.ordinal()].setButtonDrawable(R.drawable.ic_browse_map ); + } else { + view.findViewById(R.id.DefaultButton).setVisibility(View.GONE); + } buttons[ApplicationMode.CAR.ordinal()] = (ToggleButton) view.findViewById(R.id.CarButton); buttons[ApplicationMode.CAR.ordinal()].setButtonDrawable(R.drawable.ic_car ); buttons[ApplicationMode.BICYCLE.ordinal()] = (ToggleButton) view.findViewById(R.id.BicycleButton); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java index 8873938fb2..cd8617d8f2 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java @@ -3,9 +3,11 @@ package net.osmand.plus.activities; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import net.osmand.access.AccessibleToast; import net.osmand.plus.ApplicationMode; @@ -19,6 +21,7 @@ import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnMultiChoiceClickListener; import android.os.Bundle; import android.preference.CheckBoxPreference; @@ -28,6 +31,7 @@ import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceScreen; +import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; @@ -289,16 +293,7 @@ public abstract class SettingsBaseActivity extends SherlockPreferenceActivity im super.onResume(); if (profileSettings) { previousAppMode = settings.getApplicationMode(); - int ind = 0; - boolean found = false; - for (ApplicationMode a : modes) { - if (previousAppMode == a) { - getSupportActionBar().setSelectedNavigationItem(ind); - found = true; - break; - } - ind++; - } + boolean found = setSelectedAppMode(previousAppMode); if (!found) { getSupportActionBar().setSelectedNavigationItem(0); } @@ -307,6 +302,37 @@ public abstract class SettingsBaseActivity extends SherlockPreferenceActivity im } } + protected void profileDialog() { + Builder b = new AlertDialog.Builder(this); + final Set selected = new LinkedHashSet(); + View v = MapActivityActions.showActivityActionsDialog(this, selected, false); + b.setView(v); + b.setPositiveButton(R.string.default_buttons_ok, new OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + if(selected.size() > 0) { + setSelectedAppMode(selected.iterator().next()); + } + } + }); + b.show(); + } + + protected boolean setSelectedAppMode(ApplicationMode am) { + int ind = 0; + boolean found = false; + for (ApplicationMode a : modes) { + if (am == a) { + getSupportActionBar().setSelectedNavigationItem(ind); + found = true; + break; + } + ind++; + } + return found; + } + @Override protected void onPause() { super.onPause(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 0a35481a5a..9e6138d68e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -95,7 +95,11 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { speakAlarms = (Preference) screen.findPreference("speak_routing_alarms"); speakAlarms.setOnPreferenceClickListener(this); + + profileDialog(); } + + diff --git a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java index 006be14381..399d872458 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java @@ -49,6 +49,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity { if(REGISTER_BG_SETTINGS) { registerBackgroundSettings(); } + profileDialog(); }