版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/codekxx/article/details/58032214
<Button
android:id="@+id/bt_login"
android:layout_width="match_parent"
android:layout_height="@dimen/et_user_height"
android:layout_marginLeft="@dimen/et_user_left_margin"
android:layout_marginRight="@dimen/et_user_left_margin"
android:layout_marginTop="@dimen/bt_margin_top"
android:background="@color/bt_login_color"
android:text="登 录"
android:textColor="@color/white"
style="?android:attr/borderlessButtonStyle"
android:textSize="@dimen/title_size" />
其中style="?android:attr/borderlessButtonStyle"
设置该属性就可以去掉自带的阴影
具体解释看Google官网
http://developer.android.com/guide/topics/ui/controls/button.html