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

Unified Diff: src/org/adblockplus/android/Preferences.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/Preferences.java
===================================================================
--- a/src/org/adblockplus/android/Preferences.java
+++ b/src/org/adblockplus/android/Preferences.java
@@ -44,9 +44,11 @@
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.PreferenceManager;
+import android.text.Html;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.TextView;
import com.actionbarsherlock.view.Menu;
@@ -331,6 +333,11 @@
}
}
+ public void showProxySettings(View v)
+ {
+ this.startActivity(new Intent(this, ProxyConfigurationActivity.class).putExtra("port", proxyService.port));
+ }
+
@Override
protected Dialog onCreateDialog(int id)
{
@@ -388,15 +395,18 @@
private void showConfigurationMsg(String message)
{
+ ViewGroup grp = (ViewGroup) findViewById(R.id.grp_configuration);
TextView msg = (TextView) findViewById(R.id.txt_configuration);
- msg.setText(message);
- msg.setVisibility(View.VISIBLE);
+ msg.setText(Html.fromHtml(message));
+ View btn = findViewById(R.id.btn_configuration);
+ btn.setVisibility(ProxyService.hasNativeProxy ? View.VISIBLE : View.GONE);
+ grp.setVisibility(View.VISIBLE);
}
private void hideConfigurationMsg()
{
- TextView msg = (TextView) findViewById(R.id.txt_configuration);
- msg.setVisibility(View.GONE);
+ ViewGroup grp = (ViewGroup) findViewById(R.id.grp_configuration);
+ grp.setVisibility(View.GONE);
}
private BroadcastReceiver receiver = new BroadcastReceiver()

Powered by Google App Engine
This is Rietveld