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

How do I pass data between Activities in Android application?

middle

What is the difference between Adapter and Loader in Android?

expert

What is the relationship between Looper , Handler and MessageQueue in Android?

Bình luận

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

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