[android] fix: Correct placepage details background.

This commit is contained in:
Alexander Marchuk 2015-09-28 14:37:30 +03:00
parent 5fc18b5285
commit f4e66eefa2
4 changed files with 11 additions and 7 deletions

View file

@ -4,16 +4,14 @@
android:id="@+id/pp__preview"
layout="@layout/place_page_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_place_page_back"/>
android:layout_height="wrap_content"/>
<include
android:id="@+id/pp__details_frame"
layout="@layout/place_page_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/pp__preview"
android:background="@color/bg_top_panels"/>
android:layout_below="@id/pp__preview"/>
<include
android:id="@+id/pp__buttons"
@ -22,4 +20,4 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@id/pp__details_frame"/>
</merge>
</merge>

View file

@ -14,7 +14,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/pp__buttons"
android:layout_marginTop="56dp"/>
android:layout_marginTop="56dp"
android:background="@color/bg_top_panels"/>
<include
android:id="@+id/pp__buttons"
@ -28,4 +29,4 @@
layout="@layout/toolbar_elevated"
android:visibility="gone"/>
</merge>
</merge>

View file

@ -6,6 +6,7 @@
android:id="@+id/pp__details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_top_panels"
android:overScrollMode="never">
<LinearLayout
android:id="@+id/rl__place_details"

View file

@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.location.Location;
import android.net.Uri;
@ -223,6 +224,9 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
setElevation(UiUtils.dimen(R.dimen.appbar_elevation));
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE)
mPpDetails.setBackgroundResource(0);
}
private void init(AttributeSet attrs, int defStyleAttr)