Designing a Circle Layout Using LinearLayout in Android

Designing a Circle Layout Using LinearLayout in Android

Designing a Circle Layout Using LinearLayout in Android. Hello all, today i am back with another tutorial in which i am going to design circle layout using LinearLayout. LinearLayout is one of the key element in any android app it plays important role in designing any user interface of app.

So let’s start our tutorial. Designing a Circle Layout Using LinearLayout in Android

What is LinearLayout?

  • LinearLayout is a view group that aligns all children in a single direction, vertically or horizontally.
  • In the Linear layout all the elements are displayed in linear fashion means all the childs/elements of a linear layout are displayed according to its orientation.

Creating New Android Project (Designing a Circle Layout Using LinearLayout in Android)

  • Create a new project in Android Studio File–>New–>New Project.
  • Enter Application Name, Package Name, Select Empty Activity and click on finish.

Gradient Background

  • Right click on drawable folder–>New–>Drawable resource file.
  • Write File Name and click Ok.
  • Write following code.

NoActionBar Theme

  • Open styles.xml file inside values folder.
  • Change parent theme to –

Add Icons

  • Add icons to mipmap folder.
  • I will provide all the code and icons at the end of the project.

Designing Part

Our layout will contain one Parent Liner Layout which will have three Linear layout.

Parent LinearLayout

  • First of all we have to create one LinearLayout which will be our Parent LinearLayout and it’s orientation is set to be “Vertical” because It will have 3 three vertical children.

Designing a Circle Layout Using LinearLayout in Android

as you can see in the figure first we need to create a parent linearlayout after that we will create three child linearlayout.

Three LinearLayout inside parent layout

  • After first step we will create three linear layout inside parent layout. You can refer to above figure to see how you will do it.

Three LinearLayout inside every child layout

  • Inside every child layout we will create three linear layout which will have orientation of vertical. so we will have total nine linear layout which will contain logo and text inside.

Padding at last

  • At last we will give padding to every nine linear layout to align them to circle looking design.

Lets Design

  • Open activity_main.xml file and put add following code.

Now run the project and enjoy.

Fell free to comment your query.

Designing a Circle Layout Using LinearLayout in Android

 

RECENT POST

Leave a Reply

Your email address will not be published. Required fields are marked *