summaryrefslogtreecommitdiffstats
path: root/packages/CaptivePortalLogin/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-02-19 15:09:39 -0800
committerSteve Kondik <steve@cyngn.com>2015-10-26 16:09:11 -0700
commit238cc14f7526356b1ae1916dd3962679211b8577 (patch)
tree584b2ee14041c2ce4f256423d4b62c139c12e9bc /packages/CaptivePortalLogin/src
parentdf9b55b5ae330020563a98d55a4ad55fee430958 (diff)
downloadframeworks_base-238cc14f7526356b1ae1916dd3962679211b8577.zip
frameworks_base-238cc14f7526356b1ae1916dd3962679211b8577.tar.gz
frameworks_base-238cc14f7526356b1ae1916dd3962679211b8577.tar.bz2
CaptivePortalLogin: Allow overriding of progress color
Change-Id: I6246b8b354c124dc672efb1f18492c133208660d
Diffstat (limited to 'packages/CaptivePortalLogin/src')
-rw-r--r--packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
index ba77891..ed95bff 100644
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
@@ -20,6 +20,7 @@ import android.app.Activity;
import android.app.LoadedApk;
import android.content.Context;
import android.content.Intent;
+import android.content.res.ColorStateList;
import android.graphics.Bitmap;
import android.net.CaptivePortal;
import android.graphics.drawable.ColorDrawable;
@@ -62,6 +63,7 @@ public class CaptivePortalLoginActivity extends Activity {
private static final String EXTRA_STATUS_BAR_COLOR = "status_bar_color";
private static final String EXTRA_ACTION_BAR_COLOR = "action_bar_color";
+ private static final String EXTRA_PROGRESS_COLOR = "progress_bar_color";
private static final int SOCKET_TIMEOUT_MS = 10000;
@@ -116,6 +118,14 @@ public class CaptivePortalLoginActivity extends Activity {
getActionBar().setDisplayShowHomeEnabled(false);
+ ProgressBar myProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
+ if (intent.hasExtra(EXTRA_PROGRESS_COLOR)) {
+ int color = intent.getIntExtra(EXTRA_PROGRESS_COLOR, -1);
+ if (color != -1) {
+ myProgressBar.setProgressTintList(ColorStateList.valueOf(color));
+ }
+ }
+
// Exit app if Network disappears.
final NetworkCapabilities networkCapabilities = mCm.getNetworkCapabilities(mNetwork);
if (networkCapabilities == null) {