diff options
Diffstat (limited to 'android')
3 files changed, 9 insertions, 9 deletions
diff --git a/android/src/com/mapswithme/maps/editor/EditorFragment.java b/android/src/com/mapswithme/maps/editor/EditorFragment.java index 092c65c843..160d009c6c 100644 --- a/android/src/com/mapswithme/maps/editor/EditorFragment.java +++ b/android/src/com/mapswithme/maps/editor/EditorFragment.java @@ -38,7 +38,7 @@ import org.solovyev.android.views.llm.LinearLayoutManager; public class EditorFragment extends BaseMwmFragment implements View.OnClickListener, EditTextDialogFragment.OnTextSaveListener { - final static String LAST_NAME_INDEX = "LastNameIndex"; + final static String LAST_INDEX_OF_NAMES_ARRAY = "LastIndexOfNamesArray"; private TextView mCategory; private View mCardAddress; @@ -341,7 +341,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe mNamesAdapter.registerAdapterDataObserver(mNamesObserver); final Bundle args = getArguments(); - if (args == null || !args.containsKey(LAST_NAME_INDEX)) + if (args == null || !args.containsKey(LAST_INDEX_OF_NAMES_ARRAY)) { showAdditionalNames(false); return; @@ -353,7 +353,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe public void onGlobalLayout() { LinearLayoutManager lm = (LinearLayoutManager) mNamesView.getLayoutManager(); - int position = args.getInt(LAST_NAME_INDEX); + int position = args.getInt(LAST_INDEX_OF_NAMES_ARRAY); View nameItem = lm.findViewByPosition(position); @@ -505,7 +505,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe private void refreshNamesCaption() { if (mNamesAdapter.getNamesCount() <= mNamesAdapter.getMandatoryNamesCount()) - setNamesArrowDrawable(null); + setNamesArrowDrawable(0); else if (mNamesAdapter.areAdditionalLanguagesShown()) setNamesArrowDrawable(R.drawable.ic_expand_less); else @@ -519,9 +519,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe } - private void setNamesArrowDrawable(@DrawableRes Integer right) + private void setNamesArrowDrawable(@DrawableRes int right) { - if(null == right) + if(0 == right) { mNamesCaption.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); return; diff --git a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java index cbc1f99547..d05dbc1a39 100644 --- a/android/src/com/mapswithme/maps/editor/EditorHostFragment.java +++ b/android/src/com/mapswithme/maps/editor/EditorHostFragment.java @@ -180,7 +180,7 @@ public class EditorHostFragment extends BaseMwmToolbarFragment mToolbarController.setTitle(getTitle()); Bundle args = new Bundle(); if (focusToLastName) - args.putInt(EditorFragment.LAST_NAME_INDEX, sNames.size() - 1); + args.putInt(EditorFragment.LAST_INDEX_OF_NAMES_ARRAY, sNames.size() - 1); final Fragment editorFragment = Fragment.instantiate(getActivity(), EditorFragment.class.getName(), args); getChildFragmentManager().beginTransaction() .replace(R.id.fragment_container, editorFragment, EditorFragment.class.getName()) diff --git a/android/src/com/mapswithme/maps/editor/data/NamesDataSource.java b/android/src/com/mapswithme/maps/editor/data/NamesDataSource.java index c7f0fb0caa..fd8ff8f631 100644 --- a/android/src/com/mapswithme/maps/editor/data/NamesDataSource.java +++ b/android/src/com/mapswithme/maps/editor/data/NamesDataSource.java @@ -9,8 +9,8 @@ package com.mapswithme.maps.editor.data; * and mandatoryNamesCount - count of names which should be always shown. */ public class NamesDataSource { - private LocalizedName[] mNames; - private int mMandatoryNamesCount; + private final LocalizedName[] mNames; + private final int mMandatoryNamesCount; public NamesDataSource(LocalizedName[] names, int mandatoryNamesCount) { this.mNames = names; |