diff --git a/android/jni/com/mapswithme/maps/MapManager.cpp b/android/jni/com/mapswithme/maps/MapManager.cpp index e5bc119619..75a7f5b32d 100644 --- a/android/jni/com/mapswithme/maps/MapManager.cpp +++ b/android/jni/com/mapswithme/maps/MapManager.cpp @@ -267,6 +267,7 @@ static void UpdateItem(JNIEnv * env, jobject item, NodeAttrs const & attrs) static jfieldID const countryItemFieldTopmostParentName = env->GetFieldID(g_countryItemClass, "topmostParentName", "Ljava/lang/String;"); static jfieldID const countryItemFieldDescription = env->GetFieldID(g_countryItemClass, "description", "Ljava/lang/String;"); static jfieldID const countryItemFieldSize = env->GetFieldID(g_countryItemClass, "size", "J"); + static jfieldID const countryItemFieldEnqueuedSize = env->GetFieldID(g_countryItemClass, "enqueuedSize", "J"); static jfieldID const countryItemFieldTotalSize = env->GetFieldID(g_countryItemClass, "totalSize", "J"); static jfieldID const countryItemFieldChildCount = env->GetFieldID(g_countryItemClass, "childCount", "I"); static jfieldID const countryItemFieldTotalChildCount = env->GetFieldID(g_countryItemClass, "totalChildCount", "I"); @@ -316,7 +317,8 @@ static void UpdateItem(JNIEnv * env, jobject item, NodeAttrs const & attrs) // Sizes env->SetLongField(item, countryItemFieldSize, attrs.m_localMwmSize); - env->SetLongField(item, countryItemFieldTotalSize, (attrs.m_downloadingMwmCounter ? attrs.m_downloadingMwmSize : attrs.m_mwmSize)); + env->SetLongField(item, countryItemFieldEnqueuedSize, attrs.m_downloadingMwmSize); + env->SetLongField(item, countryItemFieldTotalSize, attrs.m_mwmSize); // Child counts env->SetIntField(item, countryItemFieldChildCount, attrs.m_downloadingMwmCounter); @@ -660,4 +662,12 @@ Java_com_mapswithme_maps_downloader_MapManager_nativeEnableDownloadOn3g(JNIEnv * g_framework->EnableDownloadOn3g(); } +// static @Nullable String nativeGetSelectedCountry(); +JNIEXPORT jstring JNICALL +Java_com_mapswithme_maps_downloader_MapManager_nativeGetSelectedCountry(JNIEnv * env, jclass clazz) +{ + storage::TCountryId const & res = g_framework->GetPlacePageInfo().m_countryId; + return (res == storage::kInvalidCountryId ? nullptr : jni::ToJavaString(env, res)); +} + } // extern "C" diff --git a/android/res/layout/downloader_item.xml b/android/res/layout/downloader_item.xml index 4485b72a0c..60ce16109a 100644 --- a/android/res/layout/downloader_item.xml +++ b/android/res/layout/downloader_item.xml @@ -2,7 +2,6 @@ - - - - - + android:layout_centerVertical="true"/> + + + + + diff --git a/android/res/layout/place_page_preview.xml b/android/res/layout/place_page_preview.xml index e1344fe1d6..cfa375b12e 100644 --- a/android/res/layout/place_page_preview.xml +++ b/android/res/layout/place_page_preview.xml @@ -1,5 +1,102 @@ - - - + + + + + + + + + + + + + + + + + + diff --git a/android/res/layout/place_page_preview_common.xml b/android/res/layout/place_page_preview_common.xml deleted file mode 100644 index d9964ed2c4..0000000000 --- a/android/res/layout/place_page_preview_common.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/android/res/values/styles-place_page.xml b/android/res/values/styles-place_page.xml index b9b1471e37..991162d921 100644 --- a/android/res/values/styles-place_page.xml +++ b/android/res/values/styles-place_page.xml @@ -1,13 +1,5 @@ - - - -