Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/ProxyConfigurationActivity.java

Issue 9433002: ABP/Android Proxy settings user helper (Closed)
Patch Set: Created Feb. 20, 2013, 8:49 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/android/ProxyConfigurationActivity.java
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/org/adblockplus/android/ProxyConfigurationActivity.java
@@ -0,0 +1,41 @@
+package org.adblockplus.android;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.text.Html;
+import android.text.method.LinkMovementMethod;
+import android.view.View;
+import android.widget.TextView;
+
+public class ProxyConfigurationActivity extends Activity
+{
+ @Override
+ public void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.proxyconfiguration);
+ int port = getIntent().getIntExtra("port", 0);
+
+ StringBuilder info = new StringBuilder();
+ AdblockPlus.appendRawTextFile(this, info, R.raw.proxysettings);
+ String msg = String.format(info.toString(), port);
+
+ TextView tv = (TextView) findViewById(R.id.message_text);
+ tv.setText(Html.fromHtml(msg));
+ tv.setMovementMethod(LinkMovementMethod.getInstance());
+
+ }
+
+ public void onGotit(View view)
+ {
+ finish();
+ }
+
+ public void onSettings(View view)
+ {
+ startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
+ finish();
+ }
+}
« res/layout/proxyconfiguration.xml ('K') | « src/org/adblockplus/android/Preferences.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld