Issue with RelativeLayout when View visibility is View.GONE

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

I\'ve a RelativeLayout thus:



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

<         


        
相关标签:
8条回答
  • 2021-02-02 05:40

    A simple hack for this is to play with alpha 0/1. and also disable the onClickListener if there is any

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题