diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp index a4af5c5d18..72fc1a663c 100644 --- a/android/jni/com/mapswithme/maps/editor/Editor.cpp +++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp @@ -323,9 +323,10 @@ JNIEXPORT void JNICALL Java_com_mapswithme_maps_editor_Editor_nativeSetSelectedCuisines(JNIEnv * env, jclass clazz, jobjectArray jKeys) { int const length = env->GetArrayLength(jKeys); - vector cuisines(length); + vector cuisines; + cuisines.reserve(length); for (int i = 0; i < length; i++) - cuisines[i] = jni::ToNativeString(env, (jstring) env->GetObjectArrayElement(jKeys, i)); + cuisines.push_back(jni::ToNativeString(env, (jstring) env->GetObjectArrayElement(jKeys, i))); g_editableMapObject.SetCuisines(cuisines); } diff --git a/android/res/layout/fragment_timetable.xml b/android/res/layout/fragment_timetable.xml index 05c8952c93..495683f36d 100644 --- a/android/res/layout/fragment_timetable.xml +++ b/android/res/layout/fragment_timetable.xml @@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="@dimen/height_block_base" android:layout_alignParentBottom="true" - android:background="?ppBackground"/> + android:background="?cardBackground"/> @@ -39,7 +39,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/margin_half" - card_view:cardBackgroundColor="?ppBackground" + card_view:cardBackgroundColor="?cardBackground" card_view:cardCornerRadius="2dp" card_view:cardElevation="4dp"> diff --git a/android/res/layout/toolbar_search_controls.xml b/android/res/layout/toolbar_search_controls.xml index b35d075532..f01ad2bdca 100644 --- a/android/res/layout/toolbar_search_controls.xml +++ b/android/res/layout/toolbar_search_controls.xml @@ -5,9 +5,9 @@ android:id="@+id/frame" android:layout_width="match_parent" android:layout_height="match_parent" + android:orientation="horizontal" android:baselineAligned="false" - android:gravity="center_vertical" - android:orientation="horizontal"> + android:gravity="center_vertical"> + + diff --git a/android/res/values/themes-base.xml b/android/res/values/themes-base.xml index 931b31ac2e..67ceb17389 100644 --- a/android/res/values/themes-base.xml +++ b/android/res/values/themes-base.xml @@ -19,6 +19,7 @@ @style/MwmTheme.DialogFragment @color/bg_window @drawable/card_frame + @color/bg_cards @style/MwmTheme.DialogFragment.Fullscreen @color/bg_statusbar @@ -79,6 +80,7 @@ @style/MwmTheme.Night.DialogFragment @color/bg_window_night @drawable/card_frame_night + @color/bg_cards_night @style/MwmTheme.DialogFragment.Fullscreen @color/bg_statusbar_night diff --git a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java index 690c449f26..d27ed3297b 100644 --- a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java +++ b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java @@ -26,7 +26,6 @@ public class EditorHostFragment extends BaseMwmToolbarFragment { private static final String PREF_LAST_AUTH_DISPLAY_TIMESTAMP = "LastAuth"; private boolean mIsNewObject; - private View mSearch; enum Mode { @@ -49,7 +48,6 @@ public class EditorHostFragment extends BaseMwmToolbarFragment public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - mSearch = mToolbarController.findViewById(R.id.frame); mToolbarController.findViewById(R.id.save).setOnClickListener(this); mToolbarController.getToolbar().setNavigationOnClickListener(new View.OnClickListener() { @@ -112,7 +110,7 @@ public class EditorHostFragment extends BaseMwmToolbarFragment protected void editMapObject() { mMode = Mode.MAP_OBJECT; - UiUtils.hide(mSearch); + ((SearchToolbarController) mToolbarController).showControls(false); mToolbarController.setTitle(getTitle()); final Fragment editorFragment = Fragment.instantiate(getActivity(), EditorFragment.class.getName()); getChildFragmentManager().beginTransaction() @@ -150,7 +148,7 @@ public class EditorHostFragment extends BaseMwmToolbarFragment temporaryStoreEdits(); mMode = Mode.CUISINE; mToolbarController.setTitle(""); - UiUtils.show(mSearch); + ((SearchToolbarController) mToolbarController).showControls(true); final Fragment cuisineFragment = Fragment.instantiate(getActivity(), CuisineFragment.class.getName()); getChildFragmentManager().beginTransaction() .replace(R.id.fragment_container, cuisineFragment, CuisineFragment.class.getName())