1
0
mirror of https://github.com/bspeice/itcs4180 synced 2024-11-12 10:28:13 -05:00

Add the ImageViewer Activity

This commit is contained in:
DjBushido 2014-03-24 09:48:19 -04:00
parent d6b5f86f66
commit e4dd5249b2
5 changed files with 57 additions and 0 deletions

View File

@ -7,6 +7,7 @@
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<application
@ -27,6 +28,10 @@
android:name="com.example.hw4.GalleryActivity"
android:label="@string/title_activity_gallery" >
</activity>
<activity
android:name="com.example.hw4.ImageViewerActivity"
android:label="@string/title_activity_image_viewer" >
</activity>
</application>
</manifest>

View File

@ -7,6 +7,7 @@
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET" />
<application
@ -27,6 +28,10 @@
android:name="com.example.hw4.GalleryActivity"
android:label="@string/title_activity_gallery" >
</activity>
<activity
android:name="com.example.hw4.ImageViewerActivity"
android:label="@string/title_activity_image_viewer" >
</activity>
</application>
</manifest>

View File

@ -0,0 +1,16 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ImageViewerActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>

View File

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>

View File

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