0
How can I make this layout? Above is the image, below is a testo box. In the middle is the problem, are 3 buttons and 1 progressbar
0
How can I make this layout? Above is the image, below is a testo box. In the middle is the problem, are 3 buttons and 1 progressbar
1
Within a Linearlayout or any other, in addition to being able to place elements such as **Textview, Imageview etc, one can also include other layout types.
With this in mind you should start by dividing your layout into intermediate layouts.
As the distribution of the elements that make up the layout is vertical start by using a Linearlayout with the attribute android:orientation="vertical"
Inside put the Imageview and the Textview.
Now look at the middle part and think of it as a separate layout, suppose what I wanted to do was just this part.
The first thing you’ll notice is that the distribution of the elements is horizontal.
Start with a Linearlayout with the attribute android:orientation="horizontal"
Put the button inside play.
Continuing our analysis we see that the distribution of Progressbar and the other two buttons are vertical.
Open one more Linearlayout with the attribute android:orientation="vertical"
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 one more Linearlayout with the attribute android:orientation="Horizontal"
and include the two buttons.
Close all the Linearlayout with the attribute </LinearLayout>
Include this whole set between the Imageview and the Textview of the first Linearlayout.
I chose to do the central part using Linearlayout but the same could be done using a Relativelayout
The steps listed only serve to build the skeleton of the layout. It will be necessary to use the alignment attributes, margins and weight to better position the elements.
Browser other questions tagged android android-layout
You are not signed in. Login or sign up in order to post.
Any doubt in specific?
– Renan Gomes
Renan, my doubt and how to position the imagebutton and progressbar the same way as the image above.
– William
Mobile, welcome to SOPT. The way the question looks, you want someone to do the layout for you. The colleague’s question about his "specific doubt" is precisely: what is the exact difficulty you had when trying to build your layout? Edit the question to include indications of how you’re planning to do it and even a screenshot of the layout you’ve already got so far.
– Luiz Vieira
@Luiz Vieira, thank you for the welcome, about my doubt is how to position the 3 buttons and 1 progressbar, which is the middle box I sent in the print. So far only managed to put Image in the Top and Textview in the footer, missing the middle.
– William