View, View Groups and Layouts in Android – 09 – Android Development Tutorial for Beginners



View, View Groups and Layouts in Android – 09 – Android Development Tutorial for Beginners

View, View Groups and Layouts in Android - 09 - Android Development Tutorial for Beginners

View, View Groups and Layouts in Android – 09 – Android Development Tutorial for Beginners
𝐃𝐨𝐧𝐚𝐭𝐞 𝐨𝐫 𝐁𝐮𝐲 𝐦𝐞 𝐂𝐮𝐩 𝐨𝐟 𝐂𝐨𝐟𝐟𝐞𝐞 : https://paypal.me/codingpursuits

Have you ever think how we are seeing the beautiful screens and pictures on mobile phone screen. If not then let us discuss this behavior.
Hello guys welcome to android development tutorials for absolute beginners. In this video we are going to discuss about the User interface or UI part including views, View groups and layouts
of android mobile application.

So tuned and watch the video till the end

These little bulbs are called pixels and are so small that human eye can not see them. There are thousands or even millions of pixels on mobile phone screen.
the total number of pixels are called pixel density. The greater the number of pixel on mobile screen, the greater the picture qulaity you are going to see.
consider the following example here we have two phone screen. the left side has less amount of pixels, where as right picture has great amount of pixels
and you caqn see the difference in picture quality.

for example when you are seeing a round ball on mobile screen. It is actually these pixels, who are glowing in blue colors.
As you can see here this shape is 20 pixel in height and 20 pixel in width.

WHAT is VIEW ?

View is simply a rectangular area consisting of fixed quantity of pixels under it. Android SDK provides builtin views like Buttons, check box, progress bar, textviews etc.
You can also design your own view in it as well. These views are also called widgets or UI components.

What is View Groups?

Multiple views combined together to form View Groups. It has one parent view and other child views int. Consider the example of Raadio group.
It has multiple radio buttons and you can select only one choice in given situation.

So another way to measure the width and height of a UI components on mobile screen is , how much pixels this picture is covering on x and Y axis or alogn height and length.

There are also following units to describe the quantity or dimensions of pixels.

So, WHAT ARE LAYOUTS?

Today there are various types of mobile phones having different dimensions. some have smaller screens and some have large wider screens and some falls in middle size of screens.
So it becomes the challenge for android developer to design a screen or views, which will have same look and views placement on all different dimensions screens.

Android SDK solves this problem by providing different layout managers for this purpose.

Layout are just like view groups. They are used to bind different views and control their location and positions on screen. so that user can see the same view location on every mobile screen

Android SDK provides following layouts ,

Constraint Layout: This layout can be used to design simple to very complex view designs. This layout define constraints, mean first view will be x amount of pixel away from other view.
also the view will always be displayed in the middle of screen and many more constraints.

Linear Layout: This layout arrange all views in a line. For example either you can place all views in horizontal direction or in vertical direction.

Table layout: as we know every table has some rows and columns. So this layout arrange views in rows and columns.

Frame layout: This lay out defines the frames or layers on mobile screen. And the views can be arranged on the top of each other.

Relative Layout: This view resembles with constarints layout. In this layout user can define to place a view in horizontal or vertical center to other view.
this can also define the view to stick on the top or bottom to other view.
and also can define how much pixel it should be away from other view .

Absolute layout: This layout is used to place the view in X and Y axis of the screen at some fixed points.

Grid layout: Just like table layouts , this layout provides a grid in the form of cells and rows and user can place its views in particular cell of the grid.

Coordinate Layout: This layout is particular used to display app bar on the application. and other views are get connected to lowest part or sections of layout.

WHICH LAYOUTS SHOULD I USE?

Well it depends upon the User interface or Screen design. Developer can also use multiple layout s to make d3esired design.
So we will cover each constraints in later sessions.

hope you enjoyed the video. Please like share and comment on our video and subscribe to our channel.

Subscribe to Our Channel: https://www.youtube.com/channel/UC6nBUmGu9XqYiBQbYyPlCQg
Facebook Group: https://www.facebook.com/groups/2030125363667051
Twitter: https://twitter.com/CodingPursuits
Facebook Page : https://www.facebook.com/CodingPursuits/
Linkdin: www.linkedin.com/in/coding-pursuits
Pinterest: https://www.pinterest.com/codingpursuits/

Comments are closed.