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

junior

What is View Group? How are they different from Views?

junior

Is it possible to implement the Model–View–Controller pattern in Java for Android?

middle

When to use Android Loaders?

Bình luận

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

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