publicstaticboolean showAndSet(ImageView view, int imageResourceId) { if (!show(view)) { returnfalse;
}
view.setImageResource(imageResourceId); returntrue;
}
/** * show a text view and set the text, return true if the view exist
*/ publicstaticboolean showAndSet(TextView view, String text) { if (!show(view)) { returnfalse;
}
/** * show a checkbox view and set the check state, return true if the view exist
*/ publicstaticboolean showAndSet(CheckBox view, boolean checked) { if (!show(view)) { returnfalse;
}
view.setChecked(checked); returntrue;
}
/** * Set touchModal flag of PopupWindow which is hidden on API<29 * * @param popupWindow PopupWindow * @param touchModal whether to enable or disable the flag
*/ publicstaticvoid setTouchModal(@NonNull PopupWindow popupWindow, boolean touchModal) { if (Build.VERSION.SDK_INT >= 29) {
popupWindow.setTouchModal(touchModal);
} else {
Method method; try {
method = PopupWindow.class.getDeclaredMethod("setTouchModal", boolean.class);
method.setAccessible(true);
method.invoke(popupWindow, touchModal);
} catch (Exception e) { // ignore
}
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.