本文整理了Java中android.support.v7.preference.Preference.setVisible()
方法的一些代码示例,展示了Preference.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Preference.setVisible()
方法的具体详情如下:
包路径:android.support.v7.preference.Preference
类名称:Preference
方法名:setVisible
暂无
代码示例来源:origin: MoMoWait/LeanbackLauncher
private void updateSortingPreferenceVisibility(SortingModeManager.SortingMode sortingMode) {
boolean visible = sortingMode == SortingModeManager.SortingMode.FIXED;
this.mReorderAppsPref.setVisible(visible);
this.mReorderGamesPref.setVisible(visible);
}
代码示例来源:origin: goodtime-productivity/Goodtime
private void toggleLongBreakPreference(Boolean newValue) {
findPreference(PreferenceHelper.LONG_BREAK_DURATION).setVisible(newValue);
findPreference(PreferenceHelper.SESSIONS_BEFORE_LONG_BREAK).setVisible(newValue);
}
}
代码示例来源:origin: goodtime-productivity/Goodtime
private void toggleEnableRingtonePreference(Boolean newValue) {
findPreference(PreferenceHelper.RINGTONE_WORK).setVisible(newValue);
findPreference(PreferenceHelper.RINGTONE_BREAK).setVisible(newValue);
}
代码示例来源:origin: LonamiWebs/Stringlate
@Nullable
@SuppressWarnings("SameParameterValue")
protected Preference updatePreference(@StringRes int keyResId, @DrawableRes Integer iconRes, CharSequence title, CharSequence summary, Boolean visible) {
Preference pref = findPreference(getString(keyResId));
if (pref != null) {
if (summary != null) {
pref.setSummary(summary);
}
if (title != null) {
pref.setTitle(title);
}
if (iconRes != null && iconRes != 0) {
if (isAllowedToTint(pref)) {
pref.setIcon(_cu.tintDrawable(iconRes, getIconTintColor()));
} else {
pref.setIcon(iconRes);
}
}
if (visible != null) {
pref.setVisible(visible);
}
}
return pref;
}
代码示例来源:origin: JBossOutreach/lead-management-android
signOut.setVisible(false);
login.setVisible(true);
login.setEnabled(true);
} else {
signOut.setVisible(true);
signOut.setEnabled(true);
login.setVisible(false);
内容来源于网络,如有侵权,请联系作者删除!