I am making this phone dialer app for blind people that say the number that gets pressed and I want them to be able to swipe across the all buttons without their finger leaving the screen. When they swipe the number it only get pronounced and when they release the number it gets typed. I tried on the touch listener and swipe motion and it's not working.
What I should do to make this work?
Here is my XML:
<Button
android:text="call"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/button10"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<Button
android:text="playback"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="@+id/button10"
android:layout_below="@+id/button4" />
<Button
android:text="#"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/button10"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/buttonhash" />
<Button
android:text="9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/buttonhash"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:id="@+id/button9" />
<Button
android:text="*"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/buttonastrike"
android:layout_alignBaseline="@+id/button0"
android:layout_alignBottom="@+id/button0"
android:layout_alignLeft="@+id/button7"
android:layout_alignStart="@+id/button7" />
<Button
android:text="4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button4"
android:layout_below="@+id/button1"
android:layout_alignLeft="@+id/button7"
android:layout_alignStart="@+id/button7"
android:layout_toLeftOf="@+id/button5"
android:layout_toStartOf="@+id/button5" />
<Button
android:text="7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button7"
android:layout_alignBaseline="@+id/button8"
android:layout_alignBottom="@+id/button8"
android:layout_toRightOf="@+id/button11"
android:layout_toLeftOf="@+id/button5"
android:layout_toStartOf="@+id/button5" />
<Button
android:text="delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button15"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_above="@+id/button11"
android:layout_alignTop="@+id/button1" />
<EditText
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text=""
android:ems="10"
android:id="@+id/editText"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<Button
android:text="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button1"
android:layout_alignBaseline="@+id/button2"
android:layout_alignBottom="@+id/button2"
android:layout_alignLeft="@+id/button4"
android:layout_alignStart="@+id/button4"
android:layout_toLeftOf="@+id/button5"
android:layout_toStartOf="@+id/button5" />
<Button
android:text="6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button6"
android:layout_above="@+id/button9"
android:layout_alignLeft="@+id/button9"
android:layout_alignStart="@+id/button9" />
<Button
android:text="5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button5"
android:layout_alignBaseline="@+id/button4"
android:layout_alignBottom="@+id/button4"
android:layout_toLeftOf="@+id/button9"
android:layout_toStartOf="@+id/button9" />
<Button
android:text="8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button8"
android:layout_alignBaseline="@+id/button9"
android:layout_alignBottom="@+id/button9"
android:layout_alignLeft="@+id/button5"
android:layout_alignStart="@+id/button5" />
<Button
android:text="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button2"
android:layout_alignBaseline="@+id/button3"
android:layout_alignBottom="@+id/button3"
android:layout_alignLeft="@+id/button5"
android:layout_alignStart="@+id/button5" />
<Button
android:text="0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button0"
android:layout_alignBaseline="@+id/buttonhash"
android:layout_alignBottom="@+id/buttonhash"
android:layout_alignLeft="@+id/button8"
android:layout_alignStart="@+id/button8" />
<Button
android:text="3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button3"
android:layout_above="@+id/button6"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />