What is the difference between a view and a subview in Android?
View is a basic building block of UI (User Interface) in android. A view is a small rectangular box that responds to user inputs. Eg: EditText, Button, CheckBox, etc. ViewGroup is an invisible container of other views (child views) and other ViewGroup.
What is Android View? A View is a simple building block of a user interface. It is a small rectangular box that can be TextView, EditText, or even a button. It occupies the area on the screen in a rectangular area and is responsible for drawing and event handling.
What is the main purpose of a ViewGroup? It groups together the most common views that developers use in Android apps. It serves as a container for View objects, and is responsible for arranging the View objects within it. It is required to make a view interactive as a way to group TextViews on a screen.
ListView is a ViewGroup that displays a list of vertically scrollable items.
there is no such thing called a 'subview', its just used to refer to a view inside another view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With