大佬教程收集整理的这篇文章主要介绍了android – 渐变样式,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在这看什么?创建我自己的图像并使用它? ?android:attr / windowtitleStyle样式似乎会根据自定义标题栏的高度进行扩展;所以我不确定它实际上是一个单一的图像.
我尝试用一点半透明的方式抛出一个LinearLayout(例如:使颜色为#800000FF),但我在此LinearLayout后面的渐变样式消失了.
谢谢你的帮助
更新:
根据我在下面的回答,我发现我可以创建一个定义渐变的XML文件并使用它.它在我的布局上的LinearLayout(titlebar_gradient)中工作正常.但是,它不适用于最外层的LinearLayout(BACkground_gradient).有人能告诉我为什么吗?据我了解,ListView应该是透明的……
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://scheR_753_11845@as.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:BACkground="@drawable/BACkground_gradient" > <LinearLayout xmlns:android="http://scheR_753_11845@as.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="47dip" android:BACkground="@drawable/titlebar_gradient" android:gravity="center"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:text="Item" style="?android:attr/windowtitleStyle" android:paddingLeft="5dip" android:maxLines="1" android:ellipsize="end" /> </LinearLayout> <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="10dip" android:clickable="false" /> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout>
以上是大佬教程为你收集整理的android – 渐变样式全部内容,希望文章能够帮你解决android – 渐变样式所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。