diff --git a/AndroidManifest.xml b/AndroidManifest.xml index d01b58e4..f11a63ef 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -28,8 +28,9 @@ - - + + + diff --git a/res/layout/scrollingtext_buttons_view.xml b/res/layout/scrollingtext_buttons_view.xml new file mode 100644 index 00000000..623f59c2 --- /dev/null +++ b/res/layout/scrollingtext_buttons_view.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index bca3df91..2212f494 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -69,8 +69,6 @@ Application Error -Welcome to Orbot - About Orbot Next Back @@ -130,5 +128,15 @@ General Start Orbot on Boot Automatically start Orbot and connect Tor when your Android device boots - + + + Orbot + Orbot brings Tor to Android \nTor helps you defend against a form of network surveillance that threatens privacy, confidential business activity and relationships, and state security known as traffic analysis + + Warning + Simply installing Orbot will not automatically anonymize your mobile traffic.\nPlease follow the following steps to get started + + Permissions + + diff --git a/src/org/torproject/android/AboutActivity.java b/src/org/torproject/android/AboutActivity.java new file mode 100644 index 00000000..a03314bb --- /dev/null +++ b/src/org/torproject/android/AboutActivity.java @@ -0,0 +1,204 @@ +package org.torproject.android; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.DialogInterface.OnClickListener; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; + +public class AboutActivity extends Activity implements OnClickListener +{ + //WizardHelper wizard = null; + + private int title[] = { + R.string.wizard_title, + R.string.wizard_warning_title, + R.string.wizard_permissions_title + }; + + private int msg[] = { + R.string.wizard_title_msg, + R.string.wizard_warning_msg, + }; + + private String buttons[][] = + { + {null,"Next"}, + {"Back","Next"}, + {"Back","Next"}, + {"Back","Next"}, + + }; + + private View.OnClickListener listener[][] = + { + { + null, + new View.OnClickListener() { + + @Override + public void onClick(View v) { + + nextContent(); + + } + } + }, + + { + new View.OnClickListener() { + + @Override + public void onClick(View v) { + prevContent(); + + } + }, + new View.OnClickListener() { + + @Override + public void onClick(View v) { + + nextContent(); + + } + } + }, + + { + new View.OnClickListener() { + + @Override + public void onClick(View v) { + prevContent(); + + } + }, + new View.OnClickListener() { + + @Override + public void onClick(View v) { + + + //Intent intent = new Intent(getBaseContext(), AccountWizardActivity.class); + + + //startActivity(intent); + + } + } + }, + + + + }; + + + private int contentIdx = -1; + + protected void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + } + + @Override + protected void onStart() { + + super.onStart(); + + if (contentIdx == -1) + { + setContentView(R.layout.scrollingtext_buttons_view); + + nextContent (); + } + } + + private void prevContent () + { + contentIdx--; + showContent(contentIdx); + } + + private void nextContent () + { + contentIdx++; + showContent(contentIdx); + } + + private void showContent (int contentIdx) + { + TextView txtTitle = ((TextView)findViewById(R.id.WizardTextTitle)); + txtTitle.setText(getString(title[contentIdx])); + + TextView txtBody = ((TextView)findViewById(R.id.WizardTextBody)); + txtBody.setText(getString(msg[contentIdx])); + + Button btn1 = ((Button)findViewById(R.id.btnWizard1)); + + ImageView img = (ImageView) findViewById(R.id.gibber_image); + + if (buttons[contentIdx][0] != null) + { + btn1.setText(buttons[contentIdx][0]); + btn1.setOnClickListener(listener[contentIdx][0]); + btn1.setVisibility(Button.VISIBLE); + + } + else + { + btn1.setVisibility(Button.INVISIBLE); + } + + Button btn2 = ((Button)findViewById(R.id.btnWizard2)); + if (buttons[contentIdx][1] != null) + { + btn2.setText(buttons[contentIdx][1]); + btn2.setOnClickListener(listener[contentIdx][1]); + btn2.setVisibility(Button.VISIBLE); + + } + else + { + btn2.setVisibility(Button.INVISIBLE); + } + + if(contentIdx !=0) + { + img.setVisibility(ImageView.GONE); + } + else + { + img.setVisibility(ImageView.VISIBLE); + } + + } + + + + @Override + protected void onResume() { + super.onResume(); + + + } + + + + + @Override + public void onClick(DialogInterface arg0, int arg1) { + + + } + + + +} diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java index 4bc5695d..eb269606 100644 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@ -4,6 +4,8 @@ package org.torproject.android; + + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -454,7 +456,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants private void showHelp () { - new WizardHelper(this).showWizard(); + startActivityForResult(new Intent(getBaseContext(), AboutActivity.class), 1); } diff --git a/src/org/torproject/android/WizardActivity.java b/src/org/torproject/android/WizardActivity.java deleted file mode 100644 index 2a8bf33e..00000000 --- a/src/org/torproject/android/WizardActivity.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.torproject.android; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; - -public class WizardActivity extends Activity implements OnClickListener -{ - - protected void onCreate(Bundle savedInstanceState) - { - - this.setContentView(R.layout.layout_help); - - } - - - - @Override - protected void onStart() { - - super.onStart(); - - - } - - - - @Override - protected void onResume() { - super.onResume(); - - showStep1(); - } - - - - public void showStep1() - { - showDialog("Test","","foo","bar",this); - } - - private void showDialog (String title, String msg, String button1, String button2, OnClickListener ocListener) - { - - new AlertDialog.Builder(this) - .setInverseBackgroundForced(true) - .setTitle(title) - .setMessage(msg) - .setNeutralButton(button1, ocListener) - .setNegativeButton(button2, ocListener) - .show(); - - - } - - - - @Override - public void onClick(DialogInterface arg0, int arg1) { - - - } - - - -}