What is the difference between invisible and gone for the View visibility status?
What is the difference between invisible and gone for the View visibility status?
The main difference between View.INVISIBLE
and View.GONE
in Android is how they affect the layout:
View.INVISIBLE
: The view is invisible, but it still takes up space in the layout and affects the positioning of other views[1][2]. The view is not drawn on the screen, but it maintains its size and position in the view hierarchy.
View.GONE
: The view is completely removed from the layout. It no longer takes up any space and other views are positioned as if the gone view did not exist at all[1][2]. The view is not drawn, and its space is reclaimed by its parent.
In summary:
View.INVISIBLE
hides the view ...middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào