I have constructed a BottomSheetDialog with a couple of buttons in it. Once the user clicked on a button I want to highlight that button next time the dialog opens such that the user knows what their selected last. I mean one of the button has to be highlighted as if it was pressed.
I am using outline style buttons.
val dialog = BottomSheetDialog(this)
dialog.setContentView(R.layout.layout_dialog)
dialog.findViewById<Button>(R.id.button_1)?.setOnClickListener {
...
}
dialog.findViewById<Button>(R.id.button_2)?.setOnClickListener {
...
}