title: Fragment dialog crashes app, any alternative fix?
body: <p>trying to remove the top banner layer of an Android app, 
  and I made this change in Android Manifest file,</p>
  
  <pre><code>android:theme="@android:style/Theme.NoTitleBar"
  </code></pre>
  
  <p>This crashed the app, and from another question in Stackoverflow itself, I changed</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
  </code></pre>
  
  <p>to</p>
  
  <pre><code>public class MainActivity extends FragmentActivity
  </code></pre>
  
  <p>And it worked, however, in the same Activity there is also a Dialog present, and whenever the dialog is clicked, it crashes the app again, So looking for a fix! any help will be appreciated.</p>
  
  <p>Here is the logcat: </p>
  
  <pre><code>05-16 21:25:27.796    1839-1839/zyia.alarm.zyia.zyia E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: zyia.alarm.zyia.zyia, PID: 1839
      java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
              at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:113)
              at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
              at android.support.v7.app.AppCompatDialog.&lt;init&gt;(AppCompatDialog.java:47)
              at android.support.v7.app.AlertDialog.&lt;init&gt;(AlertDialog.java:92)
              at android.support.v7.app.AlertDialog$Builder.create(AlertDialog.java:882)
              at zyia.alarm.zyia.zyia.FireMissiles.onCreateDialog(FireMissiles.java:26)
              at android.support.v4.app.DialogFragment.getLayoutInflater(DialogFragment.java:308)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
              at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
              at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
              at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
              at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
              at android.os.Handler.handleCallback(Handler.java:739)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5221)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  </code></pre>
  
  <p>The code for the dialog Activity : </p>
  
  <pre><code>import android.app.Dialog;
  import android.content.DialogInterface;
  import android.os.Bundle;
  import android.support.v4.app.DialogFragment;
  import android.support.v7.app.AlertDialog;
  import android.view.LayoutInflater;
  
  public class FireMissiles extends DialogFragment {
  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
      // Use the Builder class for convenient dialog construction
      AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
  
      LayoutInflater inflater = getActivity().getLayoutInflater();
  
      builder.setView(inflater.inflate(R.layout.main_info, null))
              .setPositiveButton(R.string.fire, new  
  
     DialogInterface.OnClickListener() {
                  public void onClick(DialogInterface dialog, int id) {
                      // FIRE ZE MISSILES!
                  }
              });
  
      // Create the AlertDialog object and return it
      return builder.create();
     }
  }
  </code></pre>