Android drawerlayout realizes the side pull menu function

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
分享
二维码
< <上一篇
下一篇>>