How to Make Android Apps 4

How to Make Android AppsIn this video tutorial I will cover how to make menus and dialog popups. I’ll specifically cover laying out menus in main.xml, DialogFragment, AlertDialog, Action Bars, Option Menus and more.

If you missed the first videos they are here How to Make Android apps 1, 2, and 3. Definitely watch them first. All of the code follows the video below. It is heavily commented to help you learn.


If you like videos like this, it helps me if you share on Google Plus with a click here [googleplusone]

Code from the Video

main.xml

MainActivity.java

MyDialogFragment.java

AndroidManifest.xml

17 thoughts on “How to Make Android Apps 4”

  1. Hi derek ,

    you have posted so many android tutorials which are very greatly explained in details. I had seen some of them but as i am fresher i just want to know that is there sequence of those tutorials so that i can start it from the 1st tuts, if it is please tell me how the sequence is..?
    thank you in advance. hope so you will reply asap.
    thanks once again.

    1. If you don’t think you are 100% ready for Java Android watch my Android for beginners tutorial. It starts simple, but it will get you comfortable with making Java Android apps by the end. I think it is one of the best tutorials I have ever made.

      If you are 100% with Java and want to learn while making apps watch my Android Development tutorial.

      if you want the most up to date tutorial and you’re willing to wait while I make it watch my how to make Android apps tutorial.

  2. Hi Derek, I love your tutorial. But something happen when I tried to run the app in the kit kat version, the dialog appears without no text, and the buttons “OK” and “Cancel” don´t appear too. Do you know something about it? And what is the way to solve this problem. Thanks.

    1. Hi Paula, I’m guessing there must me missing text. I’m running the apps with Kit Kat as well. Try comparing your code to mine using diffnow.com and you’ll find the error.

  3. Hi Derek
    In this tutorial I found these strange results hopefully you can shed some light on them:
    1. When running this app on the emulator the fragment did not look right
    Emulation Image
    The emulator was running Android 4.2.2 ARM
    2. When running this same code on my HTC One X i got the following result
    Device Image

    Thank you for these videos

  4. Another great video.

    I had the same problem as Paula (it must be a name thing) where the text and buttons wouldn’t show.

    Changing:
    return super.onCreateDialog(savedInstanceState);
    to:
    return theDialog.create();

    in MyDialogFragment.java fixes this. This wasn’t shown in the video though.

    Thanks Derek.

  5. Hello Derek ,thank you so much for the tutorials..

    I am using Max api verion of 21 (lollipop) and was having problems with getfragmentmanager , had to replace

    getFragmentManager()

    with

    getSupportFragmentManager()

    in MainActivity.java

    Ones again , thank you so much for all these wonderful tutorials and making new tutorials with latest updates – developing for anything with Intellij rocks ..It is just so much more efficient , more thinking less chore

  6. I face the same problem of blank dialog, despite all corrections the message in dialog doesn’t show. I tried both on Emulator and Device it doesn’t work. Code is exactly same as on this page. What might be missing, any help.

    Thanks & regards,
    TC

Leave a Reply

Your email address will not be published. Required fields are marked *