Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dora4/dview-titlebar
仿微信标题栏
https://github.com/dora4/dview-titlebar
Last synced: about 2 months ago
JSON representation
仿微信标题栏
- Host: GitHub
- URL: https://github.com/dora4/dview-titlebar
- Owner: dora4
- License: apache-2.0
- Created: 2023-05-09T16:14:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-04T19:56:04.000Z (5 months ago)
- Last Synced: 2024-09-06T04:52:26.888Z (5 months ago)
- Language: Kotlin
- Homepage:
- Size: 125 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dview-titlebar
![Release](https://jitpack.io/v/dora4/dview-titlebar.svg)
--------------------------------#### 卡片
![Dora视图_Title_Bar](https://github.com/user-attachments/assets/f34119d2-3a8c-4004-a118-b14d95664335)
![Dora视图_积木战士](https://github.com/user-attachments/assets/66763607-391b-43f3-bf39-6f59ab9da2f3)#### Gradle依赖配置
```groovy
// 添加以下代码到项目根目录下的build.gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// 添加以下代码到app模块的build.gradle
dependencies {
implementation 'com.github.dora4:dview-titlebar:1.37'
}
```#### 控件使用
```kotlin
mBinding.titleBar
.addMenuButton(R.drawable.ic_save)
.addMenuButton(R.drawable.ic_confirm)
.setOnIconClickListener(object : DoraTitleBar.OnIconClickListener {
override fun onIconBackClick(icon: AppCompatImageView) {
LogUtils.i("返回")
}override fun onIconMenuClick(position: Int, icon: AppCompatImageView) {
LogUtils.i("点击了第${position}个菜单")
}
})
```