Hello stackoverflowers!Android Button Alpha在2.2和更低版本上看起來很奇怪
這是我的按鈕:
<Button
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="0.30"
android:text="@string/menu_button_newgame"
android:id="@+id/button_newgame"
/>
當我設置它的阿爾法150
button_newgame.getBackground().setAlpha(150);
它會在2.2看着奇怪!在2.3.3按鈕看起來正常。
的Android 2.3.3(正常)
的Android 2.2(越野車)
怎麼辦? :)
你試過啓用抖動嗎? 'button_newgame.getBackground()。setDither(true)' – 2012-02-23 15:13:12
使抖動不起作用 – tialawllol 2012-02-24 06:28:09