Skip to content

Commit

Permalink
finally done :)
Browse files Browse the repository at this point in the history
  • Loading branch information
MimozaLl committed Oct 5, 2012
1 parent 8d7c0f9 commit f161b37
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
Binary file not shown.
Binary file not shown.
Expand Up @@ -87,7 +87,7 @@ public List<HashMap<String, String>> getJSONfromURL(String url) {
DrawableManager dm = new DrawableManager();
Drawable pic = null;
pic = dm.fetchDrawable(imagelink);
// image.setImageDrawable(pic);

Drawable [] draw =new Drawable[200];
draw[j]=pic;
}
Expand Down
27 changes: 11 additions & 16 deletions FoursquareAssig/src/com/example/foursquareassig/Main.java
Expand Up @@ -64,15 +64,15 @@ public void onCreate(Bundle savedInstanceState) {
FillSpinner(R.id.spinner1, R.array.search);
FillSpinner(R.id.Spinner2, R.array.distance);
final ListView listView = (ListView) findViewById(R.id.listview);
lm=(LocationManager)getSystemService(Context.LOCATION_SERVICE);
Criteria c =new Criteria();
towers =lm.getBestProvider(c, false);
Location location=lm.getLastKnownLocation(towers);
lat = location.getLatitude();
lon = location.getLongitude();
slat = Double.toString(lat);
slon = Double.toString(lon);

lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria c = new Criteria();
towers = lm.getBestProvider(c, false);
Location location = lm.getLastKnownLocation(towers);
lat = location.getLatitude();
lon = location.getLongitude();
slat = Double.toString(lat);
slon = Double.toString(lon);

// int radius = 500; //Convert to String
// String categoryId = "4d4b7105d754a06374d81259";
Expand Down Expand Up @@ -103,7 +103,6 @@ public void onItemClick(AdapterView<?> arg0, View view,

Intent i = new Intent(getApplicationContext(), ShowMap.class);


i.putExtra("position", p);
i.putExtra("url", urlString);

Expand Down Expand Up @@ -140,8 +139,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
case 3:
categoryId = CategoryId[3];
break;
// shemsia e ka ndryshu kete pjese
case 4:
default:
Toast.makeText(this, R.string.novenue, Toast.LENGTH_LONG)
.show();
break;
Expand All @@ -164,8 +162,6 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// Setting the adapter to the listView
listView.setAdapter(adapter);

// lv.setAdapter(new
// ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,results));
}

super.onActivityResult(requestCode, resultCode, data);
Expand All @@ -190,8 +186,7 @@ public void Search(View v) {
if (Search[3].equals(category)) {
categoryId = CategoryId[3];

} else// shemsia apet
{
} else {
Toast.makeText(this, R.string.novenue, Toast.LENGTH_LONG)
.show();
}
Expand Down

0 comments on commit f161b37

Please sign in to comment.