Jim
Jim

Reputation: 19572

Android relative layout and hide a child that other view defines to be above it

I have a relative layout that has 2 children.
The first child has android:layout_above="@+id/other_child”
I see that if the second child is invisible my layout is working fine.
But is this safe?
What I am trying to do is if the second child is visible to have the first above the other.

Upvotes: 0

Views: 64

Answers (1)

Ashish Kumar
Ashish Kumar

Reputation: 374

The implementation seems fine, but the easy way would have been using a linear layout (even in terms of performance).

Upvotes: 1

Related Questions