我使用以下繪製:是否可以對可繪製的漸變進行抖動?
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<gradient
android:startColor="@color/content_background_gradient_start"
android:endColor="@color/content_background_gradient_end"
android:angle="270"
/>
</shape>
的問題是,我覺得非常的捆紮在華電國際設備(如Nexus One的和Droid),因爲梯度從該屏幕的頂部到最底部進入。
根據http://idunnolol.com/android/drawables.html#shape_gradient,梯度沒有「抖動」屬性。我能做些什麼來平滑漸變?
注意:將dither =「true」添加到形狀似乎不起作用。
選定的答案沒有幫助我,你的確做到了!擁有Android 2.2的Galaxy S。 – 2011-06-10 22:56:56