Android,slidepanelayout与NavigationDrawer [英] Android, slidingpanelayout vs navigationDrawer

查看:171
本文介绍了Android,slidepanelayout与NavigationDrawer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将要使用其中之一,但是我很困惑.

I'm about to use one of them and yet i'm very confused.

我不知道区别.对我来说,两者看起来都一样.

I don't know the difference. to me, both look the same.

我已经通过了 SlidingPaneLayout和NavigationDrawer之间的区别

谁能告诉他们两者之间的区别?

may anyone tell the difference between them??

推荐答案

这是官方导航抽屉(

This is what the official Navigation Drawer (DrawerLayout) looks like:

这就是 SlidingPaneLayout 看起来像:

And this is what the SlidingPaneLayout looks like:

两者都有不同的目的.简而言之,DrawerLayout用作菜单.另一方面,如果两个屏幕的内容都会相互影响,则您将使用SlidingPaneLayout.或如文档所述:

Both serve different purposes. The DrawerLayout serves as a menu, to put it simple. The SlidingPaneLayout on the other hand is a what you would use, if the content of both your screens would interact with each other. Or to as the documentation puts it:

仅应将SlidingPaneLayout视为允许 通常在较大的屏幕上使用的两窗格布局以适应较小的屏幕 以自然的方式显示屏幕

The SlidingPaneLayout should be thought of only as a way to allow a two-pane layout normally used on larger screens to adapt to smaller screens in a natural way

这篇关于Android,slidepanelayout与NavigationDrawer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆