I have an App that I need to generate my own QWERTY keyboard (because the keyboard button colors change during the course of the App). Each button will be a StateListDrawable to have a pressed and unpressed (enabled) image. I can keep track of which button has been pressed (using "b = sender") by assigning a value to the Tag property and getting "b.tag".
I have two questions:
1) In the Layout Designer Script, is there a way to access each button of this KeyboardPanel to programmatically set each button's left, top, width, and height properties (without specifying Button1.Left, Button1.Top, Button1.Width, Button 1.Height, Button2.Left, Button 2.Top, ...... Button26.Width, Button26.Height)?
2) Once the layout for this 26-button keyboard has been loaded into KeyboardPanel (there will be other buttons, but I'll stick to just the letters for now), if I then need to change the properties of a particular button, how can I reference any particular button if I have a reference value from 1 to 26? Can a layout have a Button Array using subscripts?
I have two questions:
1) In the Layout Designer Script, is there a way to access each button of this KeyboardPanel to programmatically set each button's left, top, width, and height properties (without specifying Button1.Left, Button1.Top, Button1.Width, Button 1.Height, Button2.Left, Button 2.Top, ...... Button26.Width, Button26.Height)?
2) Once the layout for this 26-button keyboard has been loaded into KeyboardPanel (there will be other buttons, but I'll stick to just the letters for now), if I then need to change the properties of a particular button, how can I reference any particular button if I have a reference value from 1 to 26? Can a layout have a Button Array using subscripts?