Error on setAdapter() for custom ListView - Android
===

Code below is a code defining a custom made ListView for data retrieved from remote server (JSON Object). Main error is that I always get error when executing `currentListView.setAdapter(aa);` I am a bit stuck.


    public class Currently extends Activity {
    private ArrayList<CurrentlyItem> currentItems;
    
    private CurrentAdapter aa;
	private ListView currentListView;
    
    public String URL_Data;
	
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		setContentView(R.layout.layout_currently);
		/* First Tab Content */

		currentItems = new ArrayList<CurrentlyItem>();
		if(currentItems == null)
	    {
	    	Log.d(" * Napaka", "currentItems je NULL");
	    }
	    int resID = R.layout.channel_item;
	    aa = new CurrentAdapter(this, resID, currentItems);
	    if(aa == null)
	    {
	    	Log.d(" * Napaka", "aa je NULL");
	    }
	    
	    currentListView = (ListView)findViewById(R.id.currentListView);
	    if(currentListView == null)
	    {
	    	Log.d(" * Napaka", "currentListView je NULL");
	    }
	    try {
	    	currentListView.setAdapter(aa);
		} catch (Exception e) {
			Log.d(" * Napaka", e.toString());
		}
	    
	    
		populateCurrent();
		
	}
	private void populateCurrent()
	{
		try {
			Communicator CommunicatorEPG = new Communicator();
			JSONArray CurrentShows = CommunicatorEPG.getCurrentShows(0);
			String x = "";
			for (int i = 0; i < CurrentShows.length(); i++) 
			{
				JSONObject jsonObject = CurrentShows.getJSONObject(i);
				
				  String start = jsonObject.getString("start");
				  Integer duration = jsonObject.getInt("length");
				  String title = jsonObject.getString("shortTitle");
				  String epg_channel = jsonObject.getString("channel");
				  String channel_name = jsonObject.getString("channel_name");
			      CurrentlyItem newItem = new CurrentlyItem(start, duration, title, epg_channel, channel_name);
			      currentItems.add(0, newItem);
			}
			aa.notifyDataSetChanged();
			
		} catch (Exception e) {
			Log.d("Currently", "Napaka " + e.toString());
		}
	}
	 @Override
	  public boolean onCreateOptionsMenu(Menu menu) {
	    super.onCreateOptionsMenu(menu);

	    // Create and add new menu items.
	    MenuItem clearFilter = menu.add(0, 1, Menu.NONE, R.string.clear_filter);
	    MenuItem conFilter = menu.add(0, 2, Menu.NONE, R.string.filter_con);
	    //MenuItem genFilter = menu.add(0, 3, Menu.NONE, R.string.filter_gen);
	    MenuItem lanFilter = menu.add(0, 4, Menu.NONE, R.string.filter_lan);
	      // Assign icons
	    clearFilter.setIcon(R.drawable.filter_clear_filter);
	    conFilter.setIcon(R.drawable.filter_filter);
	    //genFilter.setIcon(R.drawable.filter_filter);
	    lanFilter.setIcon(R.drawable.filter_filter);
	    
	    
	    

	    return true;
	  }
    }

And below there is log created by LogCat
 
04-11 10:55:07.393: DEBUG/AndroidRuntime(719): Shutting down VM

04-11 10:55:07.393: WARN/dalvikvm(719): threadid=1: thread exiting with uncaught exception (group=0x4001d800)

04-11 10:55:07.454: ERROR/AndroidRuntime(719): FATAL EXCEPTION: main

04-11 10:55:07.454: ERROR/AndroidRuntime(719): java.lang.NullPointerException

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at com.TVSpored.CurrentAdapter.getView(CurrentAdapter.java:52)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.AbsListView.obtainView(AbsListView.java:1315)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1198)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.ListView.onMeasure(ListView.java:1109)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:696)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:306)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.View.measure(View.java:8171)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewRoot.performTraversals(ViewRoot.java:801)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.os.Handler.dispatchMessage(Handler.java:99)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.os.Looper.loop(Looper.java:123)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at android.app.ActivityThread.main(ActivityThread.java:4627)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at java.lang.reflect.Method.invokeNative(Native Method)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at java.lang.reflect.Method.invoke(Method.java:521)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

04-11 10:55:07.454: ERROR/AndroidRuntime(719):     at dalvik.system.NativeStart.main(Native Method)

04-11 10:55:07.543: WARN/ActivityManager(69):   Force finishing activity com.TVSpored/.TVSpored

04-11 10:55:08.154: WARN/ActivityManager(69): Activity pause timeout for HistoryRecord{43f150a0 com.TVSpored/.TVSpored}`

