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:
parent
d6b5f86f66
commit
e4dd5249b2
@ -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>
|
||||
|
@ -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>
|
||||
|
16
HW4/res/layout/activity_image_viewer.xml
Normal file
16
HW4/res/layout/activity_image_viewer.xml
Normal 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>
|
9
HW4/res/menu/image_viewer.xml
Normal file
9
HW4/res/menu/image_viewer.xml
Normal 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>
|
22
HW4/src/com/example/hw4/ImageViewerActivity.java
Normal file
22
HW4/src/com/example/hw4/ImageViewerActivity.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user