Android 侧滑显示控件 MaterialDrawer

码农软件 · 软件分类 · Android UI 组件 · 2019-04-25 10:12:45

软件介绍

MaterialDrawer 是一个类似 Google 官方 NavigationView 侧滑显示控件, 个人认为 NavigationView 并没有 MaterialDrawer 实用, 因为 NavigationView 自由度不是很好, 很多都写死了不可以自由定义布局, 而 MaterialDrawer 能够实现跟 NavigationView 一样的效果, 同时还支持自定义效果, 自由度非常高。

效果图:

Image

Image

使用示例

//if you want to update the items at a later time it is recommended to keep it in a variablePrimaryDrawerItem item1 = new PrimaryDrawerItem().withName(R.string.drawer_item_home);SecondaryDrawerItem item2 = new SecondaryDrawerItem().withName(R.string.drawer_item_settings);//create the drawer and remember the `Drawer` result objectDrawer result = new DrawerBuilder()
    .withActivity(this)
    .withToolbar(toolbar)
    .addDrawerItems(
        item1,        new DividerDrawerItem(),
        item2,        new SecondaryDrawerItem().withName(R.string.drawer_item_settings)
    )
    .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {        @Override
        public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {            // do something with the clicked item :D
        }
    })
    .build();

本文地址:https://codercto.com/soft/d/4341.html

程序员面试笔试宝典

程序员面试笔试宝典

何昊、叶向阳、窦浩 / 2012-10 / 59.80元

《程序员面试笔试宝典》除了对传统的计算机相关知识(C/C++、数据结构与算法、操作系统、计算机网络与通信、软件工程、数据库、智力题、英语面试等)进行介绍外,还根据当前计算机技术的发展潮流,对面试笔试中常见的海量数据处理进行了详细的分析。同时,为了更具说服力,《程序员面试笔试宝典》特邀多位IT名企面试官现身说法,对面试过程中求职者存在的问题进行了深度剖析,同时《程序员面试笔试宝典》引入了一批来自于名......一起来看看 《程序员面试笔试宝典》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具