/** * Sets the tab's title. * * @param title * The title, which should be set, as an instance of the type {@link CharSequence}. The * title may neither be null, nor empty */ public final void setTitle(@NonNull final CharSequence title) { Condition.INSTANCE.ensureNotNull(title, "The title may not be null"); Condition.INSTANCE.ensureNotEmpty(title, "The title may not be empty"); this.title = title; notifyOnTitleChanged(); }
@Override public final void setNextButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.nextButtonText = text; adaptNextButton(); }
@Override public final void setFinishButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.finishButtonText = text; adaptFinishButton(); }
@Override public final void setTitle(@NonNull final CharSequence title) { Condition.INSTANCE.ensureNotNull(title, "The title may not be null"); Condition.INSTANCE.ensureNotEmpty(title, "The title may not be empty"); super.setTitle(title); }
/** * Sets the text of the next button, which is shown, when the activity is used as a wizard. * * @param text * The text, which should be set, as an instance of the class {@link CharSequence}. The * text may neither be null, nor empty */ public final void setNextButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.nextButtonText = text; adaptNextButtonText(); }
@Override public final void setBackButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.backButtonText = text; adaptBackButton(); }
/** * Sets the text of the back button, which is shown, when the activity is used as a wizard. * * @param text * The text, which should be set, as an instance of the class {@link CharSequence}. The * text may neither null, nor empty */ public final void setBackButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.backButtonText = text; adaptBackButtonText(); }
/** * Sets the string, which should be used to format the progress, which is shown, when the * activity is used as a wizard. * * @param progressFormat * The string, which should be set, as a {@link String}. The string may neither be null, * nor empty. It must be formatted according to the following syntax: "*%d*%d*%s*" */ public final void setProgressFormat(@NonNull final String progressFormat) { Condition.INSTANCE.ensureNotNull(progressFormat, "The progress format may not be null"); Condition.INSTANCE.ensureNotEmpty(progressFormat, "The progress format may not be empty"); this.progressFormat = progressFormat; adaptProgress(); }
/** * Sets the text of the next button, which is shown, when the activity is used as a wizard and * the last navigation preference is currently selected. * * @param text * The text, which should be set, as an instance of the class {@link CharSequence}. The * text may neither be null, nor empty */ public final void setFinishButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.finishButtonText = text; adaptFinishButtonText(); }
/** * Sets the text of the button, which allows to restore the preferences' default values. The * text is only set, if the button is shown. * * @param text * The text, which should be set, as an instance of the class {@link CharSequence}. The * text may neither be null, nor empty */ public final void setRestoreDefaultsButtonText(@NonNull final CharSequence text) { Condition.INSTANCE.ensureNotNull(text, "The text may not be null"); Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty"); this.restoreDefaultsButtonText = text; adaptRestoreDefaultsButtonText(); }
/** * Creates a new item. * * @param id * The item's id as an {@link Integer} value. The id must be at least 0 * @param title * The item's title as an instance of the type {@link CharSequence}. The title may * neither be null, nor empty */ public Item(final int id, @NonNull final CharSequence title) { super(id, title); Condition.INSTANCE.ensureAtLeast(id, 0, "The id must be at least 0"); Condition.INSTANCE.ensureNotNull(title, "The title may not be null"); Condition.INSTANCE.ensureNotEmpty(title, "The title may not be empty"); this.icon = null; this.enabled = true; }
Condition.INSTANCE.ensureNotNull(context, "The context may not be null"); Condition.INSTANCE.ensureNotNull(resolution, "The resolution may not be null"); Condition.INSTANCE.ensureNotEmpty(resolution, "The resolution may not be empty"); String separator = context.getString(R.string.resolution_preference_separator); String[] dimensions = resolution.split(separator);