1

So I have this TextView field and it has a number in it

<TextView android:phoneNumber="true" android:textSize="14sp" android:textColor="#283486" android:layout_width="300dip" android:id="@+id/Contact" android:gravity="bottom" android:layout_height="wrap_content" android:text="@string/phoneNumber"></TextView>

I want it so that when they touch this number it takes them to the number dialer on their phone so that they can call that number.

How would I go about that

Zaask
  • 625
  • 1
  • 6
  • 13

1 Answers1

3

Try to add the android:autoLink attribute:

    <TextView android:autoLink="phone"   
     android:phoneNumber="true"  
     android:textSize="14sp"   
     android:textColor="#283486"   
     android:layout_width="300dp"  
     android:id="@+id/Contact"   
     android:gravity="bottom"   
     android:layout_height="wrap_content"   
     android:text="@string/phoneNumber">  
   </TextView>
Zeba
  • 3,041
  • 1
  • 28
  • 39
Femi
  • 64,273
  • 8
  • 118
  • 148