设为首页 加入收藏

TOP

Android利用canvas画画板(一)
2015-07-16 12:54:59 来源: 作者: 【 】 浏览:4
Tags:Android 利用 canvas 画板

Android利用canvas画画板


首先配置页面布局文件activity_main.xml,如下图所示:


? ? xmlns:tools="http://schemas.android.com/tools"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent"
? ? android:orientation="vertical">


? ? ? ? ? ? android:id="@+id/iv"
? ? ? ? android:layout_width="wrap_content"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:background="@drawable/bg"
? ? ? ? />
? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? android:text="画笔的粗细"
? ? ? ? />
? ? ? ? ? ? android:id="@+id/sb"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:max="256"
? ? ? ? />
? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? android:text="颜色"
? ? ? ? />
? ? ? ? ? ? android:id="@+id/sp"
? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? android:entries="@array/color"
? ? ? ? />
? ?

首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Java异常处理机制 下一篇Android Service 服务的应用之电..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: