Review fixes.

This commit is contained in:
Dmitry Yunitsky 2016-03-23 16:22:21 +03:00
parent 97e96bc24d
commit a33f6e47ea
7 changed files with 14 additions and 11 deletions

View file

@ -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<string> cuisines(length);
vector<string> 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);
}

View file

@ -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"/>
<TextView
android:id="@+id/tv__mode_switch"

View file

@ -16,7 +16,7 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="?ppBackground"
card_view:cardBackgroundColor="?cardBackground"
card_view:cardCornerRadius="2dp"
card_view:cardElevation="4dp">
@ -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">

View file

@ -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">
<EditText
android:id="@+id/query"

View file

@ -3,7 +3,9 @@
<declare-styleable name="ThemeAttrs">
<attr name="fullscreenDialogTheme" format="reference"/>
<attr name="windowBackgroundForced" format="reference|color"/>
<attr name="cardFrame" format="reference"/>
<attr name="cardBackground" format="reference"/>
<attr name="clickableBackground" format="reference"/>
<attr name="statusBar" format="color"/>

View file

@ -19,6 +19,7 @@
<item name="alertDialogTheme">@style/MwmTheme.DialogFragment</item>
<item name="windowBackgroundForced">@color/bg_window</item>
<item name="cardFrame">@drawable/card_frame</item>
<item name="cardBackground">@color/bg_cards</item>
<item name="fullscreenDialogTheme">@style/MwmTheme.DialogFragment.Fullscreen</item>
<item name="statusBar">@color/bg_statusbar</item>
@ -79,6 +80,7 @@
<item name="alertDialogTheme">@style/MwmTheme.Night.DialogFragment</item>
<item name="windowBackgroundForced">@color/bg_window_night</item>
<item name="cardFrame">@drawable/card_frame_night</item>
<item name="cardBackground">@color/bg_cards_night</item>
<item name="fullscreenDialogTheme">@style/MwmTheme.DialogFragment.Fullscreen</item>
<item name="statusBar">@color/bg_statusbar_night</item>

View file

@ -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())