Android - Tabs in bottom of screen

前端 未结 10 1728
有刺的猬
有刺的猬 2020-12-30 15:06

I have been looking for about a day for a way to get my android application have tabs in the bottom of the screen.

On the Android Developer website in the Styles and

相关标签:
10条回答
  • 2020-12-30 15:39

    I wanted to post an update here. Bottom nav bars are now Android Canon. The main take-aways from this are:

    1) Use bottom nav bars only for 3-5 icons. Any less, use tabs. Any more, use scrollable tabs (page down on that same link).

    2) Avoid using a bottom nav bar and tabs together, and be sure the responsibilities of both are clearly separated if you do.

    3) Bottom nav bars should be used for navigation not actions (use the ActionBar for those)

    0 讨论(0)
  • 2020-12-30 15:39

    I came across your question seeking to do the same thing, however according to androids development guidelines, you should not ever have a tab bar at the bottom, since this is an iOS feature...

    Android Development Standards

    0 讨论(0)
  • 2020-12-30 15:41

    You seem to have the bottom bar a bit confused. That's not a tab bar. The bottom bar is for actions, not navigating screens. For example, in the screenshot of the Gmail app you posted above, the bottom bar allows the user to: Compose Email, Search, Tag, Refresh and More. Refer: http://developer.android.com/design/patterns/actionbar.html

    Technically these buttons do navigate the user to other screens but, the tab bar is usually used to "switch" screens. For example viewing content by category.

    Hmm, but in the latest version of the Gmail app they have these action buttons on top. Sigh...

    0 讨论(0)
  • 2020-12-30 15:47

    With the introduction of Bottom navigation.

    https://material.google.com/components/bottom-navigation.html

    You can do this

    https://stackoverflow.com/a/36033640/6207502

    0 讨论(0)
提交回复
热议问题