Android 建立自己的手写笔画图案 Gesture Builder
Android 建立自己的手写笔画图案 Gesture Builder<div class="postbody"><div id="cnblogs_post_body">利用反射去存储对对象到SharedPreferences
http://www.eoeandroid.com/thread-202940-1-1.html
基于Android平台的车辆信息查询系统的开发
http://www.eoeandroid.com/thread-202933-1-1.html
【每日话题】程序猿早餐都吃啥?是吃还是不吃呢?
http://www.eoeandroid.com/thread-202803-1-1.html
Gesture Builder提供了一手写识别的功能,让用户以类似于涂鸦的方式绘制一个手写符号,使之对应一个字符串名称,然而GestureBuilder功能虽完整,但在手写字符串的创建上却有些限制,如:制式化的建立方式、无法自行配置涂鸦区、查看手写(Gesture)以ListView来呈现等,在实际开发上稍显&ldquo;复杂&rdquo;了些。
下面看一下配置UI界面的activity_gesture_builder_demo.xml文件:
<div class="cnblogs_code"><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/white" > <LinearLayout android:id="@+id/linear_top_id" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:weightSum="2" android:orientation="horizontal" /> <TextView android:id="@+id/text_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/padding_medium" android:text="@string/hello_world" android:textSize="18sp" tools:context=".GestureBuilderDemo" /> <EditText android:id="@+id/edit_id" android:layout_width="fill_parent" android:layout_height="wrap_content" android:inputType="text" > /LinearLayout> <android.gesture.GestureOverlayView android:id="@+id/myGestures1" android:layout_width="fill_parent" android:layout_height="300dip" android:layout_below="@+id/linear_top_id" android:layout_marginRight="30sp" android:gestureColor="#8909" android:gestureStrokeType="multiple" /><!--android:gestureStrokeType="multiple" 表示多笔支持,single则支持单一笔画--> <SlidingDrawer android:id="@+id/slidingDreaer" android:layout_width="wrap_content" android:layout_height="wrap_content" android:content="@+id/content" android:handle="@+id/handler" android:orientation="horizontal" > <ImageView android:id="@+id/handler" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/app_name" android:src=http://blog.csdn.net/ta893115871/article/details/"@drawable/open" /> <ListView android:id="@+id/content" android:layout_width="fill_parent" android:layout_height="wrap_content" android:choiceMode="singleChoice" android:background="@drawable/back" android:divider="@drawable/divider" > </ListView> </SlidingDrawer> <LinearLayout android:id="@+id/linear_botton_id" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:weightSum="2" style="@android:style/ButtonBar" android:orientation="horizontal" > <Button android:id="@+id/button1_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" android:text="@string/str_button1" />; <Button android:id="@+id/button2_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" android:text="@string/str_button2" /></LinearLayout></RelativeLayout>
页:
[1]