Improve Search results highlighting
- remove unnecessary code - use keyed Tag with a well known App key for preventing collisions - fix missing Brightness Level preference key (used for highlight) Change-Id: I070e3b8c3cb43da7addd34be192aade21951f57c
This commit is contained in:
@@ -360,7 +360,8 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
|
||||
mDataEnabled = new Switch(inflater.getContext());
|
||||
mDataEnabledView = inflatePreference(inflater, mNetworkSwitches, mDataEnabled);
|
||||
mDataEnabledView.setTag(DATA_USAGE_ENABLE_MOBILE_KEY);
|
||||
mDataEnabledView.setTag(R.id.preference_highlight_key,
|
||||
DATA_USAGE_ENABLE_MOBILE_KEY);
|
||||
mDataEnabled.setOnCheckedChangeListener(mDataEnabledListener);
|
||||
mNetworkSwitches.addView(mDataEnabledView);
|
||||
|
||||
@@ -368,7 +369,8 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
mDisableAtLimit.setClickable(false);
|
||||
mDisableAtLimit.setFocusable(false);
|
||||
mDisableAtLimitView = inflatePreference(inflater, mNetworkSwitches, mDisableAtLimit);
|
||||
mDisableAtLimitView.setTag(DATA_USAGE_DISABLE_MOBILE_LIMIT_KEY);
|
||||
mDisableAtLimitView.setTag(R.id.preference_highlight_key,
|
||||
DATA_USAGE_DISABLE_MOBILE_LIMIT_KEY);
|
||||
mDisableAtLimitView.setClickable(true);
|
||||
mDisableAtLimitView.setFocusable(true);
|
||||
mDisableAtLimitView.setOnClickListener(mDisableAtLimitListener);
|
||||
@@ -377,7 +379,7 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
|
||||
// bind cycle dropdown
|
||||
mCycleView = mHeader.findViewById(R.id.cycles);
|
||||
mCycleView.setTag(DATA_USAGE_CYCLE_KEY);
|
||||
mCycleView.setTag(R.id.preference_highlight_key, DATA_USAGE_CYCLE_KEY);
|
||||
mCycleSpinner = (Spinner) mCycleView.findViewById(R.id.cycles_spinner);
|
||||
mCycleAdapter = new CycleAdapter(context);
|
||||
mCycleSpinner.setAdapter(mCycleAdapter);
|
||||
|
Reference in New Issue
Block a user