Android Question Anchor resizing buttons based on panel size

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

Not sure if the Anchor feature in the designer can do this or not but thought I would ask in case it can since I can't work it out..

I have a panel with 11 buttons in it.

When I re-size the panel I want to be able to re-size the buttons as the panel changes size.

buttons.png



Can this be done, if so how since I can't work it out?

The only way I can do this is by using the designer script to make the images bigger, but want to know if I can also use the Anchor feature as it will save me writing code to do it.
 

aaronk

Well-Known Member
Licensed User
Longtime User
I am calling the layout from the Activity and then anchoring the panel (from the designer) to the page width and height.

Then I was hoping when I run the app on a 7" screen it would have the correct size buttons, and when I run the same layout on a smaller screen (phone) it will scale the buttons down to fit the screen.

I think I might need to use a designer script to do this?
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
Yeah that's how I have been doing it, but thought I might give the anchor feature a go (thought it might of saved me writing the code in the designer) and didn't know if it was able to do it or not, so I thought I would ask.

I will keep using the designer script with percentages for now.
 
Upvote 0
Top