Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loonggg/BottomSheetPopupDialog
底部弹出框
https://github.com/loonggg/BottomSheetPopupDialog
Last synced: 1 day ago
JSON representation
底部弹出框
- Host: GitHub
- URL: https://github.com/loonggg/BottomSheetPopupDialog
- Owner: loonggg
- Created: 2016-10-10T06:17:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2016-10-10T07:45:16.000Z (over 7 years ago)
- Last Synced: 2024-02-29T00:39:10.722Z (4 months ago)
- Language: Java
- Size: 430 KB
- Stars: 24
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-github-android-ui - BottomSheetPopupDialog - 底部弹出框 (对话框)
- awesome-github-android-ui - BottomSheetPopupDialog - 底部弹出框 (对话框)
README
# BottomSheetPopupDialog
这是一个底部弹出框的库。使用方法也非常简单。
### 效果图,如下:
![](https://raw.githubusercontent.com/loonggg/BottomSheetPopupDialog/master/image/33.gif)
### 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是所在页面的根布局。