如何删除按钮的阴影(机器人) [英] How to remove button shadow (android)
本文介绍了如何删除按钮的阴影(机器人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从按钮去除阴影使之看起来更加平坦。
I want to remove the shadow from the button to make it seem more flat.
我有这个权利现在:
不过,我想这样的:
推荐答案
以此为背景对您的按钮可能会帮助,改变颜色,以您的需求。
Using this as the background for your button might help, change the color to your needs
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape android:shape="rectangle">
<solid android:color="@color/app_theme_light" />
<padding
android:left="8dp"
android:top="4dp"
android:right="8dp"
android:bottom="4dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="@color/app_theme_dark" />
<padding
android:left="8dp"
android:top="4dp"
android:right="8dp"
android:bottom="4dp" />
</shape>
</item>
</selector>
这篇关于如何删除按钮的阴影(机器人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文