我想更改右上角的文本按钮SAVE 。
我用过这个库
com.google.android.material:material:1.4.0
val dateRangePicker = MaterialDatePicker.Builder.dateRangePicker()
.setTitleText("Select Date")
.setTheme(R.style.Widget_AppTheme_MaterialDatePicker)
.build()
dateRangePicker.show(childFragmentManager, "date_range_picker")
dateRangePicker.addOnPositiveButtonClickListener {
val start = it.first
val last = it.second
if (start != null && last != null){
val dateRange = "${globalHelper?.convertLongToString(start)} - ${globalHelper?.convertLongToString(last)}"
binding.tvDateRange.text = dateRange
}
}