Need help with BottomDialog?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Curzibn
416 Stars 83 Forks 30 Commits 8 Opened issues

Description

BottomDialog 一个自定义的从底部弹出的dialog,仿照微博的分享弹框

Services available

!
?

Need anything else?

Contributors list

No Data

BottomDialog

BottomDialog 一个自定义的从底部弹出的dialog,仿照微博的分享弹框

效果图

Alt text Alt text

导入

compile 'top.zibin:BottomDialog:1.0.5'

Release Notes

v1.0.5, 2016/10/21

  • 修改多行显示下只有最后一行点击有相应问题

使用

BottomDialog 只需要一句代码即可轻松显示底部弹框

创建Menu


    

设置 Layout 样式

new BottomDialog(MainActivity.this)
    .title(R.string.title_item)             //设置标题
    .layout(BottomDialog.GRID)              //设置内容layout,默认为线性(LinearLayout)
    .orientation(BottomDialog.VERTICAL)     //设置滑动方向,默认为横向
    .inflateMenu(R.menu.menu_share)         //传人菜单内容
    .itemClick(new OnItemClickListener() {  //设置监听
        @Override
        public void click(Item item) {
            Toast.makeText(MainActivity.this, getString(R.string.share_title) + item.getTitle(), Toast.LENGTH_LONG).show();
        }
    })
    .show();

Listener 事件监听方式调用

new BottomDialog(context)
    .title(R.string.share_title)
    .inflateMenu(R.menu.menu_share)
    .itemClick(new OnItemClickListener() {
        @Override
        public void click(Item item) {
                //TODO 处理点击结果
            }
        })
    .show();

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.