Learn to use the material design control (II) use drawerlayout to realize the sideslip menu bar effect

This article describes how to use drawerlayout and navigationview to achieve the effect of sidesliding menu bar.

The effects are as follows:

Layout layout

Navigationview needs to set app: headerlayout and app: menu. Headerlayout corresponds to the upper part of the menu, which is generally used to display user information, and menu corresponds to the actual menu item file.

headerLayout

menu

code implementation

Actionbardrawertoggle can cooperate with the toolbar to realize the switching effect of menu buttons on the toolbar.

The source code of the project has been released to GitHub, and other controls will be added slowly in the future.

Source address: materialdesignexample

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

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