简体   繁体   中英

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.

该实现看起来不错,但最简单的方法是使用线性布局(即使就性能而言)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM