How can I make this layout?

0

How can I make this layout? Above is the image, below is a testo box. In the middle is the problem, there are 3 buttons and 1 progressbar

    
asked by anonymous 10.04.2015 / 22:35

1 answer

1

Inside a LinearLayout or any other, besides if you can put elements like ** TextView, ImageView etc, you can also include other layout types.

Keeping this in mind should begin by dividing your layout into intermediate layouts.

Since the distribution of the elements that make up the layout is vertical, begin by using a LinearLayout with the attribute android:orientation="vertical"
Inside it place the ImageView and the TextView .

Now look at the central part and think of it as a separate layout, suppose what you wanted to do was this part alone.

The first thing you will notice is that the distribution of the elements is horizontal.

Start with a LinearLayout with the attribute android:orientation="horizontal" Inside it, place the play button.

Continuing our analysis we see that the distribution of the ProgressBar and the other two buttons is vertical. Open a LinearLayout with the android:orientation="vertical" attribute and include the ProgressBar .

Only the last two buttons are missing. At this point I think you've figured out how to do it, right? As your distribution is horizontal open another LinearLayout with the android:orientation="Horizontal" attribute and include the two buttons.

Close all LinearLayout with the attribute </LinearLayout>

Include this entire set between the ImageView and the TextView of the first LinearLayout .

I chose to do the central part using LinearLayout but it could be done using RelativeLayout

The steps listed only serve to build the layout skeleton. You'll need to use the alignment, margins, and weight attributes to better position the elements.

    
11.04.2015 / 14:39