OLD | NEW |
(Empty) | |
| 1 package org.adblockplus.android; |
| 2 |
| 3 import android.app.Activity; |
| 4 import android.content.Intent; |
| 5 import android.os.Bundle; |
| 6 import android.provider.Settings; |
| 7 import android.text.Html; |
| 8 import android.text.method.LinkMovementMethod; |
| 9 import android.view.View; |
| 10 import android.widget.TextView; |
| 11 |
| 12 public class ProxyConfigurationActivity extends Activity |
| 13 { |
| 14 @Override |
| 15 public void onCreate(Bundle savedInstanceState) |
| 16 { |
| 17 super.onCreate(savedInstanceState); |
| 18 setContentView(R.layout.proxyconfiguration); |
| 19 int port = getIntent().getIntExtra("port", 0); |
| 20 |
| 21 StringBuilder info = new StringBuilder(); |
| 22 AdblockPlus.appendRawTextFile(this, info, R.raw.proxysettings); |
| 23 String msg = String.format(info.toString(), port); |
| 24 |
| 25 TextView tv = (TextView) findViewById(R.id.message_text); |
| 26 tv.setText(Html.fromHtml(msg)); |
| 27 tv.setMovementMethod(LinkMovementMethod.getInstance()); |
| 28 |
| 29 } |
| 30 |
| 31 public void onGotit(View view) |
| 32 { |
| 33 finish(); |
| 34 } |
| 35 |
| 36 public void onSettings(View view) |
| 37 { |
| 38 startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)); |
| 39 finish(); |
| 40 } |
| 41 } |
OLD | NEW |