use of com.android.settings.datausage.WifiDataUsageSummaryPreferenceController in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class WifiDetailPreferenceController method setupEntityHeader.
private void setupEntityHeader(PreferenceScreen screen) {
LayoutPreference headerPref = screen.findPreference(KEY_HEADER);
if (usingDataUsageHeader(mContext)) {
headerPref.setVisible(false);
mDataUsageSummaryPref = screen.findPreference(KEY_DATA_USAGE_HEADER);
mDataUsageSummaryPref.setVisible(true);
mSummaryHeaderController = new WifiDataUsageSummaryPreferenceController(mFragment.getActivity(), mLifecycle, (PreferenceFragmentCompat) mFragment, mAccessPoint.getSsid());
return;
}
mEntityHeaderController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, headerPref.findViewById(R.id.entity_header));
ImageView iconView = headerPref.findViewById(R.id.entity_header_icon);
iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
mEntityHeaderController.setLabel(mAccessPoint.getTitle());
}
use of com.android.settings.datausage.WifiDataUsageSummaryPreferenceController in project android_packages_apps_Settings by omnirom.
the class WifiDetailPreferenceController2 method setupEntityHeader.
private void setupEntityHeader(PreferenceScreen screen) {
LayoutPreference headerPref = screen.findPreference(KEY_HEADER);
if (usingDataUsageHeader(mContext)) {
headerPref.setVisible(false);
mDataUsageSummaryPref = screen.findPreference(KEY_DATA_USAGE_HEADER);
mDataUsageSummaryPref.setVisible(true);
mSummaryHeaderController = new WifiDataUsageSummaryPreferenceController(mFragment.getActivity(), mLifecycle, (PreferenceFragmentCompat) mFragment, mWifiEntry.getTitle());
return;
}
mEntityHeaderController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, headerPref.findViewById(R.id.entity_header));
ImageView iconView = headerPref.findViewById(R.id.entity_header_icon);
iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
mEntityHeaderController.setLabel(mWifiEntry.getTitle());
}
Aggregations