Possible Duplicate:
Android How to draw a smooth line following your finger
I have created the layout using the following code:
activity_hand_write_demo.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/custom_border">
<TextView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="20dp"
android:textColor="#FFFFFF"
android:gravity="center_horizontal"
android:background="#AAAAAA" />
</LinearLayout>
</LinearLayout>
custom_border.xml in drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="20dp"/>
<padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>
<solid android:color="#1ABCD1"/>
</shape>
HandWriteDemo.java
package com.example.handwritedemo;
import android.os.Bundle;
import android.app.Activity;
public class HandWriteDemo extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hand_write_demo);
}
}
Now I want to draw a line as my finger moves . I got stuck How to achieve this either by touch listener or some other way .
If any one knows ...