android shape渐近线效果
来源:互联网 发布:软还原软件 编辑:程序博客网 时间:2024/04/30 02:17
转自http://kevin2562.javaeye.com/blog/686784
android画图-----shape的使用
在GradientDrawable1试图中终于把shape学会了,以前总是似懂非懂,
现在终于把里面的东西搞清楚了,同时也挺佩服谷歌的用心,故意设 置一些陷阱吧,不认真对待还真以为没有啥效果呢。
setContentView(R.layout.shape_drawable_1)
shape_drawable_1 代码如下:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/shape_1" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/line" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/shape_2" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/line" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/shape_3" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="20dip"
android:src="@drawable/line" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/shape_4" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/line" />
<ImageView
android:layout_width="fill_parent"
android:layout_height="50dip"
android:src="@drawable/shape_5" />
</LinearLayout>
</ScrollView>
shape_5的代码:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:startColor="#FFFF0000" android:endColor="#80FF00FF"
android:angle="270"/>
<padding android:left="50dp" android:top="20dp"
android:right="7dp" android:bottom="7dp" />
<corners android:radius="8dp" />
</shape>
gradient 产生颜色渐变 android:angle 从哪个角度开始变 貌似只有90的整数倍可以
android:shape="rectangle" 默认的也是长方形
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="#ff4100ff"/>
<stroke android:width="2dp" android:color="#ee31ff5e"
android:dashWidth="3dp" android:dashGap="2dp" />
<padding android:left="7dp" android:top="7dp"
android:right="7dp" android:bottom="7dp" />
<corners android:radius="6dp" />
</shape>
#ff4100ff蓝色#ff4100ff绿色
<solid android:color="#ff4100ff"/>实心的 填充里面
<stroke 描边 采用那样的方式将外形轮廓线画出来
android:dashWidth="3dp" android:dashGap="2dp" 默认值为0
android:width="2dp" android:color="#FF00ff00"笔的粗细,
android:dashWidth="5dp" android:dashGap="5dp" 实现- - -这样的效果,dashWidth指的是一条小横线的宽度
dashGap 指的是 小横线与小横线的间距。 width="2dp" 不能太宽
- android shape渐近线效果
- android shape阴影效果
- Android 自定义shape图形效果
- Android UI---控件Shape效果
- Android中Shape的渐变效果
- android中通过shape定制图形效果
- Android 使用shape来优化界面效果
- Android 使用shape来实现界面效果
- Android xml 效果之 Shape Drawable
- Android 使用shape来优化界面效果
- android通过shape实现虚线效果
- Android之shape设置虚线无效果
- android小技巧--shape自定义阴影效果
- Android 通过 shape 实现三角形气泡效果
- 【Android 界面效果19】Android中shape的使用
- android 用shape画 圆 雷达扫描效果
- Android基础--使用shape来优化界面效果
- Android中用shape做渐变,边框,圆角等效果
- 图像领域中的一些算法的本质
- 【转】情牵牛仔裤 情色一生
- 一些超赞的计算机视觉文献与代码资源
- DDK Sources文件语法处理
- 算法不会,尚能饭否之排序——直接选择排序
- android shape渐近线效果
- 【转】牛仔文化与历史背景
- 【转】牛仔装的起源
- android画图-----shape的使用
- Diameter协议与SIP
- 【转】不同身材怎么穿牛仔裤
- 十大开发代码原则
- MSDOS学习笔记
- emacs编译安装