项目需求封装一个底部弹窗
github地址:https://github.com/zhangxiang0316/BottomDialog
使用方法
BottomDialog<String> dialog = new BottomDialog<>(this, datas, new SelectPositionCallBack() { @Override public void selectPosition(int position) { Toast.makeText(MainActivity.this, datas.get(position), Toast.LENGTH_SHORT).show(); } }); dialog.show();
跟项目添加
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
项目中添加
dependencies {
compile 'com.github.zhangxiang0316:BottomDialog:1.0.0'
}