android中 layer-list和include的使用
16lz
2021-01-25
layer-list 看来是图层的累加 我是这么理解的,字面上是多个层,也就是呢你可以把多个leyaer放在一起然后一其显现出来 如qqw.xml
view plain copy to clipboard print ?- <?xmlversion="1.0"encoding="utf-8"?>
- <layer-listxmlns:android="http://schemas.android.com/apk/res/android">
- <item>
- <shape>
- <solidandroid:color="#FF00ff00"/>
- <gradient
- android:useLevel="true"
- android:type="sweep"
- android:startColor="#ff000000"
- android:endColor="#ffff0000"/>
- </shape>
- </item>
- <item>
- <rotate
- android:pivotX="50%"android:pivotY="50%"
- android:fromDegrees="0"android:toDegrees="80"
- android:drawable="@drawable/icon"/>
- </item>
- </layer-list>
然后就可以在别处引用了
view plain copy to clipboard print ?
- <ImageButtonandroid:id="@+id/btnFindMe"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:background="@drawable/qqw"/>
例如在 android:style/Widget.ProgressBar.Large 或者其他的progressbar风格
view plain copy to clipboard print ?
- <mce:stylename="progressBarStyleSmall"parent="android:style/Widget.ProgressBar.Large"><!--
- <itemname="android:indeterminateDrawable">@drawable/progress</item>
- --></mce:style><stylename="progressBarStyleSmall"parent="android:style/Widget.ProgressBar.Large"mce_bogus="1"><itemname="android:indeterminateDrawable">@drawable/progress</item></style>
- <layer-listxmlns:android="http://schemas.android.com/apk/res/android">
- <!--<itemandroid:drawable="@android:drawable/progress_circular_background"/>-->
- <!--<item>
- <shapeandroid:shape="ring"
- android:innerRadiusRatio="3.4"
- android:thicknessRatio="6.0">
- <gradient
- android:useLevel="true"
- android:type="sweep"
- android:startColor="#ff000000"
- android:endColor="#ffffffff"/>
- </shape>
- </item>-->
- <item>
- <rotate
- android:pivotX="50%"android:pivotY="50%"
- padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; border-top-style: none; border-right-style: none; border-bottom-style: no
- 2011-06-24 11:16
- 浏览 2268
- 评论(0)
- 分类:移动开发
- 相关推荐
评论
发表评论
您还没有登录,请您登录后再发表评论
更多相关文章
- Android之RxJava2
- 刚学android,练手写的一个播放器
- Windows下编译使用Android(安卓)NDK,调用SO文件
- Android插件化之ContentProvider
- Android获取APP的应用程序名称、包名、图标,版本号基本信息
- Android开发:javah的使用方法
- Android(安卓)顶级视图DecorView的前世今生
- Fragment Management
- 【android】binder机制-servicemanager