Android drawerlayout realizes the side pull menu function
•
Android
design sketch
activity_ main.xml
Note: there are two layouts under drawerlayout. The first sub element of drawerlayout is the main content, that is, the layout displayed when the drawer is not opened, and the second sub element of drawerlayout is the content in the drawer, that is, drawer layout and layout_ Gravity is the side pull direction
Because the toolbar is used, you need to replace the settings of the actionbar
Under values, set styles.xml to noactionbar
MainActivity
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码