mirror of
https://github.com/bspeice/itcs4180
synced 2024-11-08 16:38:14 -05:00
Minor cosmetic features.
This commit is contained in:
parent
553e8748fd
commit
6e2ad36f09
BIN
UNCCScavenger/res/drawable-hdpi/map.png
Normal file
BIN
UNCCScavenger/res/drawable-hdpi/map.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -23,6 +23,13 @@
|
||||
android:text="@string/default_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/foundImageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/map" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/seeMoreButton"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -45,36 +45,13 @@ public class MainActivity extends Activity {
|
||||
location.setLocationLong(-80.733734);
|
||||
location.setLocationLat(35.310043);
|
||||
location.setKey("Key");
|
||||
location.setLocationImageUrl("");
|
||||
location.setRiddleImageURL("http://rmss.uncc.edu/sites/rmss.uncc.edu/files/media/Belk%20Tower.jpg");
|
||||
Intent intent = new Intent(getApplicationContext(), SearchActivity.class);
|
||||
intent.putExtra("restLocation", location);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
/*End Test Code*/
|
||||
|
||||
// Get our list of events loaded
|
||||
locationList = (ListView)findViewById(R.id.listLocations);
|
||||
locations = LocationDatabaseHelper.getInstance(this).fetchAll();
|
||||
if (locations != null && locations.size() > 0) {
|
||||
LocationAdapter mLocationAdapter = new LocationAdapter(locations);
|
||||
locationList.setAdapter(mLocationAdapter);
|
||||
locationList.setOnItemClickListener(new OnItemClickListener(){
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view,
|
||||
int position, long id) {
|
||||
Intent intent = new Intent(getApplicationContext(), SearchActivity.class);
|
||||
intent.putExtra("restLocation", locations.get(position));
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// We don't yet have any locations...
|
||||
((TextView)findViewById(R.id.txtNoLocations)).setVisibility(View.VISIBLE);
|
||||
((ListView)findViewById(R.id.listLocations)).setVisibility(View.GONE);
|
||||
Log.d("NoLocation", "NoLocations");
|
||||
}
|
||||
|
||||
// And kick off contacting to server to see if there are any new ones
|
||||
new LocationClient.LocationsDownloader(this) {
|
||||
@Override
|
||||
@ -94,7 +71,7 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
}.execute();
|
||||
|
||||
Toast.makeText(getApplicationContext(), ""+locations.get(0).getRiddleImageURL(), Toast.LENGTH_SHORT).show();
|
||||
//Toast.makeText(getApplicationContext(), ""+locations.get(0).getRiddleImageURL(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user