Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-07-17 18:38:09 +0300
committerArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-07-19 14:43:41 +0300
commitd247b1f856707831873717d3f475bd55ac4d4bed (patch)
tree4a72980ae5b5a2673632eddceef97350a970a1ad /android
parentfe4ccf09c2c21d9b1499429f5531b765d9c928e2 (diff)
Review changes
Diffstat (limited to 'android')
-rw-r--r--android/src/com/mapswithme/maps/editor/EditorFragment.java12
-rw-r--r--android/src/com/mapswithme/maps/editor/EditorHostFragment.java2
-rw-r--r--android/src/com/mapswithme/maps/editor/data/NamesDataSource.java4
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;