Issue with RelativeLayout when View visibility is View.GONE

后端 未结 8 957
自闭症患者
自闭症患者 2021-02-02 05:11

I\'ve a RelativeLayout thus:



 // <-- View.VISIBLE OR View.GONE

<         


        
8条回答
  •  自闭症患者
    2021-02-02 05:41

    You can use this tag:

    android:layout_alignWithParentIfMissing="true"
    

    From the docs:

    If set to true, the parent will be used as the anchor when the anchor cannot be be found for layout_toLeftOf, layout_toRightOf, etc.

提交回复
热议问题