diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ea35dad..4f48919 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -60,6 +60,7 @@ + \ No newline at end of file diff --git a/assets/help_files/help1.html b/assets/help_files/help1.html new file mode 100644 index 0000000..74e3d49 --- /dev/null +++ b/assets/help_files/help1.html @@ -0,0 +1,51 @@ + + + + + + + + + + +Your Page Title Here :) + + + + + + + + + + + + +

This is heading 1

+

Some paragraph some paragraph Some paragraph some paragraph Some + paragraph some paragraph.

+

italicized text and bold text

+

A list

+ +

Another list

+
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
+

Some paragraph some paragraph Some paragraph some paragraph Some + paragraph some paragraph.

+

Some paragraph some paragraph Some paragraph some paragraph Some + paragraph some paragraph.

+ + diff --git a/assets/help_files/help2.html b/assets/help_files/help2.html new file mode 100644 index 0000000..1b718c7 --- /dev/null +++ b/assets/help_files/help2.html @@ -0,0 +1,31 @@ + + + + + + + + + + +Your Page Title Here :) + + + + + + + + + + + + +Help 2 + + diff --git a/assets/help_files/help3.html b/assets/help_files/help3.html new file mode 100644 index 0000000..1310c0b --- /dev/null +++ b/assets/help_files/help3.html @@ -0,0 +1,31 @@ + + + + + + + + + + +Your Page Title Here :) + + + + + + + + + + + + +Help 3 + + diff --git a/assets/help_files/help4.html b/assets/help_files/help4.html new file mode 100644 index 0000000..d85764b --- /dev/null +++ b/assets/help_files/help4.html @@ -0,0 +1,31 @@ + + + + + + + + + + +Your Page Title Here :) + + + + + + + + + + + + +Help 4 + + diff --git a/assets/help_files/styles.css b/assets/help_files/styles.css new file mode 100644 index 0000000..d779fce --- /dev/null +++ b/assets/help_files/styles.css @@ -0,0 +1,4 @@ +body { + background-color: black; + color: white; +} diff --git a/res/layout/help.xml b/res/layout/help.xml new file mode 100644 index 0000000..4b20398 --- /dev/null +++ b/res/layout/help.xml @@ -0,0 +1,25 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/menu/menu.xml b/res/menu/menu.xml index 74be19f..68aedc1 100644 --- a/res/menu/menu.xml +++ b/res/menu/menu.xml @@ -4,6 +4,10 @@ + + diff --git a/res/values/strings.xml b/res/values/strings.xml index e2f94c5..e4ced2b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4,6 +4,19 @@ Hello World, CollageActivity! Collage Welcome to the Collage App - Upload a Photo - Select Your Photo(s) + Upload a Photo + Select Your Photo(s) + + + Upload Images + Something else + And another thing + Mostly harmless + + + file:///android_asset/help_files/help1.html + file:///android_asset/help_files/help2.html + file:///android_asset/help_files/help3.html + file:///android_asset/help_files/help4.html + \ No newline at end of file diff --git a/src/com/unitedware/collage/CollageActivity.java b/src/com/unitedware/collage/CollageActivity.java index 3d1e2cf..5c65a44 100644 --- a/src/com/unitedware/collage/CollageActivity.java +++ b/src/com/unitedware/collage/CollageActivity.java @@ -4,6 +4,7 @@ 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; @@ -11,71 +12,75 @@ 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; + } } diff --git a/src/com/unitedware/collage/Help.java b/src/com/unitedware/collage/Help.java new file mode 100644 index 0000000..6aa8604 --- /dev/null +++ b/src/com/unitedware/collage/Help.java @@ -0,0 +1,50 @@ +package com.unitedware.collage; + +import android.app.Activity; +import android.os.Bundle; +import android.view.View; +import android.webkit.WebView; +import android.widget.AdapterView; +import android.widget.Spinner; + +public class Help extends Activity { + + /** Called when the activity is first created. */ + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // TODO Auto-generated method stub + setContentView(R.layout.help); + + final WebView browser = (WebView) findViewById(R.id.webView); + browser.getSettings().setJavaScriptEnabled(true); + + Spinner topicSelector = (Spinner) findViewById(R.id.spinnerTopicSelect); + + topicSelector + .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + public void onItemSelected(AdapterView parent, + View view, int pos, long id) { + switch (pos) { + case 0: + browser.loadUrl(getString(R.string.uploadHelp)); + break; + case 1: + browser.loadUrl(getString(R.string.help2)); + break; + case 2: + browser.loadUrl(getString(R.string.help3)); + break; + case 3: + browser.loadUrl(getString(R.string.help4)); + break; + } + } + + public void onNothingSelected(AdapterView parent) { + } + }); + } + +}