mirror of
https://github.com/bspeice/itcs4180
synced 2024-11-12 10:28:13 -05:00
Minor formatting and code cleaning
This commit is contained in:
parent
f0c626dcaf
commit
467d7eb9a7
@ -8,12 +8,16 @@
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="@dimen/image_width"
|
||||
android:layout_height="@dimen/image_height"
|
||||
android:layout_gravity="center"
|
||||
android:padding="@dimen/image_padding"
|
||||
android:src="@drawable/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10" />
|
||||
android:ems="10"
|
||||
android:gravity="center"
|
||||
android:text="@string/download_error" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="image_padding">5dp</dimen>
|
||||
<dimen name="image_height">140dp</dimen>
|
||||
<dimen name="image_width">140dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="column_count">2</integer>
|
||||
<dimen name="image_width">140dp</dimen>
|
||||
<dimen name="image_height">140dp</dimen>
|
||||
</resources>
|
||||
|
@ -38,6 +38,7 @@ public class PhotoActivity extends Activity {
|
||||
};
|
||||
int[] imageNames = {R.string.uncc, R.string.sports, R.string.ifest, R.string.commencement};
|
||||
ArrayList<Bitmap> bitmapList = new ArrayList<Bitmap>();
|
||||
ArrayList<String> bitmapNames = new ArrayList<String>();
|
||||
int downloadProgress;
|
||||
|
||||
@Override
|
||||
@ -101,6 +102,7 @@ public class PhotoActivity extends Activity {
|
||||
{
|
||||
//already a default picture included in grid_schema.xml, so no need to set a blank pic
|
||||
bitmapList.add(result);
|
||||
bitmapNames.add(getString(imageNames[downloadProgress]));
|
||||
|
||||
downloadProgress++;
|
||||
if(downloadProgress>=imageUrlIds.length)
|
||||
@ -164,7 +166,7 @@ public class PhotoActivity extends Activity {
|
||||
if(bitmapList.get(position)!=null)
|
||||
{
|
||||
holder.imageView.setImageBitmap(bitmapList.get(position));
|
||||
holder.textView.setText(getString(imageNames[position]));
|
||||
holder.textView.setText(bitmapNames.get(position));
|
||||
}
|
||||
|
||||
return vi;
|
||||
|
Loading…
Reference in New Issue
Block a user