diff --git a/assets/info.txt b/assets/info.txt new file mode 100644 index 0000000..f143dd2 --- /dev/null +++ b/assets/info.txt @@ -0,0 +1,8 @@ +

Google Dorks

+Version 0.5
+Copyright 2014
+http://cmbaughman.com

+ + + + diff --git a/assets/legal.txt b/assets/legal.txt new file mode 100644 index 0000000..5432e14 --- /dev/null +++ b/assets/legal.txt @@ -0,0 +1,4 @@ +All rights reserved. Not liable for any damage incurred from +use of this software including but not limited to: monetary loss, +temporary paralysis, halitosis, spontaneous combustion, +road rash, and or premature hair loss. \ No newline at end of file diff --git a/res/drawable-hdpi/cube.png b/res/drawable-hdpi/cube.png new file mode 100644 index 0000000..f85afaf Binary files /dev/null and b/res/drawable-hdpi/cube.png differ diff --git a/res/drawable-hdpi/ic_action_about.png b/res/drawable-hdpi/ic_action_about.png new file mode 100644 index 0000000..b1f1406 Binary files /dev/null and b/res/drawable-hdpi/ic_action_about.png differ diff --git a/res/drawable-hdpi/ic_action_help.png b/res/drawable-hdpi/ic_action_help.png new file mode 100644 index 0000000..4b4f415 Binary files /dev/null and b/res/drawable-hdpi/ic_action_help.png differ diff --git a/res/drawable-mdpi/ic_action_about.png b/res/drawable-mdpi/ic_action_about.png new file mode 100644 index 0000000..ae2acd5 Binary files /dev/null and b/res/drawable-mdpi/ic_action_about.png differ diff --git a/res/drawable-mdpi/ic_action_help.png b/res/drawable-mdpi/ic_action_help.png new file mode 100644 index 0000000..2986466 Binary files /dev/null and b/res/drawable-mdpi/ic_action_help.png differ diff --git a/res/drawable-xhdpi/ic_action_about.png b/res/drawable-xhdpi/ic_action_about.png new file mode 100644 index 0000000..4536a8d Binary files /dev/null and b/res/drawable-xhdpi/ic_action_about.png differ diff --git a/res/drawable-xhdpi/ic_action_help.png b/res/drawable-xhdpi/ic_action_help.png new file mode 100644 index 0000000..9d88d41 Binary files /dev/null and b/res/drawable-xhdpi/ic_action_help.png differ diff --git a/res/drawable-xxhdpi/ic_action_about.png b/res/drawable-xxhdpi/ic_action_about.png new file mode 100644 index 0000000..f3db088 Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_about.png differ diff --git a/res/drawable-xxhdpi/ic_action_help.png b/res/drawable-xxhdpi/ic_action_help.png new file mode 100644 index 0000000..040c7e1 Binary files /dev/null and b/res/drawable-xxhdpi/ic_action_help.png differ diff --git a/res/drawable/cube.png b/res/drawable/cube.png new file mode 100644 index 0000000..f85afaf Binary files /dev/null and b/res/drawable/cube.png differ diff --git a/res/layout/about.xml b/res/layout/about.xml new file mode 100644 index 0000000..04269d7 --- /dev/null +++ b/res/layout/about.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/res/menu/menu.xml b/res/menu/menu.xml index 8cf97e8..d4a1766 100644 --- a/res/menu/menu.xml +++ b/res/menu/menu.xml @@ -7,17 +7,15 @@ android:title="@string/action_refresh" android:showAsAction="ifRoom" /> + + + - - - - - diff --git a/res/raw/info.txt b/res/raw/info.txt new file mode 100644 index 0000000..c2f2382 --- /dev/null +++ b/res/raw/info.txt @@ -0,0 +1,8 @@ +

Google Dorks

+Version 0.5
+Copyright 2014
+http://cmbaughman.com

+ + + + diff --git a/res/raw/legal.txt b/res/raw/legal.txt new file mode 100644 index 0000000..5432e14 --- /dev/null +++ b/res/raw/legal.txt @@ -0,0 +1,4 @@ +All rights reserved. Not liable for any damage incurred from +use of this software including but not limited to: monetary loss, +temporary paralysis, halitosis, spontaneous combustion, +road rash, and or premature hair loss. \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index c71fe31..d02c178 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -14,6 +14,9 @@ Online Shopping Info Search - Location + Help Refresh + About + Share + diff --git a/src/com/cmb/googledorks/MainActivity.java b/src/com/cmb/googledorks/MainActivity.java index 4b0a98d..3cc386e 100644 --- a/src/com/cmb/googledorks/MainActivity.java +++ b/src/com/cmb/googledorks/MainActivity.java @@ -16,6 +16,8 @@ public class MainActivity extends Activity Spinner catSpin; ListView listV; final GetGoogleDorks dorks = new GetGoogleDorks(); + final public int ABOUT = 0; + ArrayAdapter adapter; List list= null; @@ -106,14 +108,16 @@ public class MainActivity extends Activity public boolean onOptionsItemSelected(MenuItem item) { // Take appropriate action for each action item click switch (item.getItemId()) { - case R.id.action_search: + case R.id.action_refresh: // search action return true; - case R.id.action_location_found: + case R.id.action_help: // location found - LocationFound(); + ShowHelp sh = new ShowHelp(this); + sh.setTitle("About Google Dorks by CMB"); + sh.show(); return true; - case R.id.action_refresh: + case R.id.action_share: // refresh return true; default: @@ -124,8 +128,8 @@ public class MainActivity extends Activity /** * Launching new activity * */ - private void LocationFound() { - Intent i = new Intent(MainActivity.this, LocationFound.class); + private void ShowShare() { + Intent i = new Intent(MainActivity.this, ShowHelp.class); startActivity(i); } } diff --git a/src/com/cmb/googledorks/ShowHelp.java b/src/com/cmb/googledorks/ShowHelp.java new file mode 100644 index 0000000..4fd0b0c --- /dev/null +++ b/src/com/cmb/googledorks/ShowHelp.java @@ -0,0 +1,57 @@ +package com.cmb.googledorks; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import android.app.Dialog; +import android.content.Context; +import android.os.Bundle; +import android.text.Html; +import android.text.util.Linkify; +import android.graphics.Color; +import android.widget.TextView; +import android.content.res.*; + +public class ShowHelp extends Dialog +{ + private static Context mContext= null; + + public ShowHelp(Context ctx) { + super(ctx); + mContext = ctx; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + setContentView(R.layout.about); + TextView tv = (TextView)findViewById(R.id.legal_text); + tv.setText(readRawTextFile(R.raw.legal)); + tv = (TextView)findViewById(R.id.info_text); + tv.setText(Html.fromHtml(readRawTextFile(R.raw.info))); + tv.setLinkTextColor(Color.WHITE); + Linkify.addLinks(tv, Linkify.ALL); + + + } + + public static String readRawTextFile(int id) { + InputStream inputStream = mContext.getResources().openRawResource(id); + + + InputStreamReader in = new InputStreamReader(inputStream); + BufferedReader buf = new BufferedReader(in); + String line; + + + StringBuilder text = new StringBuilder(); + try { + while (( line = buf.readLine()) != null) text.append(line); + } catch (IOException e) { + return null; + } + + + return text.toString(); + } +}