-
-
Save codeforfun-jp/14c44139671b64d6e0a6cec360d716ca to your computer and use it in GitHub Desktop.
How to create dialog series 1 basic - java 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
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
findViewById(R.id.btn).setOnClickListener(view -> { | |
DialogFragment dialogFragment = new MyDialogFragment(); | |
dialogFragment.show(getSupportFragmentManager(), "my_dialog"); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment