How can I use multiple values ​​for Android XML layout properties?

I feel that this must have been asked before, but I cannot find it.

I want to have LinearLayout so that everything is aligned both on the right and bottom.

I tried:

  android:gravity="right | bottom" android:gravity="right + bottom" android:gravity="right & bottom" android:gravity="right, bottom" android:gravity="right bottom" 

They all produce

  Error: String types not allowed (at 'gravity' with value 'right, bottom'). 

I suppose I could use fields for subelements, but I would prefer not to.

+8
android android-layout android-xml android-linearlayout
source share
1 answer

Grah. These were spaces. The correct syntax

  android:gravity="right|bottom" 

I would like Eclipse to have such suggestions if it sees you enter a string. how

 Error: String types not allowed (at 'gravity' with value 'right, bottom'). If you want to enter multiple values, use the syntax "value1|value2" 
+18
source share

All Articles