How to Make Android Apps 12

Android Fragment ExampleIn this tutorial I will provide another Android Fragment example. I have received a bunch of questions about a Android development Fragment example. So, here I’ll cover every line of code in it and I will also show how to change it so that it fits the requirements that many people want.

We’ll cover how to create horizontal and portrait layouts, ListViews, Array Adapters, onSaveInstanceState, ListView events, opening different layouts based on orientation.

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

Code From the Video

FragmentLayout.java

fragment_layout.xml

layout-land/fragment_layout.xml

TitlesFragment.java

SuperHeroInfo.java

4 thoughts on “How to Make Android Apps 12”

  1. I have to say Derek is a very very smart guy. He have experienced such many fields in each of which he is expert. He has ability to make money and he love to help people. Truly Wonderful person. How much time do you spend one day in making videos and/or doing other works?

    1. Thank you for the nice compliments 🙂 I’m extremely lucky to be able to do what I do. Each video takes about :

      30 minutes for planning
      40 minutes recording / writing code
      50 minutes editing
      4 hours rendering

      It sounds like a lot, but most of the time is taken up rendering which happens over night. It is very fun for me 🙂

  2. Derek,

    You are great guy and your tutorials helped me a lot.

    However I got one question that bothers me…
    I’m creating app that takes few inputs from EditText, after that on button click it sends data to table that is created dynamically and also do some calculations.

    Everything works perfectly fine and program looks the way I want it to look. One problem that I have and I can’t find answer anywhere to it is how to save this table that’s being created and have it after my screen rotates.

    I know that they are onSave… methods that’s works for stuff that created in your xml file etc. But how to save and restore something that has been created programmatically?

    Thanks for help,
    Matt

    1. Hi Matt, Thank you for the compliment 🙂 To save changes between screen rotations I normally save data in a bundle. That is the default use for onSaveInstanceState. Otherwise a SQLite database may be useful.

Leave a Reply

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