简体   繁体   中英

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

窗口应如下所示。

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM