diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 81d0923396..f897d2081f 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -58,7 +58,6 @@ android { } dexOptions { - jumboMode = true incremental true javaMaxHeapSize "4g" } diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index ed7fcf01b7..230fe76e47 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -28,5 +28,8 @@ Value €1,49 - + https://twitter.com/osmandapp + https://www.facebook.com/osmandapp + https://vk.com/osmandapp + diff --git a/OsmAnd/res/layout/download_item_list_section.xml b/OsmAnd/res/layout/download_item_list_section.xml index 3aa22b1269..0f2640b37c 100644 --- a/OsmAnd/res/layout/download_item_list_section.xml +++ b/OsmAnd/res/layout/download_item_list_section.xml @@ -9,6 +9,7 @@ android:minHeight="40dp" android:orientation="horizontal" android:paddingLeft="@dimen/list_header_padding" + android:background="?attr/ctx_menu_info_view_bg" android:paddingRight="@dimen/list_header_padding"> Станцыя назіраньня Эл. пошта Факс - Фэйсбук + Фэйсбук Сотавы тэлефон Прытулак для сабак Прытулак для катоў @@ -1054,11 +1054,11 @@ Адпрацаваная алiва Парфумэрыя - Твітар + Твітар Скайп Ютуб Інстаграм - УКантакце + УКантакце Гугл+ Млынавая сажалка Будынак diff --git a/OsmAnd/res/values-ca/phrases.xml b/OsmAnd/res/values-ca/phrases.xml index 72593b5d36..e43ca41a7e 100644 --- a/OsmAnd/res/values-ca/phrases.xml +++ b/OsmAnd/res/values-ca/phrases.xml @@ -954,7 +954,7 @@ Correu electrònic Fax - Facebook + Facebook Mòbil Tipus de refugi: per gossos Tipus de refugi: per gats @@ -1048,11 +1048,11 @@ Envasos de cartró de begudes Xapa metàl·lica Bassa del molí - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Perfumeria diff --git a/OsmAnd/res/values-cs/phrases.xml b/OsmAnd/res/values-cs/phrases.xml index e7b273142e..ff093563e4 100644 --- a/OsmAnd/res/values-cs/phrases.xml +++ b/OsmAnd/res/values-cs/phrases.xml @@ -1078,12 +1078,12 @@ Vojenský úřad E-mail Fax - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Mobilní telefon Výška diff --git a/OsmAnd/res/values-da/phrases.xml b/OsmAnd/res/values-da/phrases.xml index a23ff559f2..fd9c336a86 100644 --- a/OsmAnd/res/values-da/phrases.xml +++ b/OsmAnd/res/values-da/phrases.xml @@ -966,7 +966,7 @@ E-mail Fax - Facebook + Facebook Mobiltelefon Internat: hund Internat: kat @@ -1060,11 +1060,11 @@ Ikke markeret Mølledam - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Parfumeri diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml index 39f6422556..8edb7f3541 100644 --- a/OsmAnd/res/values-de/phrases.xml +++ b/OsmAnd/res/values-de/phrases.xml @@ -956,7 +956,7 @@ Dusche Email Fax - Facebook + Facebook Mobiltelefon kostenfrei Trinkwasser @@ -1008,11 +1008,11 @@ Unterkunftstyp: Vogel Mühlenteich - Twitter + Twitter Skype Youtube Instagram - VKontakte + VKontakte Google+ Parfümerie diff --git a/OsmAnd/res/values-es-rAR/phrases.xml b/OsmAnd/res/values-es-rAR/phrases.xml index 4f2a132e23..d2dac8e1b1 100644 --- a/OsmAnd/res/values-es-rAR/phrases.xml +++ b/OsmAnd/res/values-es-rAR/phrases.xml @@ -949,7 +949,7 @@ Email Fax - Facebook + Facebook Móvil Refugio canino Refugio gatuno @@ -1042,11 +1042,11 @@ Escombros Cartón prensado Laguna de molino - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Perfumería diff --git a/OsmAnd/res/values-es-rUS/phrases.xml b/OsmAnd/res/values-es-rUS/phrases.xml index 5b43de9c58..d32131dde2 100644 --- a/OsmAnd/res/values-es-rUS/phrases.xml +++ b/OsmAnd/res/values-es-rUS/phrases.xml @@ -894,7 +894,7 @@ Sin cargo Email Fax - Facebook + Facebook Móvil Refugio canino Refugio gatuno @@ -984,11 +984,11 @@ Escombros Cartón prensado Laguna de molino - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Perfumería Edificio diff --git a/OsmAnd/res/values-es/phrases.xml b/OsmAnd/res/values-es/phrases.xml index 0996238ed0..bf52076284 100644 --- a/OsmAnd/res/values-es/phrases.xml +++ b/OsmAnd/res/values-es/phrases.xml @@ -952,7 +952,7 @@ Email Fax - Facebook + Facebook Móvil Refugio canino Refugio gatuno @@ -1045,11 +1045,11 @@ Escombros Cartón prensado Lago de molino - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Perfumería diff --git a/OsmAnd/res/values-fr/phrases.xml b/OsmAnd/res/values-fr/phrases.xml index 95f31e897d..b2b3605038 100644 --- a/OsmAnd/res/values-fr/phrases.xml +++ b/OsmAnd/res/values-fr/phrases.xml @@ -956,7 +956,7 @@ Douche Email Fax - Facebook + Facebook Eau potable : Oui Eau potable : Non Permanent @@ -1019,7 +1019,7 @@ Ampoules électriques Contreplaqué Réfrigérateur et congélateur - Twitter + Twitter Skype YouTube Instagram @@ -1867,7 +1867,7 @@ Gravats Mur Jersey - VKontakte + VKontakte Contenu : ensilage Contenu : fumier Nudisme autorisé diff --git a/OsmAnd/res/values-gl/phrases.xml b/OsmAnd/res/values-gl/phrases.xml index 336052c57c..a0343639dd 100644 --- a/OsmAnd/res/values-gl/phrases.xml +++ b/OsmAnd/res/values-gl/phrases.xml @@ -712,12 +712,12 @@ Sitio web Correo electrónico Fax - Facebook - Twitter + Facebook + Twitter Skype Youtube Instagram - Vkontakte + Vkontakte Google+ Móbil Altura máxima diff --git a/OsmAnd/res/values-hu/phrases.xml b/OsmAnd/res/values-hu/phrases.xml index f2337e0f48..875e458132 100644 --- a/OsmAnd/res/values-hu/phrases.xml +++ b/OsmAnd/res/values-hu/phrases.xml @@ -970,12 +970,12 @@ Weboldal Email Fax - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Mobiltelefon Szolgáltatási idő diff --git a/OsmAnd/res/values-nl/phrases.xml b/OsmAnd/res/values-nl/phrases.xml index 9099e6e46b..1b4944dbec 100644 --- a/OsmAnd/res/values-nl/phrases.xml +++ b/OsmAnd/res/values-nl/phrases.xml @@ -1102,12 +1102,12 @@ Website Email Fax - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Mobiel Aanvangstijd diff --git a/OsmAnd/res/values-pl/phrases.xml b/OsmAnd/res/values-pl/phrases.xml index a6c18d02b9..020eff1f1f 100644 --- a/OsmAnd/res/values-pl/phrases.xml +++ b/OsmAnd/res/values-pl/phrases.xml @@ -1040,12 +1040,12 @@ Prysznic E-mail Fax - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Wysokość Wysokość nad poziomem morza diff --git a/OsmAnd/res/values-pt-rBR/phrases.xml b/OsmAnd/res/values-pt-rBR/phrases.xml index 463620f202..97e13aa2ea 100644 --- a/OsmAnd/res/values-pt-rBR/phrases.xml +++ b/OsmAnd/res/values-pt-rBR/phrases.xml @@ -949,7 +949,7 @@ Email Fax - Facebook + Facebook Celular Abrigo para cães Abrigo para gatos @@ -1043,11 +1043,11 @@ Desmarcado Lagoa do moinho - Twitter + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Perfumaria diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml index 35c5465f4c..dcbd78da5c 100644 --- a/OsmAnd/res/values-ru/phrases.xml +++ b/OsmAnd/res/values-ru/phrases.xml @@ -1969,7 +1969,7 @@ Выход Пешеходный переход - ВКонтакте + ВКонтакте Содержимое: силос Содержимое: вода @@ -2372,8 +2372,8 @@ Место для хранения лодок Калитка - Фейсбук - Твиттер + Фейсбук + Твиттер Скайп Стиль сада: кухня Туалет: общественный diff --git a/OsmAnd/res/values-sc/phrases.xml b/OsmAnd/res/values-sc/phrases.xml index dc7d81e0a8..4ab50d45ea 100644 --- a/OsmAnd/res/values-sc/phrases.xml +++ b/OsmAnd/res/values-sc/phrases.xml @@ -1045,12 +1045,12 @@ Ufìtziu militare Bita Inferriada/cràdica pro su bestiàmene - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Mòbile Artària diff --git a/OsmAnd/res/values-sk/phrases.xml b/OsmAnd/res/values-sk/phrases.xml index c0b97077f2..441541a37b 100644 --- a/OsmAnd/res/values-sk/phrases.xml +++ b/OsmAnd/res/values-sk/phrases.xml @@ -1023,7 +1023,7 @@ Opustený objekt E-mailová adresa Fax - Facebook + Facebook Mobilný telefón Medzinárodná pešia trasa Národná pešia trasa @@ -1075,11 +1075,11 @@ Kristova cirkev Budova -Twitter +Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Vojenský úrad Jadrový odpad diff --git a/OsmAnd/res/values-tr/phrases.xml b/OsmAnd/res/values-tr/phrases.xml index 6bcbdb0315..19cdbc73a1 100644 --- a/OsmAnd/res/values-tr/phrases.xml +++ b/OsmAnd/res/values-tr/phrases.xml @@ -996,7 +996,7 @@ Faks YouTube İnstagram - VKontakte + VKontakte Google + Mobil Maksimum ağırlık diff --git a/OsmAnd/res/values-zh-rTW/phrases.xml b/OsmAnd/res/values-zh-rTW/phrases.xml index 6a05b1a646..66b312f88c 100644 --- a/OsmAnd/res/values-zh-rTW/phrases.xml +++ b/OsmAnd/res/values-zh-rTW/phrases.xml @@ -948,7 +948,7 @@ 電子郵件 傳真 - 臉書 + 臉書 行動電話 收容所類型:狗 收容所:貓 @@ -1041,11 +1041,11 @@ 有監管 沒有監管 磨房水塘 - Twitter + Twitter Skype Youtube Instagram - VKontakte + VKontakte Google+ 香水商店 diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml index 831bb30175..6efb5d255a 100644 --- a/OsmAnd/res/values/phrases.xml +++ b/OsmAnd/res/values/phrases.xml @@ -1083,12 +1083,12 @@ Website Email Fax - Facebook - Twitter + Facebook + Twitter Skype YouTube Instagram - VKontakte + VKontakte Google+ Mobile Service times diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index a11b7292f4..09d58311c6 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -10,6 +10,7 @@ PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Follow us Direction audio feedback Indicate target point direction by sound Direction haptic feedback diff --git a/OsmAnd/src/net/osmand/AndroidUtils.java b/OsmAnd/src/net/osmand/AndroidUtils.java index 7b517069bf..5820a0c74b 100644 --- a/OsmAnd/src/net/osmand/AndroidUtils.java +++ b/OsmAnd/src/net/osmand/AndroidUtils.java @@ -36,9 +36,6 @@ public class AndroidUtils { return context.getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS; } - /** - * @param context - */ public static void softKeyboardDelayed(final View view) { view.post(new Runnable() { @Override diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java index a926413d15..d355115e99 100644 --- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java +++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java @@ -290,12 +290,13 @@ public class ContextMenuAdapter { dividerView.setVisibility(View.VISIBLE); } } - return convertView; - } - @Override - public boolean isEnabled(int position) { - return !getItem(position).isCategory(); + if (item.isCategory()) { + convertView.setFocusable(false); + convertView.setClickable(false); + } + + return convertView; } } diff --git a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java index 87b661851e..266459821e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java @@ -1,16 +1,22 @@ package net.osmand.plus.activities; +import android.content.Intent; +import android.graphics.drawable.ColorDrawable; +import android.graphics.drawable.Drawable; +import android.net.Uri; import android.os.Bundle; import android.support.annotation.DrawableRes; import android.support.annotation.IdRes; import android.support.annotation.StringRes; import android.support.v4.app.FragmentActivity; +import android.support.v4.content.ContextCompat; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; +import net.osmand.AndroidUtils; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.ContextMenuItem; import net.osmand.plus.OsmandApplication; @@ -35,7 +41,7 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView setContentView(R.layout.fragment_help_screen); ContextMenuAdapter contextMenuAdapter = new ContextMenuAdapter(); - contextMenuAdapter.setDefaultLayoutId(R.layout.list_item_icon_and_menu); + contextMenuAdapter.setDefaultLayoutId(R.layout.two_line_with_images_list_item); contextMenuAdapter.addItem(createCategory(R.string.begin_with_osmand_menu_group)); createBeginWithOsmandItems(contextMenuAdapter); @@ -47,17 +53,33 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView createHelpUsToImproveItems(contextMenuAdapter); contextMenuAdapter.addItem(createCategory(R.string.other_menu_group)); createOtherItems(contextMenuAdapter); + contextMenuAdapter.addItem(createCategory(R.string.follow_us)); + createSocialNetworksItems(contextMenuAdapter); mAdapter = contextMenuAdapter.createListAdapter(this, getMyApplication().getSettings().isLightContent()); ListView listView = (ListView) findViewById(android.R.id.list); listView.setAdapter(mAdapter); listView.setOnItemClickListener(this); + Drawable dividerDrawable = new ColorDrawable(ContextCompat.getColor(this, + getMyApplication().getSettings().isLightContent() ? + R.color.icon_color_light : R.color.dialog_inactive_text_color_dark)); + listView.setDivider(dividerDrawable); + listView.setDividerHeight(AndroidUtils.dpToPx(this, 1f)); setTitle(R.string.shared_string_help); setupHomeButton(); } + private void createSocialNetworksItems(ContextMenuAdapter contextMenuAdapter) { + contextMenuAdapter.addItem(createSocialItem(R.string.twitter, R.string.twitter_address, + R.drawable.ic_action_social_twitter)); + contextMenuAdapter.addItem(createSocialItem(R.string.facebook, R.string.facebook_address, + R.drawable.ic_action_social_facebook)); + contextMenuAdapter.addItem(createSocialItem(R.string.vk, R.string.vk_address, + R.drawable.ic_action_social_vk)); + } + private void createHelpUsToImproveItems(ContextMenuAdapter contextMenuAdapter) { contextMenuAdapter.addItem(new ContextMenuItem.ItemBuilder() .setLayout(R.layout.help_to_improve_item).createItem()); @@ -87,6 +109,28 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView .createItem(); } + private ContextMenuItem createSocialItem(@StringRes int title, + @StringRes int urlRes, + @DrawableRes int icon) { + final String url = getString(urlRes); + return new ContextMenuItem.ItemBuilder() + .setTitle(getString(title)) + .setDescription(url) + .setIcon(icon) + .setListener(new ContextMenuAdapter.ItemClickListener() { + @Override + public boolean onContextMenuClick(ArrayAdapter adapter, + int itemId, + int position, + boolean isChecked) { + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(intent); + return false; + } + }) + .createItem(); + } + private ContextMenuItem createItem(@StringRes int titleRes, @StringRes int descriptionRes, String path) { @@ -118,8 +162,11 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - mAdapter.getItem(position).getItemClickListener() - .onContextMenuClick(mAdapter, position, position, false); + ContextMenuAdapter.ItemClickListener listener = + mAdapter.getItem(position).getItemClickListener(); + if (listener != null) { + listener.onContextMenuClick(mAdapter, position, position, false); + } } private void createFeaturesItems(ContextMenuAdapter contextMenuAdapter) { @@ -188,4 +235,4 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView return false; } } -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 797e94a3a7..fb53efc0fa 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -79,10 +79,10 @@ public class ItemViewHolder { dateFormat = android.text.format.DateFormat.getMediumDateFormat(context); progressBar = (ProgressBar) view.findViewById(R.id.progressBar); rightButton = (Button) view.findViewById(R.id.rightButton); - leftImageView = (ImageView) view.findViewById(R.id.leftImageView); + leftImageView = (ImageView) view.findViewById(R.id.icon); descrTextView = (TextView) view.findViewById(R.id.description); - rightImageButton = (ImageView) view.findViewById(R.id.rightImageButton); - nameTextView = (TextView) view.findViewById(R.id.name); + rightImageButton = (ImageView) view.findViewById(R.id.secondaryIcon); + nameTextView = (TextView) view.findViewById(R.id.title); view.setAccessibilityDelegate(context.getAccessibilityAssistant()); rightButton.setAccessibilityDelegate(context.getAccessibilityAssistant()); diff --git a/build.gradle b/build.gradle index f88758a94b..eb1e4511c1 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.0.0' + classpath 'com.android.tools.build:gradle:2.1.0' } }