I have an Activity named whereActity
which has child dialogs as well. Now, I want to display this activity as a dialog for another activity.
How can I d
Create activity as dialog, Here is Full Example
AndroidManife.xml
DialogActivity.kt
class DialogActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_dialog)
this.setFinishOnTouchOutside(true)
btnOk.setOnClickListener {
finish()
}
}
}
activity_dialog.xml