Wednesday, 10 December 2014

XML android:gravity value referenced as a variable?



is there any way to set android:gravity="..." value as a variable so I can change it depending on the configuration?


something like



android:gravity="@string/gravityValue"


/values



<string name="gravityValue">left</string>


/values-land



<string name="gravityValue">right</string>


but that doesnt work as gravity values are flags


thanks!


No comments:

Post a Comment