I feel like this must have been asked before, but I can't find it.
I want to have a LinearLayout
such that everything aligns to the right as well as to the bottom.
I've tried:
android:gravity="right | bottom"
android:gravity="right + bottom"
android:gravity="right & bottom"
android:gravity="right, bottom"
android:gravity="right bottom"
All of these produce
Error: String types not allowed (at 'gravity' with value 'right, bottom').
I suppose I could use margins on the sub-elements, but I'd rather not.
Grah. It was the spaces. Correct syntax is
android:gravity="right|bottom"
I wish Eclipse would have suggestions like that if it sees you're entering a string. Like
Error: String types not allowed (at 'gravity' with value 'right, bottom').
If you want to enter multiple values, use the syntax "value1|value2"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With