Jorge Leonardo
Jorge Leonardo

Reputation: 163

How create a user interfaces Kotlin

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?

enter image description here

Upvotes: 0

Views: 68

Answers (1)

Ishan Joshi
Ishan Joshi

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

Related Questions