Reputation: 163
I want to create 4 buttons in the MaintActivity, which when pressing must do operations with RadioButton, checkbok control, spinner control and listview control.
Question:
Should I create 4 interfaces (activities) to carry out this type of operations?
Is there another way to do it? How can I do it?
Upvotes: 0
Views: 68
Reputation: 116
You could actually just use an alert dialog to show the controls. But you are correct, you can have separate activities as well and you can open them using intent.
btn.setOnClickListener { startActivity(Intent(this, SpinnerActivity::class.java)) }
Check out how to display alertdialog.
Upvotes: 1