Getting a DialogFragment to instantiate

view story

http://stackoverflow.com – I am new to Android. Trying to show a dialog on press of a button like below using DialogFragments File : Dialog2/LoginDialog.java package com.kartnet.Dialog2; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.LayoutInflater; import android.widget.Toast; import android.content.Context; import android.app.Dialog; import android.content.DialogInterface; import android.app.AlertDialog; import android.app.DialogFragment; import android.util.Log; public class LoginDialog extends DialogFragment { @Override public Dialog onCreateDialog(Bun (HowTos)