package com.biekerwebdesign.openexoplanetcatalogue;

import android.app.Activity;
import android.app.FragmentTransaction;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;


import java.util.List;
import java.util.ArrayList;

import com.biekerwebdesign.beans.System;
import com.biekerwebdesign.xml.XMLPullParserSystem;
import android.util.Log;

import java.io.IOException;
import org.xmlpull.v1.XmlPullParserException;

public class MainActivity extends Activity {

    private ListView listView;
    private XMLPullParserSystem parser;
    private List<System> systems;
    private ArrayAdapter<System> adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if (savedInstanceState == null) {
            FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
            fragmentTransaction.add(R.id.system_container, new SystemFragment());
            fragmentTransaction.commit();
        }

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

/*    @Override
       public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
*/

}

@@ -111,24 +111,98 @@
 ransaction;%0A
+import android.content.Context;%0Aimport android.content.res.Configuration;%0A
 import andro
@@ -338,16 +338,72 @@
 stView;%0A
+import android.view.Menu;%0Aimport android.view.MenuItem;%0A
 %0A%0Aimport
@@ -1000,16 +1000,125 @@
 main);%0A%0A
+        if (findViewById(R.id.first_container) != null && findViewById(R.id.second_container) != null) %7B%0A    
         
@@ -1143,32 +1143,36 @@
 tate == null) %7B%0A
+    
             Frag
@@ -1254,32 +1254,36 @@
 ();%0A            
+    
 fragmentTransact
@@ -1299,49 +1299,491 @@
 .id.
-system_container, new SystemFragment());%0A
+first_container, new SystemFragment());%0A                fragmentTransaction.add(R.id.second_container, new StarFragment());%0A                fragmentTransaction.commit();%0A            %7D%0A        %7D else if (findViewById(R.id.first_container) != null) %7B%0A            if (savedInstanceState == null) %7B%0A                FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();%0A                fragmentTransaction.add(R.id.first_container, new SystemFragment());%0A    
     
@@ -1832,18 +1832,32 @@
     
+    %7D%0A%0A        
 %7D
-%0A
 %0A    %7D%0A%0A
 %0A   
@@ -1852,17 +1852,16 @@
 %0A    %7D%0A%0A
-%0A
     @Ove
@@ -2094,10 +2094,9 @@
  %7D%0A%0A
-/*
+%0A
     
@@ -2542,11 +2542,8 @@
    %7D
-%0A*/
 %0A%0A%7D%0A

Simplify multi-pane layout in onCreate() method