阅读背景:

android如何做自己的手写输入法

来源:互联网 

1、xml

<LinearLayout
        android:id="@+id/gesture_main_writepad_ll"
        android:layout_width="fill_parent"
        android:layout_height="330dip"
        android:layout_alignParentBottom="true"
        android:background="#262626"
        android:orientation="vertical"
        android:visibility="gone" >

        <Gallery
            android:id="@+id/gesture_main_writepad_glly"
            android:layout_width="fill_parent"
            android:layout_height="60dip"
            android:spacing="3dip" />
        <TextView 
            android:layout_width="fill_parent"
            android:layout_height="1px"
            android:background="@color/auto_color"
            />

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="230dip" >

            <LinearLayout
                android:id="@+id/search_no_input"
                android:layout_width="fill_parent"
                android:layout_height="230dip"
                android:background="@android:color/transparent"
                android:gravity="center" >

                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:gravity="center"
                    android:background="@android:color/transparent" />
            </LinearLayout>

            <android.gesture.GestureOverlayView
                android:id="@+id/gesture_main_writepad_gs"
                android:layout_width="fill_parent"
                android:layout_height="230dip"
                android:fadeOffset="100000"
                android:gestureColor="#6B8E23"
                android:gestureStrokeType="multiple"
                android:gestureStrokeWidth="5" />
        </RelativeLayout>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="40dip"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/gesture_main_hide_btn"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_marginLeft="3dip"
                android:layout_weight="2"
                android:background="#838B83"
                android:text="hide" />

            <Button
                android:id="@+id/gesture_main_space_btn"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_marginLeft="3dip"
                android:layout_weight="1"
                android:background="#838B83"
                android:text="space" />

            <Button
                android:id="@+id/gesture_main_del_btn"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_marginLeft="3dip"
                android:layout_weight="2"
                android:background="#838B83"
                android:text="del" />
        </LinearLayout>
    </LinearLayout><LinearLayout
        android:id="@+



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: