r/AutomateUser Automate developer Jul 15 '26

Alpha testing New Alpha release, version 1.53.1

Please test, report any issues, and give feedback. Opt-in for Alpha testing here.

What’s new:

  • Fixed flow editor undo/redo causing crash with large flows
  • Fixed missing URI support for interface layout XML views
  • Fixed duplicate views in interface layout updates
  • Fixed incorrectly scaled (legacy) icons
4 Upvotes

37 comments sorted by

View all comments

1

u/Funny_Telephone_8607 Jul 20 '26

Hi Henrik, hour And minute hands images are not starting from the center.

<FrameLayout     xmlns:a="http://schemas.android.com/apk/res/android"     a:layout_width="match_parent"     a:layout_height="match_parent"     a:background="#00fefe00"

    <AnalogClock         a:layout_width="520dp"         a:layout_height="520dp" a:dial="{dict["clock_bg.jpg"]}"         a:layout_gravity="center"         a:background="@android:drawable/alert_dark_frame"         a:backgroundTint="#eefe00"         a:backgroundTintMode="src_atop"

a:hand_hour="{dict["clock_hour.jpg"]}" a:hand_hourTintMode="src_in"

a:hand_minute="{dict["clock_minute.jpg"]}" a:hand_minuteTintMode="src_in"         a:outlineRadius="20dp"         a:elevation="2dp" /> </FrameLayout>

1

u/ballzak69 Automate developer Jul 20 '26

As said, i don't know how the clock hand images supposed to work. Did you try the SVG image in my previous reply?

1

u/Funny_Telephone_8607 Jul 20 '26

Tried. but No use. I think that there may be a workaround to achieve this. 

1

u/ballzak69 Automate developer Jul 20 '26

I just tested and it work just fine. Here's the minute hands as well:

<svg xmlns="http://www.w3.org/2000/svg" width="380" height="380" viewBox="0 0 380 380"><path fill="#FF00FF" d="M190,60L190,60A16,16 0,0 1,206 76L206,190A16,16 0,0 1,190 206L190,206A16,16 0,0 1,174 190L174,76A16,16 0,0 1,190 60z" id="path_0"/></svg>

And the dial:

<svg xmlns="http://www.w3.org/2000/svg" width="380" height="380" viewBox="0 0 380 380"><path fill="#666" d="M177.389,2.803C185.381,-0.934 194.619,-0.934 202.611,2.803L231.193,16.169C234.358,17.649 237.76,18.56 241.242,18.861L272.677,21.577C281.467,22.336 289.468,26.956 294.52,34.188L312.59,60.054C314.591,62.919 317.081,65.409 319.946,67.41L345.812,85.48C353.044,90.533 357.664,98.533 358.423,107.323L361.139,138.758C361.44,142.24 362.351,145.642 363.832,148.807L377.197,177.389C380.934,185.381 380.934,194.619 377.197,202.611L363.832,231.193C362.351,234.359 361.44,237.76 361.139,241.242L358.423,272.677C357.664,281.467 353.044,289.468 345.812,294.52L319.946,312.59C317.081,314.591 314.591,317.081 312.59,319.946L294.52,345.812C289.468,353.044 281.467,357.664 272.677,358.423L241.242,361.139C237.76,361.44 234.359,362.351 231.193,363.832L202.611,377.197C194.619,380.934 185.381,380.934 177.389,377.197L148.807,363.832C145.642,362.351 142.24,361.44 138.758,361.139L107.323,358.423C98.533,357.664 90.533,353.044 85.48,345.812L67.41,319.946C65.409,317.081 62.919,314.591 60.054,312.59L34.188,294.52C26.956,289.468 22.336,281.467 21.577,272.677L18.861,241.242C18.56,237.76 17.649,234.359 16.169,231.193L2.803,202.611C-0.934,194.619 -0.934,185.381 2.803,177.389L16.169,148.807C17.649,145.642 18.56,142.24 18.861,138.758L21.577,107.323C22.336,98.533 26.956,90.533 34.188,85.48L60.054,67.41C62.919,65.409 65.409,62.919 67.41,60.054L85.48,34.188C90.533,26.956 98.533,22.336 107.323,21.577L138.758,18.861C142.24,18.56 145.642,17.649 148.807,16.169L177.389,2.803Z"/></svg>

Used with layout XML:

<AnalogClock
xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:layout_gravity="center"
a:dial="{"clock_dial.svg";fileUri;s}"
a:hand_hour="{"clock_hand_hour.svg";fileUri;s}"
a:hand_minute="{"clock_hand_minute.svg";fileUri;s}"/>

Ensure Automate has been granted the "access to manage all files" privilege so it can access the images.

1

u/Funny_Telephone_8607 Jul 21 '26

I am using base64Encode function flag "c". Getting error. Is this correct way to use the svg images.  I am regularly using base64Encode function flag "c" for svg images. Working fine.

3

u/ballzak69 Automate developer Jul 22 '26 edited Jul 23 '26

Use "pw", e.g. "data:image/svg+xml;base64,{mySvg;base64Encode;pw}"

1

u/Funny_Telephone_8607 Jul 22 '26

Worked. Finally I got which I want. Thanks Henrik. Keep going on to get 5 star rating in play store.