diff options
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r-- | tests/HwAccelerationTest/res/layout/projection.xml | 5 | ||||
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java | 27 |
2 files changed, 3 insertions, 29 deletions
diff --git a/tests/HwAccelerationTest/res/layout/projection.xml b/tests/HwAccelerationTest/res/layout/projection.xml index 564201a..b6e4c5e 100644 --- a/tests/HwAccelerationTest/res/layout/projection.xml +++ b/tests/HwAccelerationTest/res/layout/projection.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> -<view class="com.android.test.hwui.ProjectionActivity$ProjecteeLayout" +<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 @@ -33,4 +34,4 @@ android:layout_height="100dp" android:textSize="50sp" android:text="TextView"/> -</view>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java index f27652d..208c387 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java @@ -72,33 +72,6 @@ public class ProjectionActivity extends Activity { } } - public static class ProjecteeLayout extends LinearLayout { - private final Paint mPaint = new Paint(); - private final RectF mRectF = new RectF(); - - public ProjecteeLayout(Context context) { - this(context, null); - } - - public ProjecteeLayout(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public ProjecteeLayout(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - @Override - protected void dispatchDraw(Canvas canvas) { - canvas.save(0x20); // secret save flag - mRectF.set(0, 0, getWidth(), getHeight()); - mPaint.setColor(0x5f000000); - canvas.drawOval(mRectF, mPaint); - canvas.restore(); - super.dispatchDraw(canvas); - } - } - static View container; @Override |