diff options
Diffstat (limited to 'tests/HwAccelerationTest')
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/res/layout/text_fade.xml b/tests/HwAccelerationTest/res/layout/text_fade.xml index 8da2204..08a70b3 100644 --- a/tests/HwAccelerationTest/res/layout/text_fade.xml +++ b/tests/HwAccelerationTest/res/layout/text_fade.xml @@ -32,6 +32,7 @@ android:ellipsize="marquee" android:fadingEdgeLength="16sp" android:fadingEdge="horizontal" + android:requiresFadingEdge="horizontal" android:text="This is a really really really really really really long string" android:textSize="16sp" /> diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java index c8bbc7d..d307ef8 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java @@ -21,7 +21,9 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.os.Bundle; +import android.text.TextUtils; import android.view.View; +import android.widget.TextView; @SuppressWarnings({"UnusedDeclaration"}) public class TextFadeActivity extends Activity { @@ -30,5 +32,8 @@ public class TextFadeActivity extends Activity { super.onCreate(savedInstanceState); setContentView(R.layout.text_fade); + + findViewById(R.id.contact_tile_name).setHorizontalFadingEdgeEnabled(true); + ((TextView) findViewById(R.id.contact_tile_name)).setEllipsize(TextUtils.TruncateAt.MARQUEE); } } diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java index 359447d..0ddd7fd 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java @@ -81,11 +81,14 @@ public class ViewLayersActivity extends Activity { leftList.setAlpha(0.5f); middleList.setLayerType(View.LAYER_TYPE_HARDWARE, p3); middleList.setAlpha(0.5f); + middleList.setVerticalFadingEdgeEnabled(true); rightList.setLayerType(View.LAYER_TYPE_SOFTWARE, p2); moveRight.start(); moveLeft.start(); rotate.start(); + + ((View) leftList.getParent()).setAlpha(0.5f); } }, 2000); } |