1
0
mirror of https://github.com/bspeice/itcs4180 synced 2024-11-12 18:38:24 -05:00

Create the AsyncTask and Thread Photograph activities

This commit is contained in:
DjBushido 2014-02-28 20:04:17 -05:00
parent d31debf986
commit 53b7016846
9 changed files with 118 additions and 11 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.uncc.itcs4180.hw4"
android:versionCode="1"
@ -22,6 +22,14 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</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>
</manifest>

View File

@ -8,9 +8,23 @@
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
<Button
android:id="@+id/btnThread"
android:layout_width="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>

View 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>

View 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>

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,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

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">InClass3</string>
<string name="app_name">In Class 3</string>
<string name="action_settings">Settings</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="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="football_main_image">http://farm9.staticflickr.com/8441/7882624916_5f62cb318f_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="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="title_activity_photo">UNC Charlotte Photos</string>
<string name="title_activity_photo_thread">UNC Charlotte Photos</string>
</resources>

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

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