| Not really looking forward to apologizing for the weak graphical tools, however- "Ever try to change the color of a button on Android?" android:background="#ffee11" on the button? Or use something like CSS variables (you know -- where CSS wants to go) and pull from a resource. Are you talking about something much more complex? You can define a shape resource and then reference that in your button. Your button can be almost any shape and look you desire, via a shared resource file so it's easy to replicate elsewhere in your app. Making a shape occupy n-percent of the screen, or having padding left, right, above, below is trivial, and I'm predominately an NDK developer and don't even deal with this normally (but just quickly validated it. Rounded corner buttons with gradient backgrounds and specific padding occupying n-percentage of the screen). I am left completely baffled by your complaints. There is nothing arcane about a shape XML file (it is profoundly clear, and is obviously intended to be reused so you aren't scattering disparate presentation code -- such as a button style -- throughout your code), and if you don't like that you can declare the color directly. Of course that is only one of your complaints, but if you don't understand something so elegant and trivial, I have to question the rest of your concerns. |
That . . . actually works! Well, now I'm embarrassed. I had previously had to go this route http://www.androidworks.com/changing-the-android-edittext-ui... with text fields, and assumed it was the only way.
How do you get buttons to occupy a percentage of the screen (I hesitate to ask, as it's probably something similarly trivial . . . but it's been such a painful subject for me that I really want to know!)?