https://github.com/dora4/dview-bottombar
https://github.com/dora4/dview-bottombar
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dora4/dview-bottombar
- Owner: dora4
- License: apache-2.0
- Created: 2025-06-07T08:17:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-04T09:38:56.000Z (10 months ago)
- Last Synced: 2025-09-04T09:39:17.778Z (10 months ago)
- Language: Kotlin
- Size: 69.3 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dview-bottombar

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

#### Gradle依赖配置
```groovy
// 添加以下代码到项目根目录下的build.gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// 添加以下代码到app模块的build.gradle
dependencies {
implementation 'com.github.dora4:dview-bottombar:1.0'
}
```
#### 使用方式
```xml
@raw/tab_one_normal
@raw/tab_two_normal
@raw/tab_three_normal
@raw/tab_four_normal
@raw/tab_one_selected
@raw/tab_two_selected
@raw/tab_three_selected
@raw/tab_four_selected
Tab1
Tab2
Tab3
Tab4
```
```xml
```
```kotlin
bottomBar.setOnTabSelectedListener(object : DoraBottomBar.OnTabSelectedListener {
override fun onTabSelected(index: Int) {
when (index) {
0 -> showTabOne()
1 -> showTabTwo()
2 -> showTabThree()
3 -> showTabFour()
}
}
})
```