[android] Modified measuring children PlaceholderView

This commit is contained in:
Dmitry Donskoy 2018-07-24 13:09:10 +03:00 committed by Arsentiy Milchakov
parent f8c9affdf1
commit 2e32044c92
3 changed files with 1 additions and 6 deletions

View file

@ -93,7 +93,6 @@
<com.mapswithme.maps.widget.PlaceholderView
android:id="@+id/placeholder"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_gravity="center"
android:paddingLeft="@dimen/margin_double_and_half"

View file

@ -86,7 +86,7 @@ enum DiscoveryManager
if (mCallback == null)
return;
if (isAggregateResultsEmpty(results, type) || true)
if (isAggregateResultsEmpty(results, type))
{
mCallback.onNotFound();
return;

View file

@ -38,8 +38,6 @@ public class PlaceholderView extends FrameLayout
private int mImageSizeSmall;
private int mPaddingImage;
private int mPaddingNoImage;
private float mScreenHeight;
private float mScreenWidth;
@DrawableRes
private int mImgSrcDefault;
@ -83,8 +81,6 @@ public class PlaceholderView extends FrameLayout
mImageSizeSmall = res.getDimensionPixelSize(R.dimen.placeholder_size_small);
mPaddingImage = res.getDimensionPixelSize(R.dimen.placeholder_margin_top);
mPaddingNoImage = res.getDimensionPixelSize(R.dimen.placeholder_margin_top_no_image);
mScreenHeight = res.getDisplayMetrics().heightPixels;
mScreenWidth = res.getDisplayMetrics().widthPixels;
LayoutInflater.from(context).inflate(R.layout.placeholder, this, true);
initDefaultValues(context, attrs);