diff options
author | Romain Guy <romainguy@google.com> | 2011-07-28 15:39:12 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-07-28 15:40:47 -0700 |
commit | b50149825fae95b2918bcf67b2ddb773b9797068 (patch) | |
tree | 0a7e7b7deda72360adfabed3bc7d64eeccc7311c /tests/HwAccelerationTest | |
parent | a7ffaee29892cc38ae2327017b6670adafef711b (diff) | |
download | frameworks_base-b50149825fae95b2918bcf67b2ddb773b9797068.zip frameworks_base-b50149825fae95b2918bcf67b2ddb773b9797068.tar.gz frameworks_base-b50149825fae95b2918bcf67b2ddb773b9797068.tar.bz2 |
Correctly apply linear filter to drawBitmap(Rect, Rect)
Change-Id: I1049282e1996b1020c92cb7bec46e9f28e94e967
Diffstat (limited to 'tests/HwAccelerationTest')
3 files changed, 81 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml index 9fcd05a..d74d80d 100644 --- a/tests/HwAccelerationTest/AndroidManifest.xml +++ b/tests/HwAccelerationTest/AndroidManifest.xml @@ -31,6 +31,15 @@ android:hardwareAccelerated="true"> <activity + android:name="TextFadeActivity" + android:label="_TextFade"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + <activity android:name="MaxBitmapSizeActivity" android:label="_MaxBitmapSize"> <intent-filter> diff --git a/tests/HwAccelerationTest/res/layout/text_fade.xml b/tests/HwAccelerationTest/res/layout/text_fade.xml new file mode 100644 index 0000000..8da2204 --- /dev/null +++ b/tests/HwAccelerationTest/res/layout/text_fade.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView + android:id="@+id/contact_tile_name" + android:layout_width="105dip" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_marginLeft="8dip" + android:layout_marginBottom="20dip" + android:textColor="@android:color/white" + android:singleLine="true" + android:ellipsize="marquee" + android:fadingEdgeLength="16sp" + android:fadingEdge="horizontal" + android:text="This is a really really really really really really long string" + android:textSize="16sp" /> + +</FrameLayout> diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java new file mode 100644 index 0000000..c8bbc7d --- /dev/null +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.test.hwui; + +import android.app.Activity; +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.os.Bundle; +import android.view.View; + +@SuppressWarnings({"UnusedDeclaration"}) +public class TextFadeActivity extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.text_fade); + } +} |