setVisibility(GONE) view becomes invisible but still occupies space

后端 未结 13 1988
我在风中等你
我在风中等你 2020-12-03 03:56

I\'ve got a view that is effectively is a button. Here is its XML layout (add_new.xml)




        
13条回答
  •  暖寄归人
    2020-12-03 04:52

    I had similar issue when using TransitionManager.beginDelayedTransition(), in the layout inspector I see that the view is Gone but still taking space, I think it is bug in Android, a workaround is to execute the visibility block with View.post(Runnable action)

提交回复
热议问题