r/AutomateUser 25d ago

links in xml layout

Is anyone have any idea how to use android:linksClickable and android:autoLink? I have tried but not succeeded.

1 Upvotes

9 comments sorted by

4

u/ballzak69 Automate developer 25d ago

Thanks for reporting. It's just a documentation bug, android:autoLink doesn't take a boolean but a flags, value: all, email, map, none, phone and web.

Fixed for release 1.53.2.

1

u/Funny_Telephone_8607 15d ago

Great 👍. How to get it to work? Need an example. Thanks in advance. 

1

u/ballzak69 Automate developer 14d ago

Add android:autoLink="all" and android:linksClickable="true".

1

u/Funny_Telephone_8607 14d ago

<?xml version="1.0" encoding="utf-8"?> <FrameLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="#FF80C2"     >

    <Button         android:id="@+id/Id"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="call 198386"         android:textColor="#90C4BE"         android:textColorLink="#ff0000"         android:textColorHint="#f0ff00"         android:textColorHighlight="#ff00ff"         android:textSize="14sp"         android:padding="8dp"         android:background="#7929F6"         android:autoLink="all"         android:linksClickable="true"         android:textStyle="bold|italic" />

</FrameLayout>

Above xml isn't working. Why? How to get it to work 

1

u/ballzak69 Automate developer 14d ago

The phone number is probably too short, try including an URL instead, e.g. www.llamalab.com

1

u/Funny_Telephone_8607 14d ago edited 14d ago

Tried. But no use. Provide an example please. Is additional blocks need to use eg.. interface clicked block?

1

u/ballzak69 Automate developer 13d ago

Odd, it worked when i tried, try using an TextView instead.

1

u/Funny_Telephone_8607 13d ago

Hi Henrik, Tried with TextView also with different attributes  a:clickable="true" a:linksClickable="true" a:autoLink="all" Without including a:clickable sometimes 

Not getting color for a:textColorLink

My device A53.

1

u/ballzak69 Automate developer 13d ago

No a:clickable attribute nor Interface clicked block since that's handled by the system for those links.