Android View and ViewGroup
Easy tutorial about Android View and ViewGroup with simple examples.
Hello Jawans, 😎 today we will be learning about Android View
and ViewGroups
. Howzzzzz the Joshhhhhhhh …???…
To learn about Android SharedPreferences click here 👍💗
1. What is a View
Views are the building block of an Android Application’s UI Interface (UI). In very blunt terms it’s a box that users can interact with either for giving input or performing some action. There are many views, but today we will highlight only a few most commonly used views.
- TextView: For displaying text contents in the UI.
- EditTextView: For adding input area in the UI.
- ImageView: For displaying Image contents in the UI.
- ButtonView: For adding (action) buttons in the UI.
- ImageButtonView: For adding (action) buttons with an image in the UI.
- RadioButtonView: For adding radio buttons in the UI.
- Checkbox ButtonView: For adding CheckBox buttons in the UI.
In the below image, we can see an Instagram App UI translated in terms of Views
As you can see, we can use a combination of ImageView, TextView, ButtonView, and other views to create an attractive UI.
2. What is a ViewGroup 🤔💭
ViewGroup, as the name suggests is a special type of view that can contain other views (children) one or more. It is an invisible container for other views and can also contain another ViewGroup inside it. Below are some ViewGroups
- LinearLayout
- RelativeLayout
- FrameLayout
- TableLayout
- CoordinatorLayout
- ConstraintLayout
To learn more about View and ViewGrop visit the Android studio docs
I hope you Jawans 😎 enjoyed reading the tutorial let’s meet in the next tutorial. Howzzzzz the Joshhhhhhhh …???…
To Read about Android Shared Preferences click here
To Read about ReactJs click here