Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android, slidingpanelayout vs 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.

I've passed through this Difference between SlidingPaneLayout and NavigationDrawer

may anyone tell the difference between them??

like image 221
a fair player Avatar asked Jun 07 '13 19:06

a fair player


1 Answers

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

enter image description here

And this is what the SlidingPaneLayout looks like:

enter image description here

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:

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

like image 180
Ahmad Avatar answered Oct 18 '22 10:10

Ahmad