Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".Help" android:label="@string/app_name"></activity>
</application>

</manifest>
51 changes: 51 additions & 0 deletions assets/help_files/help1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"> <!--<![endif]-->
<head>

<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Your Page Title Here :)</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS
================================================== -->
<link rel="stylesheet" href="styles.css">
</head>

<body>
<h1>This is heading 1</h1>
<p>Some paragraph some paragraph Some paragraph some paragraph Some
paragraph some paragraph.</p>
<p><em>italicized text</em> and <strong>bold text</strong></p>
<p>A list</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<p>Another list</p>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<p>Some paragraph some paragraph Some paragraph some paragraph Some
paragraph some paragraph.</p>
<p>Some paragraph some paragraph Some paragraph some paragraph Some
paragraph some paragraph.</p>
</body>
</html>
31 changes: 31 additions & 0 deletions assets/help_files/help2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"> <!--<![endif]-->
<head>

<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Your Page Title Here :)</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS
================================================== -->
<link rel="stylesheet" href="styles.css">
</head>

<body>
Help 2
</body>
</html>
31 changes: 31 additions & 0 deletions assets/help_files/help3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"> <!--<![endif]-->
<head>

<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Your Page Title Here :)</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS
================================================== -->
<link rel="stylesheet" href="styles.css">
</head>

<body>
Help 3
</body>
</html>
31 changes: 31 additions & 0 deletions assets/help_files/help4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"> <!--<![endif]-->
<head>

<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Your Page Title Here :)</title>
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<!-- CSS
================================================== -->
<link rel="stylesheet" href="styles.css">
</head>

<body>
Help 4
</body>
</html>
4 changes: 4 additions & 0 deletions assets/help_files/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background-color: black;
color: white;
}
25 changes: 25 additions & 0 deletions res/layout/help.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Help"
android:textAppearance="?android:attr/textAppearanceLarge" />

<Spinner
android:id="@+id/spinnerTopicSelect"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/helpTopics" />

<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</LinearLayout>
4 changes: 4 additions & 0 deletions res/menu/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<item
android:id="@+id/About"
android:title="About"/>
<item
android:id="@+id/Help"
android:title="Help">
</item>
<item
android:id="@+id/Exit"
android:title="Exit"/>
Expand Down
17 changes: 15 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
<string name="hello">Hello World, CollageActivity!</string>
<string name="app_name">Collage</string>
<string name="splash">Welcome to the Collage App</string>
<string name="upload">Upload a Photo</string>
<string name="select">Select Your Photo(s)</string>
<string name="upload">Upload a Photo</string>
<string name="select">Select Your Photo(s)</string>

<string-array name="helpTopics">
<item>Upload Images</item>
<item>Something else</item>
<item>And another thing</item>
<item> Mostly harmless</item>
</string-array>

<string name="uploadHelp">file:///android_asset/help_files/help1.html</string>
<string name="help2">file:///android_asset/help_files/help2.html</string>
<string name="help3">file:///android_asset/help_files/help3.html</string>
<string name="help4">file:///android_asset/help_files/help4.html</string>

</resources>
113 changes: 59 additions & 54 deletions src/com/unitedware/collage/CollageActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,83 @@
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;

public class CollageActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
/** Called when the activity is first created. */

Button choosePictures, uploadPictures;
Intent aboutUs, photoSelection, startPhotoUpload;
Button choosePictures, uploadPictures;
Intent aboutUs, photoSelection, startPhotoUpload, help;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// Get everything setup for the layout
initialize();
}
// Get everything setup for the layout
initialize();
}

// Puts together the main XML items and the CollageActivity and other items
// needed
private void initialize() {
// Puts together the main XML items and the CollageActivity and other items
// needed
private void initialize() {

// Connects the Button declared above to the button created in xml then
// makes sure that it can do something when clicked
choosePictures = (Button) findViewById(R.id.bselectPhotos);
choosePictures.setOnClickListener(this);
// Connects the Button declared above to the button created in xml then
// makes sure that it can do something when clicked
choosePictures = (Button) findViewById(R.id.bselectPhotos);
choosePictures.setOnClickListener(this);

uploadPictures = (Button) findViewById(R.id.buploadPictures);
uploadPictures.setOnClickListener(this);
uploadPictures = (Button) findViewById(R.id.buploadPictures);
uploadPictures.setOnClickListener(this);

aboutUs = new Intent("com.unitedware.collage.ABOUT");
photoSelection = new Intent("com.unitedware.collage.CHOOSEPHOTO");
startPhotoUpload = new Intent("com.unitedware.collage.UPLOADPHOTO");
aboutUs = new Intent("com.unitedware.collage.ABOUT");
photoSelection = new Intent("com.unitedware.collage.CHOOSEPHOTO");
startPhotoUpload = new Intent("com.unitedware.collage.UPLOADPHOTO");
help = new Intent(this, Help.class);

}
}

public void onClick(View v) {
// TODO Auto-generated method stub
public void onClick(View v) {
// TODO Auto-generated method stub

switch (v.getId()) {
case R.id.bselectPhotos:
break;
switch (v.getId()) {
case R.id.bselectPhotos:
break;

case R.id.buploadPictures:
// Starts the photoUpload Activity
startActivity(startPhotoUpload);
break;
}
}
case R.id.buploadPictures:
// Starts the photoUpload Activity
startActivity(startPhotoUpload);
break;
}
}

// Creates a sub-menu inflation
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}
// Creates a sub-menu inflation
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu, menu);
return true;
}

// This contains the sub-menu items and what they do.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.About:
startActivity(aboutUs);
break;
case R.id.Exit:
finish();
break;
}
return true;
}
// This contains the sub-menu items and what they do.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.About:
startActivity(aboutUs);
break;
case R.id.Exit:
finish();
break;
case R.id.Help:
startActivity(help);
break;
}
return true;
}
}
Loading