Customize system combined bar /navigation bar for Android tablet (bottom)

China☆狼群 提交于 2019-12-14 04:08:14

问题


I would like to override (add more buttons that would take me to several activities/fragments) to the system Navigation Bar on a tablet (according to this android ui-overview it is a "Combined bar" (for tablets) Is there a way to do this?

I couldn't find a Navigation class in the android.app package, like ActionBar.

If adding buttons to the combined/navigation bar is not possible, I think there are several options, but I'd like to explore this first: - use the action bar on top instead - add a bottom bar above the navigation bar (not really fine, since it would be on top of the combined bar), like they are showing here: Action Bar

Thanks a lot,
Cristian


回答1:


Is there a way to do this?

No. The only thing you can add to the system bar are Notifications, which are not meant for this sort of navigation.

If adding buttons to the combined/navigation bar is not possible, I think there are several options, but I'd like to explore this first: - use the action bar on top instead - add a bottom bar above the navigation bar (not really fine, since it would be on top of the combined bar), like they are showing here: Action Bar

If you are referring to the section titled "Layout Considerations for Split Action Bars", that is referred to as a "split action bar", and can be enabled on an <activity> via android:uiOptions="splitActionBarWhenNarrow". However, that will only take effect for -small/-normal screens in portrait orientation. Your buttons will automatically be placed in the action bar at the top of the screen in other circumstances.



来源:https://stackoverflow.com/questions/11768727/customize-system-combined-bar-navigation-bar-for-android-tablet-bottom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!