android - Displaying a DialogFragment in MainActivity -


i have mainactivity (extends activity) , created dialogfragment in separate file. in order show dialogfragment, have create fragmentactivity or can achieve in mainactivity or should convert mainactivity fragmentactivity? because following show function not work in mainactivity:

private void showeditdialog() {     fragmentmanager fm = getsupportfragmentmanager();     editnamedialog editnamedialog = new editnamedialog();     editnamedialog.show(fm, "fragment_edit_name"); 


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -