https://github.com/loonggg/BottomSheetPopupDialog
底部弹出框
https://github.com/loonggg/BottomSheetPopupDialog
Last synced: about 2 months ago
JSON representation
底部弹出框
- Host: GitHub
- URL: https://github.com/loonggg/BottomSheetPopupDialog
- Owner: loonggg
- Created: 2016-10-10T06:17:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-10T07:45:16.000Z (over 8 years ago)
- Last Synced: 2024-08-03T01:26:10.101Z (10 months ago)
- Language: Java
- Size: 430 KB
- Stars: 25
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - BottomSheetPopupDialog - 底部弹出框 (对话框)
README
# BottomSheetPopupDialog
这是一个底部弹出框的库。使用方法也非常简单。
### 效果图,如下:

### Step 1. Add the JitPack repository to your build fileAdd it in your root build.gradle at the end of repositories:
```java
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```### Step 2. Add the dependency
```java
dependencies {
compile 'com.github.loonggg:BottomSheetPopupDialog:v1.0'
}
```
BottomSheetPopupDialog和官方的 BottomSheetDialog非常相似,用法也非常相似。我们可以自定义dialog的布局,然后获取做相应的操作。
```java
View dialogView = LayoutInflater.from(this).inflate(R.layout.share_bottom_dialog, null);
ShareBottomPopupDialog shareBottomPopupDialog = new ShareBottomPopupDialog(this, dialogView);
shareBottomPopupDialog.showPopup(all_layout);
```
share_bottom_dialog.xml就是我们自定义的dialog的布局,然后在new ShareBottomPopupDialog时,放进去即可。然后调用showPopup(View rootview),方法显示。这里的view是所在页面的根布局。