Questions tagged «custom-selectors»

24
Android-样式查找栏
我想为搜索栏设置样式,如下图所示。 通过使用默认的搜索栏,我将得到如下内容: 所以我只需要改变颜色。我不需要多余的样式。有没有直接的方法可以做到这一点,还是应该构建自定义可绘制对象? 我尝试构建自定义商品,但无法获得上述确切的商品。使用自定义drawable后,我得到的结果如下所示: 如果需要构建自定义样式,请建议如何减小进度线的宽度以及形状。 我的自定义实现: background_fill.xml: <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <gradient android:angle="90" android:centerColor="#FF555555" android:endColor="#FF555555" android:startColor="#FF555555" /> <corners android:radius="1dp" /> <stroke android:width="1dp" android:color="#50999999" /> <stroke android:width="1dp" android:color="#70555555" /> </shape> progress_fill.xml <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <gradient android:angle="90" android:centerColor="#FFB80000" android:endColor="#FFFF4400" android:startColor="#FF470000" /> <corners android:radius="1dp" /> <stroke android:width="1dp" android:color="#50999999" …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.