package com.android.settings;
import android.content.Context;
-import android.preference.PreferenceCategory;
import android.util.AttributeSet;
import android.view.View;
-import java.util.Map;
-
-public class ProgressCategory extends PreferenceCategory {
+public class ProgressCategory extends ProgressCategoryBase {
private boolean mProgress = false;
private View oldView = null;
@Override
public void onBindView(View view) {
super.onBindView(view);
- View textView = view.findViewById(R.id.scanning_text);
- View progressBar = view.findViewById(R.id.scanning_progress);
+ final View textView = view.findViewById(R.id.scanning_text);
+ final View progressBar = view.findViewById(R.id.scanning_progress);
- int visibility = mProgress ? View.VISIBLE : View.INVISIBLE;
+ final int visibility = mProgress ? View.VISIBLE : View.INVISIBLE;
textView.setVisibility(visibility);
progressBar.setVisibility(visibility);
}
oldView = view;
}
-
- /**
- * Turn on/off the progress indicator and text on the right.
- * @param progressOn whether or not the progress should be displayed
- */
+
+ @Override
public void setProgress(boolean progressOn) {
mProgress = progressOn;
notifyChanged();