Android UI and Resources
Views, Layouts, RecyclerView, resources and internationalization
1What is the difference between View and ViewGroup?
What is the difference between View and ViewGroup?
Câu trả lời
View is the base class for all UI components (Button, TextView, ImageView, etc.). ViewGroup is a subclass of View that contains other Views (or ViewGroups). ViewGroups are layout containers: LinearLayout, RelativeLayout, ConstraintLayout, FrameLayout, etc.
2What is the LayoutInflater?
What is the LayoutInflater?
Câu trả lời
LayoutInflater is used to convert an XML layout file into corresponding View objects. It's essential in onCreate() with setContentView(), in Adapters to create list items, and in Fragments. Method: LayoutInflater.from(context).inflate(R.layout.my_layout, parent, false).
3Which Layout organizes Views in horizontal or vertical line?
Which Layout organizes Views in horizontal or vertical line?
Câu trả lời
LinearLayout organizes its children in a single line (horizontal with android:orientation='horizontal' or vertical with 'vertical'). It's the simplest layout. You can control distribution with layout_weight to distribute available space.
Which Layout allows positioning Views relative to each other?
Which Layout is recommended by Google for complex interfaces?
+27 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Android khác
Android Fundamentals
Android Lifecycle
Android Navigation
Android Data Management
Android Networking
Android Testing
Android Gradle
Kotlin Language Essentials for Android
Room Database
Background Work
Jetpack Compose
Permissions and Device Features
Firebase for Android
Android MVVM Architecture
Advanced Android Networking
Kotlin Collections and Operators
Kotlin Coroutines and Flow
Android Dependency Injection
Android MVI Architecture
Android Clean Architecture
Android Compose Advanced
Android Performance and Monitoring
Android Security and Privacy
Android CI/CD and Release
Android UX and Form Factors
Android Testing Advanced
Nắm vững Android cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí