()
- {
- @Override
- public PaymentData createFromParcel(Parcel in)
- {
- return new PaymentData(in);
- }
-
- @Override
- public PaymentData[] newArray(int size)
- {
- return new PaymentData[size];
- }
- };
-
- @NonNull
- public String getServerId()
- {
- return mServerId;
- }
-
- @NonNull
- public String getProductId()
- {
- return mProductId;
- }
-
- @NonNull
- public String getName()
- {
- return mName;
- }
-
- @Nullable
- public String getImgUrl()
- {
- return mImgUrl;
- }
-
- @NonNull
- public String getAuthorName()
- {
- return mAuthorName;
- }
-
- @NonNull
- public String getGroup()
- {
- return mGroup;
- }
-
- @Override
- public int describeContents()
- {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags)
- {
- dest.writeString(mServerId);
- dest.writeString(mProductId);
- dest.writeString(mName);
- dest.writeString(mImgUrl);
- dest.writeString(mAuthorName);
- dest.writeString(mGroup);
- }
-}
diff --git a/android/src/com/mapswithme/maps/content/CoreDetachable.java b/android/src/com/mapswithme/maps/content/CoreDetachable.java
deleted file mode 100644
index eabdf9e92f..0000000000
--- a/android/src/com/mapswithme/maps/content/CoreDetachable.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.mapswithme.maps.content;
-
-public interface CoreDetachable
-{
- void attachCore();
- void detachCore();
-}
diff --git a/android/src/com/mapswithme/maps/widget/DotPager.java b/android/src/com/mapswithme/maps/widget/DotPager.java
deleted file mode 100644
index 1df9c64bc0..0000000000
--- a/android/src/com/mapswithme/maps/widget/DotPager.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import androidx.annotation.DrawableRes;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.StringRes;
-import androidx.viewpager.widget.PagerAdapter;
-import androidx.viewpager.widget.ViewPager;
-
-import com.mapswithme.maps.R;
-import com.mapswithme.util.ThemeUtils;
-import com.mapswithme.util.UiUtils;
-
-/**
- * This widget allows the user to flip left and right through pages of data.
- * Also it can be configured with indicator view that will be placed below of pages.
- * The indicator will be drawn as the gray dots. A dots count will be equal page count.
- * The bold dot corresponds the current page.
- *
- * There are few dependencies that should be provided to get this
- * widget work:
- *
- *
- * - @see {@link ViewPager}
- * - @see {@link PagerAdapter}
- * - An indicator. It's a {@link ViewGroup} which will consist dots. If the indicator
- * is not needed this dependency can be missed or
null
- * - @see {@link Context}
- * - A page listener is an observable mechanism for listening page changing. It can be missed or null
- *
- */
-public class DotPager implements ViewPager.OnPageChangeListener
-{
- @NonNull
- private final ViewPager mPager;
- @NonNull
- private final PagerAdapter mAdapter;
- @Nullable
- private final ViewGroup mIndicator;
- @NonNull
- private final ImageView[] mDots;
- @NonNull
- private final Context mContext;
- @Nullable
- private final OnPageChangedListener mListener;
- @StringRes
- private final int mActiveDotDrawableResId;
- @StringRes
- private final int mInactiveDotDrawableResId;
-
-
- private DotPager(@NonNull Builder builder)
- {
- mContext = builder.mContext;
- mPager = builder.mPager;
- mAdapter = builder.mAdapter;
- mIndicator = builder.mIndicatorContainer;
- mListener = builder.mListener;
- mDots = new ImageView[mAdapter.getCount()];
- mActiveDotDrawableResId = builder.mActiveDotDrawableResId;
- mInactiveDotDrawableResId = builder.mInactiveDotDrawableResId;
- }
-
- public void show()
- {
- configure();
- updateIndicator();
- }
-
- private void configure()
- {
- configurePager();
- configureIndicator();
- }
-
- private void configurePager()
- {
- mPager.setAdapter(mAdapter);
- mPager.clearOnPageChangeListeners();
- mPager.addOnPageChangeListener(this);
- }
-
- private void configureIndicator()
- {
- if (mIndicator == null)
- return;
-
- mIndicator.removeAllViews();
-
- if (mAdapter.getCount() == 1)
- return;
-
- for (int i = 0; i < mDots.length; i++)
- {
- mDots[i] = new ImageView(mContext);
- LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
- layoutParams.setMargins(0, 0, UiUtils.dimen(mContext, R.dimen.margin_half), 0);
- mIndicator.addView(mDots[i], i, layoutParams);
- }
- }
-
- @Override
- public void onPageSelected(int position)
- {
- if (mIndicator != null)
- updateIndicator();
-
- if (mListener != null)
- mListener.onPageChanged(position);
- }
-
- private void updateIndicator()
- {
- if (mAdapter.getCount() == 1)
- return;
-
- int currentPage = mPager.getCurrentItem();
- for (int i = 0; i < mAdapter.getCount(); i++)
- {
- boolean isCurPage = i == currentPage;
- @DrawableRes int dotDrawable;
- if (ThemeUtils.isNightTheme(mContext))
- dotDrawable = isCurPage ? R.drawable.news_marker_active_night : R.drawable.news_marker_inactive_night;
- else
- dotDrawable = isCurPage ? mActiveDotDrawableResId : mInactiveDotDrawableResId;
- mDots[i].setImageResource(dotDrawable);
- }
- }
-
- @Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
- {
- //no op
- }
-
- @Override
- public void onPageScrollStateChanged(int state)
- {
- //no op
- }
-
- public static class Builder
- {
- @NonNull
- private final ViewPager mPager;
- @NonNull
- private final PagerAdapter mAdapter;
- @Nullable
- private ViewGroup mIndicatorContainer;
- @NonNull
- private final Context mContext;
- @Nullable
- private OnPageChangedListener mListener;
- @DrawableRes
- private int mActiveDotDrawableResId = R.drawable.news_marker_active;
- @DrawableRes
- private int mInactiveDotDrawableResId = R.drawable.news_marker_inactive;
-
- public Builder(@NonNull Context context, @NonNull ViewPager pager, @NonNull PagerAdapter adapter)
- {
- mContext = context;
- mPager = pager;
- mAdapter = adapter;
- }
-
- public Builder setIndicatorContainer(@NonNull ViewGroup indicatorContainer)
- {
- mIndicatorContainer = indicatorContainer;
- return this;
- }
-
- public Builder setPageChangedListener(@Nullable OnPageChangedListener listener)
- {
- mListener = listener;
- return this;
- }
-
- @NonNull
- public Builder setActiveDotDrawable(@DrawableRes int resId)
- {
- mActiveDotDrawableResId = resId;
- return this;
- }
-
- @NonNull
- public Builder setInactiveDotDrawable(@DrawableRes int resId)
- {
- mInactiveDotDrawableResId = resId;
- return this;
- }
-
- public DotPager build()
- {
- return new DotPager(this);
- }
- }
-
- public interface OnPageChangedListener
- {
- void onPageChanged(int position);
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/FadeView.java b/android/src/com/mapswithme/maps/widget/FadeView.java
deleted file mode 100644
index 5faf48e4c8..0000000000
--- a/android/src/com/mapswithme/maps/widget/FadeView.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.animation.Animator;
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.widget.FrameLayout;
-
-import androidx.annotation.IntegerRes;
-import androidx.annotation.NonNull;
-
-import com.mapswithme.maps.R;
-import com.mapswithme.util.UiUtils;
-
-public class FadeView extends FrameLayout
-{
- private static final float FADE_ALPHA_VALUE = 0.4f;
- @IntegerRes
- private static final int DURATION_RES_ID = R.integer.anim_fade_main;
-
- private final Animator.AnimatorListener mFadeInListener = new UiUtils.SimpleAnimatorListener()
- {
- @Override
- public void onAnimationEnd(Animator animation)
- {
- UiUtils.show(FadeView.this);
- animation.removeListener(this);
- }
- };
-
- private final Animator.AnimatorListener mFadeOutListener = new UiUtils.SimpleAnimatorListener()
- {
- @Override
- public void onAnimationEnd(Animator animation)
- {
- UiUtils.hide(FadeView.this);
- animation.removeListener(this);
- }
- };
-
-
- public interface Listener
- {
- boolean onTouch();
- }
-
- private Listener mListener;
-
- public FadeView(Context context)
- {
- super(context);
- }
-
- public FadeView(Context context, AttributeSet attrs)
- {
- super(context, attrs);
- }
-
- public FadeView(Context context, AttributeSet attrs, int defStyleAttr)
- {
- super(context, attrs, defStyleAttr);
- }
-
- public void setListener(Listener listener)
- {
- mListener = listener;
- }
-
- public void fadeIn()
- {
- setAlpha(0.0f);
- UiUtils.show(this);
- animate().alpha(FADE_ALPHA_VALUE)
- .setDuration(getResources().getInteger(DURATION_RES_ID))
- .setListener(mFadeInListener)
- .start();
- }
-
- public void fadeOut()
- {
- setAlpha(FADE_ALPHA_VALUE);
- animate().alpha(0.0f)
- .setDuration(getResources().getInteger(DURATION_RES_ID))
- .setListener(mFadeOutListener)
- .start();
- }
-
- @Override
- public boolean onTouchEvent(@NonNull MotionEvent event)
- {
- if (event.getAction() != MotionEvent.ACTION_DOWN)
- return true;
-
- if (mListener == null || mListener.onTouch())
- fadeOut();
-
- return true;
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/FragmentPageViewProvider.java b/android/src/com/mapswithme/maps/widget/FragmentPageViewProvider.java
deleted file mode 100644
index 2ab11f59e8..0000000000
--- a/android/src/com/mapswithme/maps/widget/FragmentPageViewProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.fragment.app.Fragment;
-import androidx.fragment.app.FragmentManager;
-import androidx.fragment.app.FragmentPagerAdapter;
-import androidx.viewpager.widget.ViewPager;
-
-import java.util.NoSuchElementException;
-
-public class FragmentPageViewProvider implements PageViewProvider
-{
- private static final String ANDROID_SWITCHER_TAG_SEGMENT = "android:switcher:";
- private static final String SEPARATOR_TAG_SEGMENT = ":";
-
- @NonNull
- private final FragmentManager mFragManager;
- private final int mPagerId;
-
- FragmentPageViewProvider(@NonNull FragmentManager fragManager, @NonNull ViewPager pager)
- {
- checkAdapterClass(pager);
- mFragManager = fragManager;
- mPagerId = pager.getId();
- }
-
- private static void checkAdapterClass(@NonNull ViewPager pager)
- {
- try
- {
- FragmentPagerAdapter adapter = (FragmentPagerAdapter) pager.getAdapter();
- if (adapter == null)
- throw new IllegalStateException("Adapter not found");
- }
- catch (ClassCastException e)
- {
- throw new IllegalStateException("Adapter has to be FragmentPagerAdapter or its descendant");
- }
- }
-
- @Nullable
- @Override
- public View findViewByIndex(int index)
- {
- String tag = makePagerFragmentTag(index);
- Fragment page = getSupportFragmentManager().findFragmentByTag(tag);
- if (page == null)
- throw new NoSuchElementException("No such element for tag : " + tag);
-
- return page.getView();
- }
-
- private int getId()
- {
- return mPagerId;
- }
-
- @NonNull
- private FragmentManager getSupportFragmentManager()
- {
- return mFragManager;
- }
-
- @NonNull
- private String makePagerFragmentTag(int index)
- {
- return ANDROID_SWITCHER_TAG_SEGMENT + getId() + SEPARATOR_TAG_SEGMENT + index;
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/InputWebView.java b/android/src/com/mapswithme/maps/widget/InputWebView.java
deleted file mode 100644
index 0960753f89..0000000000
--- a/android/src/com/mapswithme/maps/widget/InputWebView.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.webkit.WebView;
-
-/**
- * Workaround for not appearing soft keyboard in webview.
- * Check bugreport at https://code.google.com/p/android/issues/detail?id=7189 for more details.
- */
-public class InputWebView extends WebView
-{
- public InputWebView(Context context)
- {
- super(context);
- }
-
- public InputWebView(Context context, AttributeSet attrs)
- {
- super(context, attrs);
- }
-
- public InputWebView(Context context, AttributeSet attrs, int defStyleAttr)
- {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- public boolean onCheckIsTextEditor()
- {
- return true;
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/InteractiveCounterView.java b/android/src/com/mapswithme/maps/widget/InteractiveCounterView.java
deleted file mode 100644
index 2f7cc27dd5..0000000000
--- a/android/src/com/mapswithme/maps/widget/InteractiveCounterView.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import androidx.annotation.DrawableRes;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import com.mapswithme.maps.R;
-import com.mapswithme.util.UiUtils;
-
-public class InteractiveCounterView extends RelativeLayout
-{
- @SuppressWarnings("NotNullFieldNotInitialized")
- @NonNull
- private View mMinusView;
- @SuppressWarnings("NotNullFieldNotInitialized")
- @NonNull
- private View mPlusView;
- @SuppressWarnings("NotNullFieldNotInitialized")
- @NonNull
- private TextView mCounterView;
- @Nullable
- private String mTitle;
- @Nullable
- private String mSubtitle;
- private int mMinValue;
- private int mMaxValue;
- private int mDefaultValue;
- @DrawableRes
- private int mIconRes;
- @Nullable
- private CounterChangeListener mChangeListener;
- @NonNull
- private final OnClickListener mPlusClickListener = new OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- int value = getCurrentValue();
- mCounterView.setText(String.valueOf(++value));
- updateConstraints();
- if (mChangeListener != null)
- mChangeListener.onChange();
- }
- };
-
- @NonNull
- private final OnClickListener mMinusClickListener = new OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- int value = getCurrentValue();
- mCounterView.setText(String.valueOf(--value));
- updateConstraints();
- if (mChangeListener != null)
- mChangeListener.onChange();
- }
- };
-
- public InteractiveCounterView(Context context)
- {
- super(context);
- }
-
- public InteractiveCounterView(Context context, AttributeSet attrs)
- {
- super(context, attrs);
- init(attrs);
- }
-
- public InteractiveCounterView(Context context, AttributeSet attrs, int defStyleAttr)
- {
- super(context, attrs, defStyleAttr);
- init(attrs);
- }
-
- public InteractiveCounterView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
- {
- super(context, attrs, defStyleAttr, defStyleRes);
- init(attrs);
- }
-
- private void init(@Nullable AttributeSet attrs)
- {
- TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.InteractiveCounterView);
- try
- {
- mMinValue = a.getInt(R.styleable.InteractiveCounterView_minValue, 0);
- mMaxValue = a.getInt(R.styleable.InteractiveCounterView_maxValue, Integer.MAX_VALUE);
- mDefaultValue = a.getInt(R.styleable.InteractiveCounterView_android_defaultValue, mMinValue);
- mIconRes = a.getResourceId(R.styleable.InteractiveCounterView_android_src, UiUtils.NO_ID);
- mTitle = a.getString(R.styleable.InteractiveCounterView_title);
- mSubtitle = a.getString(R.styleable.InteractiveCounterView_subtitle);
- LayoutInflater.from(getContext()).inflate(R.layout.interactive_counter, this, true);
- }
- finally
- {
- a.recycle();
- }
- }
-
- @Override
- protected void onFinishInflate()
- {
- super.onFinishInflate();
- ImageView iconView = findViewById(R.id.icon);
- iconView.setImageResource(mIconRes);
- TextView titleView = findViewById(R.id.title);
- UiUtils.showIf(!TextUtils.isEmpty(mTitle), titleView);
- titleView.setText(mTitle);
- TextView subtitleView = findViewById(R.id.subtitle);
- UiUtils.showIf(!TextUtils.isEmpty(mSubtitle), subtitleView);
- subtitleView.setText(mSubtitle);
- mMinusView = findViewById(R.id.minus);
- mMinusView.setOnClickListener(mMinusClickListener);
- mPlusView = findViewById(R.id.plus);
- mPlusView.setOnClickListener(mPlusClickListener);
- mCounterView = findViewById(R.id.counter);
- if (mDefaultValue >= mMinValue && mDefaultValue <= mMaxValue)
- mCounterView.setText(String.valueOf(mDefaultValue));
- else
- mCounterView.setText(String.valueOf(mMinValue));
- updateConstraints();
- }
-
- public int getCurrentValue()
- {
- return Integer.parseInt(mCounterView.getText().toString());
- }
-
- public void setCurrentValue(int value)
- {
- mCounterView.setText(String.valueOf(value));
- updateConstraints();
- }
-
- private void updateConstraints()
- {
- int value = getCurrentValue();
- mMinusView.setEnabled(value != mMinValue);
- mPlusView.setEnabled(value != mMaxValue);
- }
-
- public void setChangeListener(@Nullable CounterChangeListener listener)
- {
- mChangeListener = listener;
- }
-
- public interface CounterChangeListener
- {
- void onChange();
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/LineCountTextView.java b/android/src/com/mapswithme/maps/widget/LineCountTextView.java
deleted file mode 100644
index 46d3d9e644..0000000000
--- a/android/src/com/mapswithme/maps/widget/LineCountTextView.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.text.Layout;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-public class LineCountTextView extends TextView
-{
- public interface OnLineCountCalculatedListener
- {
-
- void onLineCountCalculated(boolean grater);
- }
-
- private OnLineCountCalculatedListener mListener;
-
- public LineCountTextView(Context context)
- {
- super(context);
- }
-
- public LineCountTextView(Context context, AttributeSet attrs)
- {
- super(context, attrs);
- }
-
- public LineCountTextView(Context context, AttributeSet attrs, int defStyleAttr)
- {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- protected void onDraw(Canvas canvas)
- {
- super.onDraw(canvas);
- Layout layout = getLayout();
-
- if (layout != null)
- {
- int textHeight = layout.getHeight();
- int viewHeight = getHeight();
-
- if (mListener != null)
- {
- mListener.onLineCountCalculated(textHeight > viewHeight);
- }
- }
- }
-
- public void setListener(OnLineCountCalculatedListener listener)
- {
- mListener = listener;
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/PageViewProvider.java b/android/src/com/mapswithme/maps/widget/PageViewProvider.java
deleted file mode 100644
index bf1022f9e0..0000000000
--- a/android/src/com/mapswithme/maps/widget/PageViewProvider.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.view.View;
-
-import androidx.annotation.Nullable;
-
-interface PageViewProvider
-{
- @Nullable
- View findViewByIndex(int index);
-}
diff --git a/android/src/com/mapswithme/maps/widget/PageViewProviderFactory.java b/android/src/com/mapswithme/maps/widget/PageViewProviderFactory.java
deleted file mode 100644
index 63f1986bfd..0000000000
--- a/android/src/com/mapswithme/maps/widget/PageViewProviderFactory.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import androidx.annotation.NonNull;
-import androidx.fragment.app.FragmentActivity;
-import androidx.viewpager.widget.ViewPager;
-
-class PageViewProviderFactory
-{
- @NonNull
- static PageViewProvider defaultProvider(@NonNull FragmentActivity activity,
- @NonNull ViewPager pager)
- {
- return new FragmentPageViewProvider(activity.getSupportFragmentManager(), pager);
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/RotateByAlphaDrawable.java b/android/src/com/mapswithme/maps/widget/RotateByAlphaDrawable.java
deleted file mode 100644
index 56ffbef05c..0000000000
--- a/android/src/com/mapswithme/maps/widget/RotateByAlphaDrawable.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-
-import androidx.annotation.AttrRes;
-import androidx.annotation.DrawableRes;
-
-import com.mapswithme.util.Graphics;
-
-public class RotateByAlphaDrawable extends Drawable
-{
- private final Drawable mBaseDrawable;
- private Rect mBounds;
- private float mAngle;
- private float mBaseAngle;
-
-
- public RotateByAlphaDrawable(Context context, @DrawableRes int resId, @AttrRes int tintAttr, boolean transparent)
- {
- super();
- mBaseDrawable = Graphics.tint(context, resId, tintAttr);
- computeAngle(transparent ? 0x00 : 0xFF);
- }
-
- private void computeAngle(int alpha)
- {
- mAngle = (alpha - 0xFF) / 3 + mBaseAngle;
- }
-
- public RotateByAlphaDrawable setBaseAngle(float angle)
- {
- mBaseAngle = angle;
- return this;
- }
-
- public RotateByAlphaDrawable setInnerBounds(Rect bounds)
- {
- mBounds = bounds;
- setBounds(mBounds);
- return this;
- }
-
- @Override
- public void setAlpha(int alpha)
- {
- mBaseDrawable.setAlpha(alpha);
- computeAngle(alpha);
- }
-
- @Override
- public void setColorFilter(ColorFilter cf)
- {
- mBaseDrawable.setColorFilter(cf);
- }
-
- @Override
- public int getOpacity()
- {
- return mBaseDrawable.getOpacity();
- }
-
- @Override
- protected void onBoundsChange(Rect bounds)
- {
- if (mBounds != null)
- bounds = mBounds;
-
- super.onBoundsChange(bounds);
- mBaseDrawable.setBounds(bounds);
- }
-
- @Override
- public void draw(Canvas canvas)
- {
- canvas.save();
- canvas.rotate(mAngle, mBaseDrawable.getBounds().width() / 2, mBaseDrawable.getBounds().height() / 2);
- mBaseDrawable.draw(canvas);
- canvas.restore();
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/StaticGridView.java b/android/src/com/mapswithme/maps/widget/StaticGridView.java
deleted file mode 100644
index f2a1662c16..0000000000
--- a/android/src/com/mapswithme/maps/widget/StaticGridView.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.GridView;
-
-public class StaticGridView extends GridView
-{
- public StaticGridView(Context context)
- {
- super(context);
- }
-
- public StaticGridView(Context context, AttributeSet attrs)
- {
- super(context, attrs);
- }
-
- public StaticGridView(Context context, AttributeSet attrs, int defStyleAttr)
- {
- super(context, attrs, defStyleAttr);
- }
-
- @Override
- public void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
- {
- super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(MEASURED_SIZE_MASK, MeasureSpec.AT_MOST));
- getLayoutParams().height = getMeasuredHeight();
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/TrackedTransitionDrawable.java b/android/src/com/mapswithme/maps/widget/TrackedTransitionDrawable.java
deleted file mode 100644
index c046674122..0000000000
--- a/android/src/com/mapswithme/maps/widget/TrackedTransitionDrawable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.mapswithme.maps.widget;
-
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.TransitionDrawable;
-
-/**
- * Same as {@link TransitionDrawable} but correctly tracks transition direction.
- * I.e. if transition is in "start" state, {@link #reverseTransition(int)} does not start straight transition.
- */
-public class TrackedTransitionDrawable extends TransitionDrawable
-{
- private boolean mStart = true;
-
-
- public TrackedTransitionDrawable(Drawable[] layers)
- {
- super(layers);
- }
-
- @Override
- public void startTransition(int durationMillis)
- {
- if (!mStart)
- return;
-
- mStart = false;
- super.startTransition(durationMillis);
- }
-
- @Override
- public void reverseTransition(int duration)
- {
- if (mStart)
- return;
-
- mStart = true;
- super.reverseTransition(duration);
- }
-
- @Override
- public void resetTransition()
- {
- mStart = true;
- super.resetTransition();
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/DividerItemDecorationWithPadding.java b/android/src/com/mapswithme/maps/widget/recycler/DividerItemDecorationWithPadding.java
index d3ae5d6760..928e190cef 100644
--- a/android/src/com/mapswithme/maps/widget/recycler/DividerItemDecorationWithPadding.java
+++ b/android/src/com/mapswithme/maps/widget/recycler/DividerItemDecorationWithPadding.java
@@ -1,15 +1,21 @@
package com.mapswithme.maps.widget.recycler;
+import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.view.View;
+import androidx.annotation.DimenRes;
import androidx.annotation.Dimension;
+import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
+import com.mapswithme.maps.R;
import com.mapswithme.maps.bookmarks.Holders;
+import java.util.Objects;
+
public class DividerItemDecorationWithPadding extends RecyclerView.ItemDecoration
{
@Dimension
@@ -17,10 +23,10 @@ public class DividerItemDecorationWithPadding extends RecyclerView.ItemDecoratio
@NonNull
private final Drawable mDivider;
- public DividerItemDecorationWithPadding(@NonNull Drawable divider, @Dimension int startMargin)
+ public DividerItemDecorationWithPadding(@NonNull Context context)
{
- mDivider = divider;
- mStartMargin = startMargin;
+ mDivider = Objects.requireNonNull(context.getDrawable(R.drawable.divider_base));
+ mStartMargin = context.getResources().getDimensionPixelSize(R.dimen.margin_quadruple_plus_half);
}
@Override
diff --git a/android/src/com/mapswithme/maps/widget/recycler/GridDividerItemDecoration.java b/android/src/com/mapswithme/maps/widget/recycler/GridDividerItemDecoration.java
deleted file mode 100644
index b8c40a2bac..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/GridDividerItemDecoration.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.graphics.Canvas;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
-/**
- * Adds interior dividers to a RecyclerView with a GridLayoutManager.
- */
-public class GridDividerItemDecoration extends RecyclerView.ItemDecoration
-{
-
- @NonNull
- private final Drawable mHorizontalDivider;
- @NonNull
- private final Drawable mVerticalDivider;
- private final int mNumColumns;
-
- /**
- * Sole constructor. Takes in {@link Drawable} objects to be used as
- * horizontal and vertical dividers.
- *
- * @param horizontalDivider A divider {@code Drawable} to be drawn on the
- * rows of the grid of the RecyclerView
- * @param verticalDivider A divider {@code Drawable} to be drawn on the
- * columns of the grid of the RecyclerView
- * @param numColumns The number of columns in the grid of the RecyclerView
- */
- public GridDividerItemDecoration(@NonNull Drawable horizontalDivider,
- @NonNull Drawable verticalDivider, int numColumns)
- {
- mHorizontalDivider = horizontalDivider;
- mVerticalDivider = verticalDivider;
- mNumColumns = numColumns;
- }
-
- /**
- * Draws horizontal and/or vertical dividers onto the parent RecyclerView.
- *
- * @param canvas The {@link Canvas} onto which dividers will be drawn
- * @param parent The RecyclerView onto which dividers are being added
- * @param state The current RecyclerView.State of the RecyclerView
- */
- @Override
- public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state)
- {
- drawHorizontalDividers(canvas, parent);
- drawVerticalDividers(canvas, parent);
- }
-
- /**
- * Determines the size and location of offsets between items in the parent
- * RecyclerView.
- *
- * @param outRect The {@link Rect} of offsets to be added around the child view
- * @param view The child view to be decorated with an offset
- * @param parent The RecyclerView onto which dividers are being added
- * @param state The current RecyclerView.State of the RecyclerView
- */
- @Override
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
- {
- super.getItemOffsets(outRect, view, parent, state);
-
- boolean childIsInLeftmostColumn = (parent.getChildAdapterPosition(view) % mNumColumns) == 0;
- if (!childIsInLeftmostColumn)
- outRect.left = mHorizontalDivider.getIntrinsicWidth();
-
- boolean childIsInFirstRow = (parent.getChildAdapterPosition(view)) < mNumColumns;
- if (!childIsInFirstRow)
- outRect.top = mVerticalDivider.getIntrinsicHeight();
- }
-
- /**
- * Adds horizontal dividers to a RecyclerView with a GridLayoutManager or
- * its subclass.
- *
- * @param canvas The {@link Canvas} onto which dividers will be drawn
- * @param parent The RecyclerView onto which dividers are being added
- */
- private void drawHorizontalDividers(Canvas canvas, RecyclerView parent)
- {
- int parentTop = parent.getPaddingTop();
- int parentBottom = parent.getHeight() - parent.getPaddingBottom();
-
- for (int i = 0; i < mNumColumns; i++)
- {
- View child = parent.getChildAt(i);
- RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
-
- int parentLeft = child.getRight() + params.rightMargin;
- int parentRight = parentLeft + mHorizontalDivider.getIntrinsicWidth();
-
- mHorizontalDivider.setBounds(parentLeft, parentTop, parentRight, parentBottom);
- mHorizontalDivider.draw(canvas);
- }
- }
-
- /**
- * Adds vertical dividers to a RecyclerView with a GridLayoutManager or its
- * subclass.
- *
- * @param canvas The {@link Canvas} onto which dividers will be drawn
- * @param parent The RecyclerView onto which dividers are being added
- */
- private void drawVerticalDividers(Canvas canvas, RecyclerView parent)
- {
- int parentLeft = parent.getPaddingLeft();
- int parentRight = parent.getWidth() - parent.getPaddingRight();
-
- int childCount = parent.getChildCount();
- int numRows = (childCount + (mNumColumns - 1)) / mNumColumns;
- for (int i = 0; i < numRows - 1; i++)
- {
- View child = parent.getChildAt(i * mNumColumns);
- RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
-
- int parentTop = child.getBottom() + params.bottomMargin;
- int parentBottom = parentTop + mVerticalDivider.getIntrinsicHeight();
-
- mVerticalDivider.setBounds(parentLeft, parentTop, parentRight, parentBottom);
- mVerticalDivider.draw(canvas);
- }
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/HotelDividerItemDecoration.java b/android/src/com/mapswithme/maps/widget/recycler/HotelDividerItemDecoration.java
deleted file mode 100644
index 1d21eb6b6a..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/HotelDividerItemDecoration.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.content.Context;
-import android.graphics.Rect;
-import android.view.View;
-
-import androidx.recyclerview.widget.DividerItemDecoration;
-import androidx.recyclerview.widget.RecyclerView;
-
-
-class HotelDividerItemDecoration extends DividerItemDecoration
-{
- /**
- * Creates a divider {@link RecyclerView.ItemDecoration} that can be used with a
- * {@link LinearLayoutManager}.
- *
- * @param context Current context, it will be used to access resources.
- * @param orientation Divider orientation. Should be {@link #HORIZONTAL} or {@link #VERTICAL}.
- */
- HotelDividerItemDecoration(Context context, int orientation)
- {
- super(context, orientation);
- }
-
- @Override
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
- {
- super.getItemOffsets(outRect, view, parent, state);
-
- int itemCount = state.getItemCount();
- int itemPosition = parent.getChildAdapterPosition(view);
- // Last position.
- if (itemPosition != RecyclerView.NO_POSITION && itemPosition > 0
- && itemCount > 0 && itemPosition == itemCount - 1)
- {
- outRect.set(0, 0, 0, 0);
- }
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/ItemDecoratorFactory.java b/android/src/com/mapswithme/maps/widget/recycler/ItemDecoratorFactory.java
deleted file mode 100644
index f8ddd44799..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/ItemDecoratorFactory.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.content.Context;
-
-import androidx.annotation.DimenRes;
-import androidx.annotation.DrawableRes;
-import androidx.annotation.NonNull;
-import androidx.core.content.ContextCompat;
-import androidx.recyclerview.widget.DividerItemDecoration;
-import androidx.recyclerview.widget.RecyclerView;
-
-import com.mapswithme.maps.R;
-
-import java.util.Objects;
-
-public class ItemDecoratorFactory
-{
- @NonNull
- public static RecyclerView.ItemDecoration createHotelGalleryDecorator(@NonNull Context context,
- int orientation)
- {
- DividerItemDecoration decoration = new HotelDividerItemDecoration(context, orientation);
- @DrawableRes
- int dividerId = R.drawable.divider_transparent_quarter;
- decoration.setDrawable(Objects.requireNonNull(ContextCompat.getDrawable(context, dividerId)));
- return decoration;
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createSponsoredGalleryDecorator(@NonNull Context context,
- int orientation)
- {
- DividerItemDecoration decoration = new SponsoredDividerItemDecoration(context, orientation);
- @DrawableRes
- int dividerId = R.drawable.divider_transparent_half;
- decoration.setDrawable(Objects.requireNonNull(ContextCompat.getDrawable(context, dividerId)));
- return decoration;
- }
-
- public static RecyclerView.ItemDecoration createPlacePagePromoGalleryDecorator(@NonNull Context context,
- int orientation)
- {
- DividerItemDecoration decoration = new SponsoredDividerItemDecoration(context, orientation);
- @DrawableRes
- int dividerId = R.drawable.divider_transparent_quarter;
- decoration.setDrawable(Objects.requireNonNull(ContextCompat.getDrawable(context, dividerId)));
- return decoration;
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createRatingRecordDecorator(@NonNull Context context,
- int orientation,
- @DrawableRes int dividerResId)
- {
- DividerItemDecoration decoration = new DividerItemDecoration(context, orientation);
- decoration.setDrawable(Objects.requireNonNull(ContextCompat.getDrawable(context, dividerResId)));
- return decoration;
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createDefaultDecorator(@NonNull Context context,
- int orientation)
- {
- return new DividerItemDecoration(context, orientation);
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createVerticalDefaultDecorator(@NonNull Context context)
- {
- return new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createDecoratorWithPadding(@NonNull Context context)
- {
- @DrawableRes
- int dividerRes = R.drawable.divider_base;
- @DimenRes
- int marginDimen = R.dimen.margin_quadruple_plus_half;
- return new DividerItemDecorationWithPadding(
- Objects.requireNonNull(context.getDrawable(dividerRes)),
- context.getResources().getDimensionPixelSize(marginDimen));
- }
-
- @NonNull
- public static RecyclerView.ItemDecoration createRatingRecordDecorator(@NonNull Context context,
- int horizontal)
- {
- return createRatingRecordDecorator(context, horizontal, R.drawable.divider_transparent_base);
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/SingleChangeItemAnimator.java b/android/src/com/mapswithme/maps/widget/recycler/SingleChangeItemAnimator.java
deleted file mode 100644
index 86d6ad3008..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/SingleChangeItemAnimator.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.view.View;
-import android.view.ViewGroup;
-
-import androidx.annotation.Nullable;
-import androidx.core.view.ViewCompat;
-import androidx.core.view.ViewPropertyAnimatorCompat;
-import androidx.core.view.ViewPropertyAnimatorListener;
-import androidx.recyclerview.widget.RecyclerView;
-import androidx.recyclerview.widget.SimpleItemAnimator;
-
-import com.mapswithme.util.UiUtils;
-
-public class SingleChangeItemAnimator extends SimpleItemAnimator
-{
- private static final int DURATION = 350;
-
- @Nullable
- private ViewPropertyAnimatorCompat mAnimation;
- private boolean mFinished;
-
- @Override
- public long getChangeDuration()
- {
- return DURATION;
- }
-
- @Override
- public boolean animateChange(final RecyclerView.ViewHolder oldHolder,
- final RecyclerView.ViewHolder newHolder, int fromLeft, int fromTop,
- int toLeft, int toTop)
- {
- mAnimation = ViewCompat.animate(oldHolder.itemView);
- if (mAnimation == null)
- return false;
-
- mFinished = false;
- ViewGroup group = (ViewGroup) ((ViewGroup) oldHolder.itemView).getChildAt(0);
- for (int i = 0; i < group.getChildCount(); i++)
- UiUtils.hide(group.getChildAt(i));
-
- int from = oldHolder.itemView.getWidth();
- int target = newHolder.itemView.getWidth();
- oldHolder.itemView.setPivotX(0.0f);
- mAnimation
- .setDuration(getChangeDuration())
- .scaleX(((float) target / (float) from))
- .setListener(new ViewPropertyAnimatorListener()
- {
- @Override
- public void onAnimationStart(View view) {}
- @Override
- public void onAnimationCancel(View view) {}
-
- @Override
- public void onAnimationEnd(View view)
- {
- mFinished = true;
- mAnimation.setListener(null);
- UiUtils.hide(oldHolder.itemView, newHolder.itemView);
- dispatchChangeFinished(oldHolder, true);
- dispatchChangeFinished(newHolder, false);
- dispatchAnimationsFinished();
- onAnimationFinished();
- }
- })
- .start();
- return false;
- }
-
- public void onAnimationFinished() {}
-
- @Override
- public void endAnimation(RecyclerView.ViewHolder item)
- {
- if (mAnimation != null)
- mAnimation.cancel();
- }
-
- @Override
- public void endAnimations()
- {
- if (mAnimation != null)
- mAnimation.cancel();
- }
-
- @Override
- public boolean isRunning()
- {
- return mAnimation != null && !mFinished;
- }
-
- @Override
- public boolean animateRemove(final RecyclerView.ViewHolder holder)
- {
- return false;
- }
-
- @Override
- public boolean animateAdd(RecyclerView.ViewHolder holder)
- {
- return false;
- }
-
- @Override
- public boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY)
- {
- return false;
- }
-
- @Override
- public void runPendingAnimations() {}
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/SponsoredDividerItemDecoration.java b/android/src/com/mapswithme/maps/widget/recycler/SponsoredDividerItemDecoration.java
deleted file mode 100644
index 6eeeea18aa..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/SponsoredDividerItemDecoration.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.content.Context;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.DividerItemDecoration;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
-class SponsoredDividerItemDecoration extends DividerItemDecoration
-{
- private int mDividerWidth;
- /**
- * Creates a divider {@link RecyclerView.ItemDecoration} that can be used with a
- * {@link LinearLayoutManager}.
- *
- * @param context Current context, it will be used to access resources.
- * @param orientation Divider orientation. Should be {@link #HORIZONTAL} or {@link #VERTICAL}.
- */
- SponsoredDividerItemDecoration(Context context, int orientation)
- {
- super(context, orientation);
- }
-
- @Override
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
- {
- super.getItemOffsets(outRect, view, parent, state);
- // First element.
- if (parent.getChildAdapterPosition(view) == 0)
- outRect.left = mDividerWidth;
- }
-
- @Override
- public void setDrawable(@NonNull Drawable drawable)
- {
- super.setDrawable(drawable);
- mDividerWidth = drawable.getIntrinsicWidth();
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/TagItemDecoration.java b/android/src/com/mapswithme/maps/widget/recycler/TagItemDecoration.java
deleted file mode 100644
index 7e58330597..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/TagItemDecoration.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.graphics.Canvas;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.view.View;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
-/**
- * Adds interior dividers to a RecyclerView with a TagLayoutManager or its
- * subclass.
- */
-public class TagItemDecoration extends RecyclerView.ItemDecoration
-{
- @NonNull
- private final Drawable mDivider;
-
- public TagItemDecoration(@NonNull Drawable divider)
- {
- mDivider = divider;
- }
-
- /**
- * Draws horizontal and vertical dividers onto the parent RecyclerView.
- *
- * @param canvas The {@link Canvas} onto which dividers will be drawn
- * @param parent The RecyclerView onto which dividers are being added
- * @param state The current RecyclerView.State of the RecyclerView
- */
- @Override
- public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state)
- {
- if (state.isMeasuring())
- return;
-
- int parentRight = parent.getWidth() - parent.getPaddingRight();
- int parentLeft = parent.getPaddingLeft();
- int lastHeight = Integer.MIN_VALUE;
-
- int childCount = parent.getChildCount();
- for (int i = 0; i < childCount; i++)
- {
- View child = parent.getChildAt(i);
-
- if (child.getTop() <= lastHeight)
- {
- mDivider.setBounds(child.getLeft() - mDivider.getIntrinsicWidth(),
- child.getTop(),
- child.getLeft(),
- child.getBottom());
- }
- else
- {
- mDivider.setBounds(parentLeft,
- child.getTop() - mDivider.getIntrinsicHeight(),
- parentRight,
- child.getTop());
- }
- mDivider.draw(canvas);
- lastHeight = child.getTop();
- }
- }
-
- /**
- * Determines the size and location of offsets between items in the parent
- * RecyclerView.
- *
- * @param outRect The {@link Rect} of offsets to be added around the child
- * view
- * @param view The child view to be decorated with an offset
- * @param parent The RecyclerView onto which dividers are being added
- * @param state The current RecyclerView.State of the RecyclerView
- */
- @Override
- public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state)
- {
- super.getItemOffsets(outRect, view, parent, state);
-
- outRect.left = mDivider.getIntrinsicWidth();
- outRect.top = mDivider.getIntrinsicHeight();
- }
-
- @NonNull
- protected Drawable getDivider()
- {
- return mDivider;
- }
-}
diff --git a/android/src/com/mapswithme/maps/widget/recycler/TagLayoutManager.java b/android/src/com/mapswithme/maps/widget/recycler/TagLayoutManager.java
deleted file mode 100644
index e137a1ebb9..0000000000
--- a/android/src/com/mapswithme/maps/widget/recycler/TagLayoutManager.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.mapswithme.maps.widget.recycler;
-
-import android.view.View;
-
-import androidx.recyclerview.widget.RecyclerView;
-
-/**
- * This LayoutManager designed only for use with RecyclerView.setNestedScrollingEnabled(false)
- * and recycle item must be wrap_content or fixed size
- */
-public class TagLayoutManager extends RecyclerView.LayoutManager
-{
- public TagLayoutManager()
- {
- setAutoMeasureEnabled(true);
- }
-
- @Override
- public RecyclerView.LayoutParams generateDefaultLayoutParams()
- {
- return new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT,
- RecyclerView.LayoutParams.WRAP_CONTENT);
- }
-
- @Override
- public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state)
- {
- detachAndScrapAttachedViews(recycler);
-
- int widthUsed = 0;
- int heightUsed = 0;
- int lineHeight = 0;
- int itemsCountOneLine = 0;
- for (int i = 0; i < getItemCount(); i++)
- {
- View child = recycler.getViewForPosition(i);
- addView(child);
- measureChildWithMargins(child, widthUsed, heightUsed);
- int width = getDecoratedMeasuredWidth(child);
- int height = getDecoratedMeasuredHeight(child);
- lineHeight = Math.max(lineHeight, height);
- if (widthUsed + width >= getWidth())
- {
- widthUsed = 0;
- if (itemsCountOneLine > 0)
- {
- itemsCountOneLine = -1;
- heightUsed += lineHeight;
- child.forceLayout();
- measureChildWithMargins(child, widthUsed, heightUsed);
- width = getDecoratedMeasuredWidth(child);
- height = getDecoratedMeasuredHeight(child);
- }
- lineHeight = 0;
- }
- layoutDecorated(child, widthUsed, heightUsed, widthUsed + width, heightUsed + height);
- widthUsed += width;
- itemsCountOneLine++;
- }
- }
-}