package com.kovaciny.linemonitorbot;

import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

public class DrainingFragment extends SectionFragment {
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		
		View rootView = inflater.inflate(R.layout.draining_fragment,
				container, false);
		
		final ListView testList = (ListView) rootView.findViewById(R.id.listView1);
		final Button myButton = (Button)rootView.findViewById(R.id.button1);
		myButton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
			    myButton.setText("You click...");
			    // SLEEP 2 SECONDS HERE ...
			    Handler handler = new Handler(); 
			    handler.postDelayed(new Runnable() { 
			         public void run() { 
			              myButton.setText("and I respond."); 
			         } 
			    }, 2000); 
				
			}
		});
		
		String testStrings[] = {"one","two","three", "four","five","six","seven","eight","nine","ten"};
		
		
		ArrayAdapter<String> testAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, testStrings);
		testList.setAdapter(testAdapter);
		
	    // SLEEP 2 SECONDS HERE ...
	    Handler handler = new Handler(); 
	    handler.postDelayed(new Runnable() { 
	         public void run() { 
	        		Integer testArray[] = {1,2,3,4,5,6,7,8,9,10,11,12};
	        		ArrayAdapter<Integer> secondAdapter = new ArrayAdapter<Integer>(getActivity(), android.R.layout.simple_list_item_1, testArray);
	        		testList.setAdapter(secondAdapter);
	         } 
	    }, 2000); 
	    
		return rootView;
	}
}

@@ -33,16 +33,49 @@
 bot;%0D%0A%0D%0A
+import android.content.Context;%0D%0A
 import a
@@ -1662,16 +1662,304 @@
 1,12%7D;%0D%0A
+%09        %09%09Context cont = getActivity();%0D%0A%09        %09%09if (cont.equals(null)) %7B%0D%0A%09        %09%09%09throw new NullPointerException(%22context null%22);%0D%0A%09        %09%09%7D%0D%0A%09        %09%09if (android.R.layout.simple_list_item_1 == 0) %7B%0D%0A%09        %09%09%09throw new NullPointerException(%22layout null%22);%0D%0A%09        %09%09%7D%0D%0A
 %09       
@@ -2025,29 +2025,20 @@
 nteger%3E(
-getActivity()
+cont
 , androi

Add debugging code