1
0
mirror of https://github.com/bspeice/itcs4180 synced 2024-12-04 13:18:16 -05:00

Minor cosmetic features.

This commit is contained in:
tokugawa 2014-04-20 23:37:16 -04:00
parent 553e8748fd
commit 6e2ad36f09
3 changed files with 9 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -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"

View File

@ -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