mirror of
https://github.com/bspeice/itcs4180
synced 2025-04-20 23:01:34 -04:00
Create the AsyncTask and Thread Photograph activities
This commit is contained in:
parent
d31debf986
commit
53b7016846
@ -22,6 +22,14 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="edu.uncc.itcs4180.hw4.PhotoActivity"
|
||||||
|
android:label="@string/title_activity_photo" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="edu.uncc.itcs4180.hw4.PhotoThread"
|
||||||
|
android:label="@string/title_activity_photo_thread" >
|
||||||
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -8,9 +8,23 @@
|
|||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
tools:context=".MainActivity" >
|
tools:context=".MainActivity" >
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
|
android:id="@+id/btnThread"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/hello_world" />
|
android:layout_alignLeft="@+id/btnAsync"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignRight="@+id/btnAsync"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:text="Generate Image Thread" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnAsync"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/btnThread"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:text="Generate Image AsyncTask" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
11
InClass3/res/layout/activity_photo.xml
Normal file
11
InClass3/res/layout/activity_photo.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<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=".PhotoActivity" >
|
||||||
|
|
||||||
|
</RelativeLayout>
|
11
InClass3/res/layout/activity_photo_thread.xml
Normal file
11
InClass3/res/layout/activity_photo_thread.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<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=".PhotoThread" >
|
||||||
|
|
||||||
|
</RelativeLayout>
|
9
InClass3/res/menu/photo.xml
Normal file
9
InClass3/res/menu/photo.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>
|
9
InClass3/res/menu/photo_thread.xml
Normal file
9
InClass3/res/menu/photo_thread.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>
|
@ -4,10 +4,11 @@
|
|||||||
<string name="app_name">In Class 3</string>
|
<string name="app_name">In Class 3</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
<string name="hello_world">Hello world!</string>
|
<string name="hello_world">Hello world!</string>
|
||||||
|
|
||||||
<string name="ifest_main_image">http://farm9.staticflickr.com/8083/8415182658_5402d77eeb_z.jpg</string>
|
<string name="ifest_main_image">http://farm9.staticflickr.com/8083/8415182658_5402d77eeb_z.jpg</string>
|
||||||
<string name="commencement_main_image">http://farm9.staticflickr.com/8218/8278724118_9a28024cf5_z.jpg</string>
|
<string name="commencement_main_image">http://farm9.staticflickr.com/8218/8278724118_9a28024cf5_z.jpg</string>
|
||||||
<string name="uncc_main_image">http://farm9.staticflickr.com/8196/8114421135_7c5cbb874b_z.jpg</string>
|
<string name="uncc_main_image">http://farm9.staticflickr.com/8196/8114421135_7c5cbb874b_z.jpg</string>
|
||||||
<string name="football_main_image">http://farm9.staticflickr.com/8441/7882624916_5f62cb318f_z.jpg</string>
|
<string name="football_main_image">http://farm9.staticflickr.com/8441/7882624916_5f62cb318f_z.jpg</string>
|
||||||
|
<string name="title_activity_photo">UNC Charlotte Photos</string>
|
||||||
|
<string name="title_activity_photo_thread">UNC Charlotte Photos</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
22
InClass3/src/edu/uncc/itcs4180/hw4/PhotoActivity.java
Normal file
22
InClass3/src/edu/uncc/itcs4180/hw4/PhotoActivity.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package edu.uncc.itcs4180.hw4;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.view.Menu;
|
||||||
|
|
||||||
|
public class PhotoActivity extends Activity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_photo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
getMenuInflater().inflate(R.menu.photo, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
22
InClass3/src/edu/uncc/itcs4180/hw4/PhotoThread.java
Normal file
22
InClass3/src/edu/uncc/itcs4180/hw4/PhotoThread.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package edu.uncc.itcs4180.hw4;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.view.Menu;
|
||||||
|
|
||||||
|
public class PhotoThread extends Activity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_photo_thread);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
|
getMenuInflater().inflate(R.menu.photo_thread, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user