Chris Craik 1df26446b7 Rework and clean up DisplayList projection
Move the projection surface to be a property of a DisplayList,
set to true for every background drawable.

Additionally, handle a projecting view background such that it doesn't
try to project onto itself (which is undesirable).

Change-Id: Ic70b17474bd87340e80767f8518f73b233419c7a
2014-02-06 16:07:37 -08:00

37 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#66ff0000"
tools:context="com.example.projection.ProjectionActivity"
tools:ignore="MergeRootFrame">
<TextView
android:layout_width="match_parent"
android:layout_height="100dp"
android:textSize="50sp"
android:text="TextView"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:clipChildren="false">
<view class="com.android.test.hwui.ProjectionActivity$ProjectedView"
android:id="@+id/projection"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="50sp"
android:text="TextView"/>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="100dp"
android:textSize="50sp"
android:text="TextView"/>
</LinearLayout>