我有一个按钮,所以我想在单击按钮时更改样式。我用过按钮
样式“椭圆”和背景图像。所以当点击它时,它的动作表现完美,但是
没有突出显示。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#82B210"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".SettingActivity" >
<Button
android:id="@+id/button2"
style="@drawable/bg"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignBaseline="@+id/button1"
android:layout_alignBottom="@+id/button1"
android:layout_alignLeft="@+id/confess_logout_btn"
android:background="@drawable/confessfeeds" />
<Button
android:id="@+id/confess_logout_btn"
style="@drawable/bg"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignBaseline="@+id/confess_settings_btn"
android:layout_alignBottom="@+id/confess_settings_btn"
android:layout_marginLeft="70dp"
android:layout_toRightOf="@+id/confess_settings_btn"
android:background="@drawable/logout" />
</RelativeLayout>
提前致谢