package com.galee;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Adapter;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import com.parse.ParseUser;
import com.galee.model.Gali;
import com.galee.provider.FakeGaliProvider;
import com.galee.provider.GaliProvider;
import com.galee.ui.GaliListAdapter;
import com.gukha.R;

/**
 * Shows the list of Galis. Make this a fragment and move to a tab/pager design.
 */
public class GaliListActivity extends Activity {

	@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.gali_list);
    ListView lv = (ListView) findViewById(R.id.listView);
    GaliProvider galiProvider = new FakeGaliProvider();
    ListAdapter simpleAdpt = new GaliListAdapter(
    		this,
    		galiProvider.getGalis()
    );
    lv.setAdapter(simpleAdpt);
  }

  @Override
  protected void onStart() {
    super.onStart();
  }
}

@@ -261,16 +261,41 @@
 Bundle;%0A
+import android.util.Log;%0A
 import a
@@ -308,24 +308,24 @@
 .view.View;%0A
-
 import andro
@@ -558,16 +558,139 @@
 tView;%0A%0A
+import com.parse.FindCallback;%0Aimport com.parse.ParseException;%0Aimport com.parse.ParseObject;%0Aimport com.parse.ParseQuery;%0A
 import c
@@ -1378,16 +1378,16 @@
 %0A    );%0A
-
     lv.s
@@ -1409,16 +1409,475 @@
 eAdpt);%0A
+    %0A    ParseQuery%3CParseObject%3E query = ParseQuery.getQuery(%22Galee%22);%0A    query.findInBackground(new FindCallback%3CParseObject%3E() %7B%0A      public void done(List%3CParseObject%3E scoreList, ParseException e) %7B%0A        if (e == null) %7B%0A        %09Log.d(%22score%22, %22Retrieved %22 + scoreList.size() + %22 scores%22);%0A        %09// Access the name by calling galee.GetString(%22name%22);%0A        %7D else %7B%0A        %09Log.d(%22score%22, %22Error: %22 + e.getMessage());%0A        %7D%0A      %7D%0A    %7D);%0A
   %7D%0A%0A  @

Read remote parse objects