From e4dd5249b2b3abb17594e43362bcd2418b4b2d4c Mon Sep 17 00:00:00 2001 From: DjBushido Date: Mon, 24 Mar 2014 09:48:19 -0400 Subject: [PATCH] Add the ImageViewer Activity --- HW4/AndroidManifest.xml | 5 +++++ HW4/bin/AndroidManifest.xml | 5 +++++ HW4/res/layout/activity_image_viewer.xml | 16 ++++++++++++++ HW4/res/menu/image_viewer.xml | 9 ++++++++ .../com/example/hw4/ImageViewerActivity.java | 22 +++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 HW4/res/layout/activity_image_viewer.xml create mode 100644 HW4/res/menu/image_viewer.xml create mode 100644 HW4/src/com/example/hw4/ImageViewerActivity.java diff --git a/HW4/AndroidManifest.xml b/HW4/AndroidManifest.xml index 209462f..a7285bb 100644 --- a/HW4/AndroidManifest.xml +++ b/HW4/AndroidManifest.xml @@ -7,6 +7,7 @@ + + + diff --git a/HW4/bin/AndroidManifest.xml b/HW4/bin/AndroidManifest.xml index 209462f..a7285bb 100644 --- a/HW4/bin/AndroidManifest.xml +++ b/HW4/bin/AndroidManifest.xml @@ -7,6 +7,7 @@ + + + diff --git a/HW4/res/layout/activity_image_viewer.xml b/HW4/res/layout/activity_image_viewer.xml new file mode 100644 index 0000000..ff51088 --- /dev/null +++ b/HW4/res/layout/activity_image_viewer.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/HW4/res/menu/image_viewer.xml b/HW4/res/menu/image_viewer.xml new file mode 100644 index 0000000..d122a4b --- /dev/null +++ b/HW4/res/menu/image_viewer.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/HW4/src/com/example/hw4/ImageViewerActivity.java b/HW4/src/com/example/hw4/ImageViewerActivity.java new file mode 100644 index 0000000..427bc60 --- /dev/null +++ b/HW4/src/com/example/hw4/ImageViewerActivity.java @@ -0,0 +1,22 @@ +package com.example.hw4; + +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; + +public class ImageViewerActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_image_viewer); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.image_viewer, menu); + return true; + } + +}