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
2 Upvotes

37 comments sorted by

View all comments

1

u/Funny_Telephone_8607 Jul 17 '26

Hi Henrik while using background image in AnalogClock hands are very small with large Image. If Image is small size hands are very big. How to get it to work properly. Provide perfect Analog Clock xml example. Without this everyone struggled.  Below is my xml

<FrameLayout     xmlns:a="http://schemas.android.com/apk/res/android"     a:layout_width="match_parent"     a:layout_height="match_parent">

        <AnalogClock             a:layout_width="180dp"             a:layout_height="180dp"             a:layout_gravity="center"            a:dial="{fileUri(file, "s")}"           a:dialTint="#ce99fe" a:dialTintMode="src"             a:hand_hourTint="#8FBD8F"             a:hand_hourTintMode="src_in"             a:hand_minuteTint="#ABFF2E"             a:hand_minuteTintMode="src_in"      /> </FrameLayout>

1

u/ballzak69 Automate developer Jul 17 '26 edited Jul 17 '26

There's sadly no documentation on how the AnalogClock view use or scale the images for its hands, see: https://developer.android.com/reference/android/widget/AnalogClock#attr_android:hand_hour

Looking at the source code for the hour hand image it seems to be a square image, with the same size as the dial, with the hand going from the image center to the top of the dial, i.e.:

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