forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
299afdd334
commit
e6d20d5fae
5 changed files with 5 additions and 11 deletions
|
@ -54,7 +54,7 @@ template<typename TValue, typename TToJavaFn>
|
|||
jobjectArray ToJavaArray(JNIEnv * env, jclass clazz, vector<TValue> const & src, TToJavaFn && toJavaFn)
|
||||
{
|
||||
int const size = src.size();
|
||||
auto jArray = env->NewObjectArray(size, clazz, 0);
|
||||
jobjectArray jArray = env->NewObjectArray(size, clazz, 0);
|
||||
for (size_t i = 0; i < size; i++)
|
||||
{
|
||||
TScopedLocalRef jItem(env, toJavaFn(env, src[i]));
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/editor_height_field"
|
||||
android:animateLayoutChanges="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="@dimen/margin_base"
|
||||
android:paddingLeft="@dimen/margin_base"
|
||||
|
@ -41,10 +39,7 @@
|
|||
tools:drawableRight="@drawable/ic_expand_more"
|
||||
tools:ignore="UnusedAttribute"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/names"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
<include layout="@layout/recycler_default"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_langs"
|
||||
|
|
|
@ -246,7 +246,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||
UiUtils.hide(view.findViewById(R.id.add_langs));
|
||||
mLocalizedShow = (TextView) view.findViewById(R.id.show_langs);
|
||||
mLocalizedShow.setOnClickListener(this);
|
||||
mLocalizedNames = (RecyclerView) view.findViewById(R.id.names);
|
||||
mLocalizedNames = (RecyclerView) view.findViewById(R.id.recycler);
|
||||
mLocalizedNames.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
mLocalizedNamesAdapter = new MultilanguageAdapter(Editor.nativeGetLocalizedNames());
|
||||
mLocalizedNames.setAdapter(mLocalizedNamesAdapter);
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.mapswithme.maps.editor;
|
|||
import android.support.v7.util.SortedList;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.util.SortedListAdapterCallback;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -29,7 +30,7 @@ public class MultilanguageAdapter extends RecyclerView.Adapter<MultilanguageAdap
|
|||
@Override
|
||||
public boolean areContentsTheSame(LocalizedName oldItem, LocalizedName newItem)
|
||||
{
|
||||
return oldItem.name.equals(newItem.name);
|
||||
return TextUtils.equals(oldItem.name, newItem.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue