summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/ProgressCategory.java
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-06-17 13:56:13 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-06-17 14:20:09 -0700
commitab9d6985fa1e2478cc24244f50890af91d591288 (patch)
tree35d9d27e0276a0ac7665af16d978902d11883fed /src/com/android/settings/ProgressCategory.java
parentc9711beb3c6313c1ea0c39a5ab7d59af56ee78c7 (diff)
downloadpackages_apps_Settings-ab9d6985fa1e2478cc24244f50890af91d591288.zip
packages_apps_Settings-ab9d6985fa1e2478cc24244f50890af91d591288.tar.gz
packages_apps_Settings-ab9d6985fa1e2478cc24244f50890af91d591288.tar.bz2
Fix ProgressCategory theming and layout
- add missing constructors for correct theming - fix layout by adding missing paddingStart / paddingEnd Change-Id: I52a511d326b760a47339b2b9dad349c9f825dbd2
Diffstat (limited to 'src/com/android/settings/ProgressCategory.java')
-rw-r--r--src/com/android/settings/ProgressCategory.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/com/android/settings/ProgressCategory.java b/src/com/android/settings/ProgressCategory.java
index 6fe34bf..c85dd0b 100644
--- a/src/com/android/settings/ProgressCategory.java
+++ b/src/com/android/settings/ProgressCategory.java
@@ -21,17 +21,35 @@ import android.preference.Preference;
import android.util.AttributeSet;
import android.view.View;
+/**
+ * A category with a progress spinner
+ */
public class ProgressCategory extends ProgressCategoryBase {
- private final int mEmptyTextRes;
+ private int mEmptyTextRes;
private boolean mProgress = false;
private Preference mNoDeviceFoundPreference;
private boolean mNoDeviceFoundAdded;
+ public ProgressCategory(Context context) {
+ this(context, null);
+ }
+
+ public ProgressCategory(Context context, AttributeSet attrs) {
+ super(context, attrs, 0);
+ }
+
public ProgressCategory(Context context, AttributeSet attrs,
- int emptyTextRes) {
- super(context, attrs);
+ int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public ProgressCategory(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
setLayoutResource(R.layout.preference_progress_category);
+ }
+
+ public void setEmptyTextRes(int emptyTextRes) {
mEmptyTextRes = emptyTextRes;
}