https://github.com/dora4/dview-bottom-dialog
底部弹窗
https://github.com/dora4/dview-bottom-dialog
Last synced: 10 months ago
JSON representation
底部弹窗
- Host: GitHub
- URL: https://github.com/dora4/dview-bottom-dialog
- Owner: dora4
- License: apache-2.0
- Created: 2023-06-08T05:10:28.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-05-13T21:46:12.000Z (about 1 year ago)
- Last Synced: 2025-05-27T04:51:32.700Z (about 1 year ago)
- Language: Kotlin
- Size: 124 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dview-bottom-dialog

--------------------------------
#### 卡片

#### Gradle依赖配置
```groovy
// 添加以下代码到项目根目录下的build.gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// 添加以下代码到app模块的build.gradle
dependencies {
implementation 'com.github.dora4:dview-bottom-dialog:1.13'
}
```
#### 使用控件
```kotlin
// 打开底部弹窗
val dialog = DoraBottomDialog()
dialog.show(this, R.layout.dialog_content) {
// 在这里初始化你的内容数据
}
// 打开底部菜单弹窗
val dialog = DoraBottomMenuDialog()
dialog.setOnMenuClickListener(object : DoraBottomMenuDialog.OnMenuClickListener {
override fun onMenuClick(position: Int, menu: String) {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(url)
startActivity(intent)
}
})
dialog.show(this, arrayOf("外部浏览器打开", "刷新网页"))
```
过时的底部弹窗。
```kotlin
val dialogWindow = DoraDialogWindow()
DoraDialog.Builder(this)
.create(dialogWindow)
.show()
```