Hello,
In my application I want to change the appearance of buttons if the application is in landscape or portrait mode.
I'm using "Designer Scripts" to change the position and size of the buttons (it's ok), but I can not change the following attributes:
- Alignment of the image:
if landscape, I want to make TOP + CENTER_HORIZONTAL
if portrait, I want to make LEFT CENTER_VERTICAL
- Text alignment:
if landscape, I want to make BOTTOM + CENTER_HORIZONTAL
if portrait, I want to make RIGHT + CENTER_VERTICAL
Can I change with "Designer scipts"? How i do?
Or, what is the code that I can use to change at runtime?
Ps: The button is configured as "Statelistr Drawable" then need to change the position of the 3 states (enabled, disabled, clicked)
Thanks!
In my application I want to change the appearance of buttons if the application is in landscape or portrait mode.
I'm using "Designer Scripts" to change the position and size of the buttons (it's ok), but I can not change the following attributes:
- Alignment of the image:
if landscape, I want to make TOP + CENTER_HORIZONTAL
if portrait, I want to make LEFT CENTER_VERTICAL
- Text alignment:
if landscape, I want to make BOTTOM + CENTER_HORIZONTAL
if portrait, I want to make RIGHT + CENTER_VERTICAL
Can I change with "Designer scipts"? How i do?
Or, what is the code that I can use to change at runtime?
Ps: The button is configured as "Statelistr Drawable" then need to change the position of the 3 states (enabled, disabled, clicked)
Thanks!