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

互联网运营实战手册

互联网运营实战手册

李春雷 / 人民邮电出版社 / 2017-4 / 49.80元

为什么网络推广做不起来?微信文章也是套路?标题党的背后是什么?把服务器搞瘫痪的活动是怎么玩出来的?社群究竟要如何运营?数据又该如何运营?你会任务分解吗? 《互联网运营实战手册》详细剖析了网站(产品)的运营技巧与实战,涵盖实用的互联网运营方法,是作者从多年的实战中提炼出的运营心得和精华,涉及运营技巧、运营工具和运营思维方法。详细讲解了用户运营、内容运营、新媒体运营、社群运营、活动运营和数据运营......一起来看看 《互联网运营实战手册》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

SHA 加密
SHA 加密

SHA 加密工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试