use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by DirtyUnicorns.
the class WifiDetailPreferenceController method setupEntityHeader.
private void setupEntityHeader(PreferenceScreen screen) {
LayoutPreference headerPref = (LayoutPreference) screen.findPreference(KEY_HEADER);
mEntityHeaderController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, headerPref.findViewById(R.id.entity_header));
ImageView iconView = headerPref.findViewById(R.id.entity_header_icon);
iconView.setBackground(mContext.getDrawable(R.drawable.ic_settings_widget_background));
iconView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
mEntityHeaderController.setLabel(mAccessPoint.getSsidStr());
}
use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by DirtyUnicorns.
the class BluetoothDetailsHeaderController method init.
@Override
protected void init(PreferenceScreen screen) {
final LayoutPreference headerPreference = (LayoutPreference) screen.findPreference(KEY_DEVICE_HEADER);
mHeaderController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, headerPreference.findViewById(R.id.entity_header));
screen.addPreference(headerPreference);
}
use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by DirtyUnicorns.
the class RemoveAccountPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
final LayoutPreference removeAccountPreference = (LayoutPreference) screen.findPreference(KEY_REMOVE_ACCOUNT);
Button removeAccountButton = (Button) removeAccountPreference.findViewById(R.id.button);
removeAccountButton.setOnClickListener(this);
}
use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by DirtyUnicorns.
the class StartNowPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
LayoutPreference pref = (LayoutPreference) screen.findPreference(getPreferenceKey());
Button startButton = (Button) pref.findViewById(R.id.dream_start_now_button);
startButton.setOnClickListener(v -> mBackend.startDreaming());
}
use of com.android.settings.applications.LayoutPreference in project android_packages_apps_Settings by DirtyUnicorns.
the class EntityHeaderController method done.
/**
* Done mutating entity header, rebinds everything and return a new {@link LayoutPreference}.
*/
public LayoutPreference done(Activity activity, Context uiContext) {
final LayoutPreference pref = new LayoutPreference(uiContext, done(activity));
// Makes sure it's the first preference onscreen.
pref.setOrder(-1000);
pref.setSelectable(false);
pref.setKey(PREF_KEY_APP_HEADER);
return pref;
}
Aggregations