-
-
Save codeforfun-jp/ac57419776c5d205eb5225ef7d0bdb8c to your computer and use it in GitHub Desktop.
How to create dialog series 1 basic - kotlin 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
findViewById<Button>(R.id.btn).setOnClickListener { | |
val dialogFragment = MyDialogFragment() | |
dialogFragment.show(supportFragmentManager, "my_dialog") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment