Reputation: 6340
Is it possible to set the visibility via bindings? (dimens.xml)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="@whatever/visibility_of_this_view"
android:orientation="horizontal">...
so that I can put something inside of the dimens.xml like:
<whatever name="visibility_of_this_view">visible</whatever>
I don't want to do it via code or different layouts, just with different dimens.xml.
Upvotes: 1
Views: 388
Reputation: 57672
How ever your different dimens are selected (layout, api, what ever) you should use the same mechanism to select another layout or even a different style which sets the visibility. Every other way seems to be a abusive way :)
Upvotes: 2