use of com.android.settingslib.widget.LayoutPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class RemoveAccountPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
final LayoutPreference removeAccountPreference = screen.findPreference(KEY_REMOVE_ACCOUNT);
Button removeAccountButton = (Button) removeAccountPreference.findViewById(R.id.button);
removeAccountButton.setOnClickListener(this);
}
use of com.android.settingslib.widget.LayoutPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class UsbDetailsHeaderController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
final LayoutPreference headerPreference = screen.findPreference(KEY_DEVICE_HEADER);
mHeaderController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, headerPreference.findViewById(R.id.entity_header));
}
use of com.android.settingslib.widget.LayoutPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class StartNowPreferenceController method displayPreference.
@Override
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
LayoutPreference pref = screen.findPreference(getPreferenceKey());
Button startButton = pref.findViewById(R.id.dream_start_now_button);
startButton.setOnClickListener(v -> mBackend.startDreaming());
}
use of com.android.settingslib.widget.LayoutPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class StartNowPreferenceController method updateState.
@Override
public void updateState(Preference preference) {
super.updateState(preference);
Button startButton = ((LayoutPreference) preference).findViewById(R.id.dream_start_now_button);
startButton.setEnabled(mBackend.getWhenToDreamSetting() != DreamBackend.NEVER);
}
use of com.android.settingslib.widget.LayoutPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ZenAutomaticRuleHeaderPreferenceController method updateState.
public void updateState(Preference preference) {
if (mRule == null) {
return;
}
if (mFragment != null) {
LayoutPreference pref = (LayoutPreference) preference;
if (mController == null) {
mController = EntityHeaderController.newInstance(mFragment.getActivity(), mFragment, pref.findViewById(R.id.entity_header));
}
pref = mController.setIcon(getIcon()).setLabel(mRule.getName()).setPackageName(mRule.getOwner().getPackageName()).setUid(mContext.getUserId()).setHasAppInfoLink(false).setButtonActions(EntityHeaderController.ActionType.ACTION_EDIT_PREFERENCE, EntityHeaderController.ActionType.ACTION_NONE).done(mFragment.getActivity(), mContext);
pref.findViewById(R.id.entity_header).setVisibility(View.VISIBLE);
}
}
Aggregations