How to make a similar tab bar like in the picture?
- Do you mean the bottom panel? If yes, then like any other markup element. Specify what causes you difficulties. - Yuriy SPb ♦
- Thanks for the quick response! Yes, I mean the bottom panel .. i. Are these just buttons on a black background? - researcher
- Yes, more - in response. - Yuriy SPb ♦
- Tabbar at the bottom of the screen is one of the worst mistakes in building the interface of an Android application. I do not recommend doing so. Learn more here: developer.android.com/design/patterns/pure-android.html - saturov
- @saturov, thanks for the reply! In the future I will consider) Now it requires TZ ... - researcher
|
3 answers
To create this you need:
- LinearLayout horizontal
- and there are 4 more of them, but vertical, with weight = 1
- in which ImageView & TextView
- Put the received item down the screen in any of the many ways.
- And why ImageView? - lsillarionov
- It is possible without it, using drawableTop, but I don’t like this method due to less control over the image size. - Yuriy SPb ♦
- According to the idea of a normal button should be enough? And the button will have a picture with an icon and text .. And what is the best way to press everything to the bottom? - researcher
- oneAt the expense of the buttons I will not say - they have never been useful to me. You can press to the bottom, for example, by placing this element in FrameLayout with gravity = "bottom". Or in RelativeLayout Indicating to be located below the overlying element. - Yuriy SPb ♦
- @Yuriy SPb, how do you best press down to the bottom?) My screen consists of: ImageView (logo), FrameLayout (where I will load the fragments by pressing the bottom button), and below the menu button .. - researcher
|
I advise you to use TabLayout from bileot support. How to use it, tell here https://guides.codepath.com/android/Google-Play-Style-Tabs-using-TabLayout .
You just need to change a little layout so that it is at the bottom of the screen, not the bottom.
- This answer should be selected as the best. Is that with the amendment that the tabs below can not be done: developer.android.com/design/patterns/pure-android.html - saturov
|
If you use actionbar, there is official documentation. Section Using split action bar .
In the new Tabbar, too, you can turn it all.
Well, you can always have the root element RelativeLayout and it already has a layout with android:layout_alignParentBottom="true" and tab layout.
|
