Clickable stuff in Widgets

Post your questions and help other users.

Moderator: Martin

Post Reply
wired4sound
Posts: 20
Joined: 23 Jan 2019 21:02

Clickable stuff in Widgets

Post by wired4sound » 03 Feb 2019 14:28

Is there a way to make images clickable? Or text? Or shapes?

I know the widget itself is clickable and swipable, etc.

But I would like to add images or buttons that can be clicked to execute an action (mostly flows I've designed)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Clickable stuff in Widgets

Post by Desmanto » 03 Feb 2019 16:40

No, the action clickable and swipe only at the widget level. You can add as many column/row as you want, and arrange as such that it cover the image/shape/text you have.

This limited feature has this downside. Sometimes it won't fit properly, so that comes the proper preparation of the shape. You have to adjust the x y location properly so it fit to the grid you have design. Sometimes you have to use two button to cover single image. So both clickable area perform the same thing.

But on the plus side, you won't need to worry about deleting certain widget element. No need to afraid that the element has the action tied to it. And every action always can be manage on widget level, not per element. Which sometimes can be painful, especially when you have hundreds of it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

wired4sound
Posts: 20
Joined: 23 Jan 2019 21:02

Re: Clickable stuff in Widgets

Post by wired4sound » 03 Feb 2019 17:23

I think this should be a feature request. Doesn't seem like it would be much extra work to make images and buttons/shapes clickable. Would really open up another world of automation management.

For example, my widget displays provider information. I would like to be able to click the phone to call, email icon to email, custom icon to run a specific flow or toggle it on/off. Etc

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Clickable stuff in Widgets

Post by Desmanto » 03 Feb 2019 17:38

AFAIR this feature has been requested, but not in the priority list. Making the widget element clickable probably isn't difficult, but storing the configuration is. Small changes in the element can widespread to all other. A lot of users' widget will be affected and probably totally broken just by this small change.

Adding some new elements/action can be safer, as it only add, not modify existing ones. But still careful future planning should be done, so it doesn't overlap with previous feature or break current existing element.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

wired4sound
Posts: 20
Joined: 23 Jan 2019 21:02

Re: Clickable stuff in Widgets

Post by wired4sound » 03 Feb 2019 20:51

Adding an invisible "clickable" layer element would do the trick and not mess with other widgets.

Just draw your layer where you want clickable, assign action.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Clickable stuff in Widgets

Post by Desmanto » 04 Feb 2019 06:09

Oh, that's one of the way. So even though we just use single image element, but we can add several invisible clickable action on top of it. Don't know how difficult it is. Just don't hold your breath, AFAIK, widget is in todo list already, but not first priority.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply