Achini Samuditha
Achini Samuditha

Reputation: 301

how to display one screen in the left side while new window in the right (multiple views in the same screen)

the window should look like this.

I want to show the black menu when tapped on the settings icon in the upper right corner of the 1st screen. can somebody explain how to do this in android with a code ?

Upvotes: 0

Views: 190

Answers (2)

Shivang Trivedi
Shivang Trivedi

Reputation: 2182

try this library for sliding drawer https://github.com/korovyansk/android-fb-like-slideout-navigation

Upvotes: 1

Jay Snayder
Jay Snayder

Reputation: 4338

It sounds as though you are looking to take advantage of the DrawerLayout structure within Android.

DrawerLayout

DrawerLayoutExample

This form of layout is designed to create a sliding menu on whatever side of the screen you would like. If you prefer it come out of the right side of your screen such as the icon over there near it as you had mentioned, then you can do it that way. You are essentially building it into a normal layout, with the first element being your layout outside the drawer. The second part of your layout will define how you want the drawer to look. I have only recently used it myself for the first time, but it is a nice menu to hide a whole bunch of menu items that are not commonly used or take up too much space. The G-mail app is an example of the drawer as well with the slide out on the left and custom built options for handling e-mails if you want to play with that and see if it is what you are after.

Upvotes: 2

Related Questions