Câu hỏi phỏng vấn Android
Câu hỏi

What is the difference between invisible and gone for the View visibility status?

Câu trả lời

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

middle

Gợi ý câu hỏi phỏng vấn

middle

What are the differences between ArrayList and ArrayMap ?

middle

When to use Android Loaders?

junior

Explain activity lifecycle

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào