你好stackoverflowers!
这是我的按钮:
<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"
/>
当我将它的 alpha 设置为 150 时
button_newgame.getBackground().setAlpha(150);
它在 2.2 上开始看起来很奇怪!在 2.3.3 上,按钮看起来正常。
Android 2.3.3:(正常)
Android 2.2:(错误)
该怎么办 ??:)