From f906493af5f0c6e417960894679e0ce222ee2222 Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Thu, 2 Jul 2015 15:36:23 +0300 Subject: [PATCH] Added dialog for downloading missing countries with cross-mwm routing. --- .../layout/dialog_download_multiple_items.xml | 36 +++ .../layout/dialog_download_single_item.xml | 37 +++ android/res/layout/item_country_dialog.xml | 30 +++ .../res/layout/item_country_group_dialog.xml | 30 +++ .../item_country_group_dialog_expanded.xml | 32 +++ android/res/values/styles.xml | 19 ++ .../mapswithme/country/ActiveCountryTree.java | 6 + .../country/BaseDownloadAdapter.java | 27 +-- .../src/com/mapswithme/maps/MWMActivity.java | 82 +++---- ...abledChildSimpleExpandableListAdapter.java | 47 ++++ .../maps/data/RoutingResultCodes.java | 12 + .../dialog/RoutingErrorDialogFragment.java | 224 ++++++++++++++++++ .../src/com/mapswithme/util/StringUtils.java | 16 ++ 13 files changed, 528 insertions(+), 70 deletions(-) create mode 100644 android/res/layout/dialog_download_multiple_items.xml create mode 100644 android/res/layout/dialog_download_single_item.xml create mode 100644 android/res/layout/item_country_dialog.xml create mode 100644 android/res/layout/item_country_group_dialog.xml create mode 100644 android/res/layout/item_country_group_dialog_expanded.xml create mode 100644 android/src/com/mapswithme/maps/adapter/DisabledChildSimpleExpandableListAdapter.java create mode 100644 android/src/com/mapswithme/maps/dialog/RoutingErrorDialogFragment.java diff --git a/android/res/layout/dialog_download_multiple_items.xml b/android/res/layout/dialog_download_multiple_items.xml new file mode 100644 index 0000000000..fc9b5bb4ef --- /dev/null +++ b/android/res/layout/dialog_download_multiple_items.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/android/res/layout/dialog_download_single_item.xml b/android/res/layout/dialog_download_single_item.xml new file mode 100644 index 0000000000..e0d3735cdd --- /dev/null +++ b/android/res/layout/dialog_download_single_item.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/android/res/layout/item_country_dialog.xml b/android/res/layout/item_country_dialog.xml new file mode 100644 index 0000000000..bfba070c4f --- /dev/null +++ b/android/res/layout/item_country_dialog.xml @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/android/res/layout/item_country_group_dialog.xml b/android/res/layout/item_country_group_dialog.xml new file mode 100644 index 0000000000..1e13f6012a --- /dev/null +++ b/android/res/layout/item_country_group_dialog.xml @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/android/res/layout/item_country_group_dialog_expanded.xml b/android/res/layout/item_country_group_dialog_expanded.xml new file mode 100644 index 0000000000..5fd1860e17 --- /dev/null +++ b/android/res/layout/item_country_group_dialog_expanded.xml @@ -0,0 +1,32 @@ + + + + + + + + + + diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml index 4042df8d77..934e5b33ed 100644 --- a/android/res/values/styles.xml +++ b/android/res/values/styles.xml @@ -11,6 +11,7 @@ @color/text_dark_hint @style/MwmWidget.ListView @style/MwmWidget.TextView + @style/MwmMain.DialogFragment stateUnspecified|adjustPan @android:color/white @null @@ -34,6 +35,24 @@ 16dip + + + +