dview-titlebar
![Release](https://camo.githubusercontent.com/67a3d595b45b31de9e2146a44a73fe5d5db5f42a7265fecde03f51cede8882e8/68747470733a2f2f6a69747061636b2e696f2f762f646f7261342f64766965772d7469746c656261722e737667)
// 添加以下代码到项目根目录下的build.gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
// 添加以下代码到app模块的build.gradle
dependencies {
implementation 'com.github.dora4:dview-titlebar:1.37'
}
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}个菜单")
}
})