diff --git a/HW4/res/layout/activity_image_viewer.xml b/HW4/res/layout/activity_image_viewer.xml
index ff51088..e4a7da6 100644
--- a/HW4/res/layout/activity_image_viewer.xml
+++ b/HW4/res/layout/activity_image_viewer.xml
@@ -8,9 +8,44 @@
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ImageViewerActivity" >
-
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true" />
+
+
+
+
+
+
+
+
+
diff --git a/HW4/res/values/strings.xml b/HW4/res/values/strings.xml
index d9f1f71..1dbdf22 100644
--- a/HW4/res/values/strings.xml
+++ b/HW4/res/values/strings.xml
@@ -213,4 +213,10 @@
Hello world!
+ Previous
+
+ Back
+
+ Next
+
\ No newline at end of file
diff --git a/HW4/src/com/example/hw4/ImageViewerActivity.java b/HW4/src/com/example/hw4/ImageViewerActivity.java
index 427bc60..7131563 100644
--- a/HW4/src/com/example/hw4/ImageViewerActivity.java
+++ b/HW4/src/com/example/hw4/ImageViewerActivity.java
@@ -1,15 +1,27 @@
package com.example.hw4;
+import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
+import android.graphics.Bitmap;
import android.view.Menu;
+import android.view.View;
public class ImageViewerActivity extends Activity {
+
+ int urlsId;
+ String[] urls;
+ int currentIndex;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_image_viewer);
+
+ Bundle extras = getIntent().getExtras();
+ urlsId = extras.getInt("urls");
+ urls = getResources().getStringArray(urlsId);
+ currentIndex = extras.getInt("index");
}
@Override
@@ -18,5 +30,35 @@ public class ImageViewerActivity extends Activity {
getMenuInflater().inflate(R.menu.image_viewer, menu);
return true;
}
+
+ public void onClickPrev(View v) {
+
+ }
+
+ public void onClickNext(View v) {
+
+ }
+
+ public void onClickBack(View v) {
+ finish();
+ }
+
+ public void displayImage(int indexToDisplay) {
+
+
+ }
+
+ private class ImageDownloader extends AsyncTask {
+ @Override
+ protected Bitmap doInBackground(String... params) {
+ return null;
+ }
+
+ @Override
+ protected void onPostExecute(Bitmap result) {
+ // TODO Auto-generated method stub
+ super.onPostExecute(result);
+ }
+ }
}