repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractBuilder.java | AbstractBuilder.setContext | protected final void setContext(@NonNull final Context context) {
Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
this.context = context;
} | java | protected final void setContext(@NonNull final Context context) {
Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
this.context = context;
} | [
"protected",
"final",
"void",
"setContext",
"(",
"@",
"NonNull",
"final",
"Context",
"context",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"context",
",",
"\"The context may not be null\"",
")",
";",
"this",
".",
"context",
"=",
"context"... | Sets the context, which should be used by the builder.
@param context
The context, which should be set, as an instance of the class {@link Context}. The
context may not be null | [
"Sets",
"the",
"context",
"which",
"should",
"be",
"used",
"by",
"the",
"builder",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractBuilder.java#L74-L77 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java | ProgressDialogDecorator.getCustomMessageId | private int getCustomMessageId() {
switch (progressBarPosition) {
case LEFT:
return R.layout.progress_dialog_left;
case TOP:
return R.layout.progress_dialog_top;
case RIGHT:
return R.layout.progress_dialog_right;
cas... | java | private int getCustomMessageId() {
switch (progressBarPosition) {
case LEFT:
return R.layout.progress_dialog_left;
case TOP:
return R.layout.progress_dialog_top;
case RIGHT:
return R.layout.progress_dialog_right;
cas... | [
"private",
"int",
"getCustomMessageId",
"(",
")",
"{",
"switch",
"(",
"progressBarPosition",
")",
"{",
"case",
"LEFT",
":",
"return",
"R",
".",
"layout",
".",
"progress_dialog_left",
";",
"case",
"TOP",
":",
"return",
"R",
".",
"layout",
".",
"progress_dialo... | Returns the resource id of the layout, which should be used as the dialog's custom message,
depending on the position of the dialog's progress bar.
@return The resource id of the layout, which should be used as the diaog's custom message, as
an {@link Integer} value | [
"Returns",
"the",
"resource",
"id",
"of",
"the",
"layout",
"which",
"should",
"be",
"used",
"as",
"the",
"dialog",
"s",
"custom",
"message",
"depending",
"on",
"the",
"position",
"of",
"the",
"dialog",
"s",
"progress",
"bar",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java#L108-L121 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java | ProgressDialogDecorator.adaptProgressBar | private void adaptProgressBar() {
LayoutInflater inflater = LayoutInflater.from(getContext());
View view = inflater.inflate(getCustomMessageId(), getRootView(), false);
getDialog().setCustomMessage(view);
View progressView = view.findViewById(R.id.progress_bar);
progressBar =
... | java | private void adaptProgressBar() {
LayoutInflater inflater = LayoutInflater.from(getContext());
View view = inflater.inflate(getCustomMessageId(), getRootView(), false);
getDialog().setCustomMessage(view);
View progressView = view.findViewById(R.id.progress_bar);
progressBar =
... | [
"private",
"void",
"adaptProgressBar",
"(",
")",
"{",
"LayoutInflater",
"inflater",
"=",
"LayoutInflater",
".",
"from",
"(",
"getContext",
"(",
")",
")",
";",
"View",
"view",
"=",
"inflater",
".",
"inflate",
"(",
"getCustomMessageId",
"(",
")",
",",
"getRoot... | Adapts the dialog's progress bar. | [
"Adapts",
"the",
"dialog",
"s",
"progress",
"bar",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java#L126-L138 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java | ProgressDialogDecorator.adaptProgressBarSize | private void adaptProgressBarSize() {
if (progressBar != null) {
progressBar.setVisibility(progressBarSize > 0 ? View.VISIBLE : View.GONE);
ViewGroup.LayoutParams layoutParams = progressBar.getLayoutParams();
layoutParams.width = progressBarSize;
layoutParams.heig... | java | private void adaptProgressBarSize() {
if (progressBar != null) {
progressBar.setVisibility(progressBarSize > 0 ? View.VISIBLE : View.GONE);
ViewGroup.LayoutParams layoutParams = progressBar.getLayoutParams();
layoutParams.width = progressBarSize;
layoutParams.heig... | [
"private",
"void",
"adaptProgressBarSize",
"(",
")",
"{",
"if",
"(",
"progressBar",
"!=",
"null",
")",
"{",
"progressBar",
".",
"setVisibility",
"(",
"progressBarSize",
">",
"0",
"?",
"View",
".",
"VISIBLE",
":",
"View",
".",
"GONE",
")",
";",
"ViewGroup",... | Adapts the size of the dialog's circular progress bar. | [
"Adapts",
"the",
"size",
"of",
"the",
"dialog",
"s",
"circular",
"progress",
"bar",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java#L152-L159 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java | ProgressDialogDecorator.adaptMessageTextSize | private void adaptMessageTextSize() {
if (getRootView() != null) {
View messageView = getRootView().findViewById(android.R.id.message);
if (messageView instanceof TextView) {
TextView messageTextView = (TextView) messageView;
if (TextUtils.isEmpty(getDia... | java | private void adaptMessageTextSize() {
if (getRootView() != null) {
View messageView = getRootView().findViewById(android.R.id.message);
if (messageView instanceof TextView) {
TextView messageTextView = (TextView) messageView;
if (TextUtils.isEmpty(getDia... | [
"private",
"void",
"adaptMessageTextSize",
"(",
")",
"{",
"if",
"(",
"getRootView",
"(",
")",
"!=",
"null",
")",
"{",
"View",
"messageView",
"=",
"getRootView",
"(",
")",
".",
"findViewById",
"(",
"android",
".",
"R",
".",
"id",
".",
"message",
")",
";... | Adapts the text size of the dialog's message, depending on whether a title is shown. | [
"Adapts",
"the",
"text",
"size",
"of",
"the",
"dialog",
"s",
"message",
"depending",
"on",
"whether",
"a",
"title",
"is",
"shown",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ProgressDialogDecorator.java#L173-L191 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/adapter/ViewPagerAdapter.java | ViewPagerAdapter.addItem | public final void addItem(@Nullable final CharSequence title,
@NonNull final Class<? extends Fragment> fragmentClass,
@Nullable final Bundle arguments) {
Condition.INSTANCE.ensureNotNull(fragmentClass, "The fragment class may not be null");
ite... | java | public final void addItem(@Nullable final CharSequence title,
@NonNull final Class<? extends Fragment> fragmentClass,
@Nullable final Bundle arguments) {
Condition.INSTANCE.ensureNotNull(fragmentClass, "The fragment class may not be null");
ite... | [
"public",
"final",
"void",
"addItem",
"(",
"@",
"Nullable",
"final",
"CharSequence",
"title",
",",
"@",
"NonNull",
"final",
"Class",
"<",
"?",
"extends",
"Fragment",
">",
"fragmentClass",
",",
"@",
"Nullable",
"final",
"Bundle",
"arguments",
")",
"{",
"Condi... | Adds a new fragment to the adapter.
@param title
The title of the fragment, which should be added, as an instance of the type {@link
CharSequence} or null, if no title should be set
@param fragmentClass
The class of the fragment, which should be added, as an instance of the class {@link
Class}. The class may not be nu... | [
"Adds",
"a",
"new",
"fragment",
"to",
"the",
"adapter",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/ViewPagerAdapter.java#L84-L90 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeAlertDialog | private void initializeAlertDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
alertDialog = builder.create();
} | java | private void initializeAlertDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
alertDialog = builder.create();
} | [
"private",
"void",
"initializeAlertDialog",
"(",
")",
"{",
"MaterialDialog",
".",
"Builder",
"builder",
"=",
"new",
"MaterialDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"configureButton... | Initializes the alert dialog. | [
"Initializes",
"the",
"alert",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L166-L171 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeListDialog | private void initializeListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setItems(R.array.list_items, createSingleChoiceListener());
listDialog = buil... | java | private void initializeListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setItems(R.array.list_items, createSingleChoiceListener());
listDialog = buil... | [
"private",
"void",
"initializeListDialog",
"(",
")",
"{",
"MaterialDialog",
".",
"Builder",
"builder",
"=",
"new",
"MaterialDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"configureButtonB... | Initializes the list dialog. | [
"Initializes",
"the",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L176-L182 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeSingleChoiceListDialog | private void initializeSingleChoiceListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setSingleChoiceItems(R.array.list_items, 0, createSingleChoiceListener())... | java | private void initializeSingleChoiceListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setSingleChoiceItems(R.array.list_items, 0, createSingleChoiceListener())... | [
"private",
"void",
"initializeSingleChoiceListDialog",
"(",
")",
"{",
"MaterialDialog",
".",
"Builder",
"builder",
"=",
"new",
"MaterialDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"conf... | Initializes the single choice list dialog. | [
"Initializes",
"the",
"single",
"choice",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L187-L193 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeMultipleChoiceListDialog | private void initializeMultipleChoiceListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setMultiChoiceItems(R.array.list_items, new boolean[]{true, false, fals... | java | private void initializeMultipleChoiceListDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setMultiChoiceItems(R.array.list_items, new boolean[]{true, false, fals... | [
"private",
"void",
"initializeMultipleChoiceListDialog",
"(",
")",
"{",
"MaterialDialog",
".",
"Builder",
"builder",
"=",
"new",
"MaterialDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"co... | Initializes the multiple choice list dialog. | [
"Initializes",
"the",
"multiple",
"choice",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L198-L205 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeCustomDialog | private void initializeCustomDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setView(R.layout.custom_dialog_content);
builder.setCustomTitle(R.layout.cu... | java | private void initializeCustomDialog() {
MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
builder.setView(R.layout.custom_dialog_content);
builder.setCustomTitle(R.layout.cu... | [
"private",
"void",
"initializeCustomDialog",
"(",
")",
"{",
"MaterialDialog",
".",
"Builder",
"builder",
"=",
"new",
"MaterialDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"configureButto... | Initializes the custom dialog. | [
"Initializes",
"the",
"custom",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L210-L220 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeProgressDialog | private void initializeProgressDialog() {
ProgressDialog.Builder builder = new ProgressDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
progressDialog = builder.create();
} | java | private void initializeProgressDialog() {
ProgressDialog.Builder builder = new ProgressDialog.Builder(getActivity());
configureHeaderDialogBuilder(builder);
configureButtonBarDialogBuilder(builder);
progressDialog = builder.create();
} | [
"private",
"void",
"initializeProgressDialog",
"(",
")",
"{",
"ProgressDialog",
".",
"Builder",
"builder",
"=",
"new",
"ProgressDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
";",
"configureHeaderDialogBuilder",
"(",
"builder",
")",
";",
"configureBut... | Initializes the progress dialog. | [
"Initializes",
"the",
"progress",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L225-L230 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeEditTextDialog | private void initializeEditTextDialog() {
EditTextDialog.Builder builder =
new EditTextDialog.Builder(getActivity()).setHint(R.string.edit_text_dialog_hint)
.setText(getContext().getString(R.string.edit_text_dialog_text))
.addValidator(Validators.n... | java | private void initializeEditTextDialog() {
EditTextDialog.Builder builder =
new EditTextDialog.Builder(getActivity()).setHint(R.string.edit_text_dialog_hint)
.setText(getContext().getString(R.string.edit_text_dialog_text))
.addValidator(Validators.n... | [
"private",
"void",
"initializeEditTextDialog",
"(",
")",
"{",
"EditTextDialog",
".",
"Builder",
"builder",
"=",
"new",
"EditTextDialog",
".",
"Builder",
"(",
"getActivity",
"(",
")",
")",
".",
"setHint",
"(",
"R",
".",
"string",
".",
"edit_text_dialog_hint",
"... | Initializes the edit text dialog. | [
"Initializes",
"the",
"edit",
"text",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L235-L243 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeThemePreference | private void initializeThemePreference() {
Preference themePreference = findPreference(getString(R.string.theme_preference_key));
themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
} | java | private void initializeThemePreference() {
Preference themePreference = findPreference(getString(R.string.theme_preference_key));
themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
} | [
"private",
"void",
"initializeThemePreference",
"(",
")",
"{",
"Preference",
"themePreference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"theme_preference_key",
")",
")",
";",
"themePreference",
".",
"setOnPreferenceChangeListener",
"(",
... | Initializes the preference, which allows to change the app's theme. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"change",
"the",
"app",
"s",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L248-L251 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeFullscreenPreference | private void initializeFullscreenPreference() {
Preference fullscreenPreference =
findPreference(getString(R.string.fullscreen_preference_key));
fullscreenPreference.setOnPreferenceChangeListener(createThemeChangeListener());
} | java | private void initializeFullscreenPreference() {
Preference fullscreenPreference =
findPreference(getString(R.string.fullscreen_preference_key));
fullscreenPreference.setOnPreferenceChangeListener(createThemeChangeListener());
} | [
"private",
"void",
"initializeFullscreenPreference",
"(",
")",
"{",
"Preference",
"fullscreenPreference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"fullscreen_preference_key",
")",
")",
";",
"fullscreenPreference",
".",
"setOnPreferenceChan... | Initializes the preference, which allows to specfify, whether dialogs should be shown
fullscreen, or not. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"specfify",
"whether",
"dialogs",
"should",
"be",
"shown",
"fullscreen",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L257-L261 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowAlertDialogPreference | private void initializeShowAlertDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_alert_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick... | java | private void initializeShowAlertDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_alert_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick... | [
"private",
"void",
"initializeShowAlertDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_alert_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClickListene... | Initializes the preference, which allows to show the alert dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"alert",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L285-L301 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowListDialogPreference | private void initializeShowListDialogPreference() {
Preference preference = findPreference(getString(R.string.show_list_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference ... | java | private void initializeShowListDialogPreference() {
Preference preference = findPreference(getString(R.string.show_list_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference ... | [
"private",
"void",
"initializeShowListDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_list_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClickListener"... | Initializes the preference, which allows to show the list dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L306-L321 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowSingleChoiceListDialogPreference | private void initializeShowSingleChoiceListDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_single_choice_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolea... | java | private void initializeShowSingleChoiceListDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_single_choice_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolea... | [
"private",
"void",
"initializeShowSingleChoiceListDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_single_choice_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPre... | Initializes the preference, which allows to show the single choice list dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"single",
"choice",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L326-L345 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowMultipleChoiceListDialogPreference | private void initializeShowMultipleChoiceListDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_multi_choice_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boole... | java | private void initializeShowMultipleChoiceListDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_multi_choice_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boole... | [
"private",
"void",
"initializeShowMultipleChoiceListDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_multi_choice_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPr... | Initializes the preference, which allows to show the multiple choice list dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"multiple",
"choice",
"list",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L350-L369 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowCustomDialogPreference | private void initializeShowCustomDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_custom_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceCli... | java | private void initializeShowCustomDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_custom_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceCli... | [
"private",
"void",
"initializeShowCustomDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_custom_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClickListe... | Initializes the preference, which allows to show the custom dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"custom",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L374-L390 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowProgressDialogPreference | private void initializeShowProgressDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_progress_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenc... | java | private void initializeShowProgressDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_progress_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenc... | [
"private",
"void",
"initializeShowProgressDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_progress_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClickL... | Initializes the preference, which allows to show the progress dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"progress",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L395-L411 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowEditTextDialogPreference | private void initializeShowEditTextDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_edit_text_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferen... | java | private void initializeShowEditTextDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_edit_text_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferen... | [
"private",
"void",
"initializeShowEditTextDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_edit_text_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClick... | Initializes the preference, which allows to show the edit text dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"the",
"edit",
"text",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L416-L432 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createRectangularRevealAnimation | private DialogAnimation createRectangularRevealAnimation(@NonNull final Preference preference) {
if (shouldUseAnimations()) {
RecyclerView recyclerView = getListView();
View view = recyclerView.getChildAt(preference.getOrder() + 1);
int[] viewLocation = new int[2];
... | java | private DialogAnimation createRectangularRevealAnimation(@NonNull final Preference preference) {
if (shouldUseAnimations()) {
RecyclerView recyclerView = getListView();
View view = recyclerView.getChildAt(preference.getOrder() + 1);
int[] viewLocation = new int[2];
... | [
"private",
"DialogAnimation",
"createRectangularRevealAnimation",
"(",
"@",
"NonNull",
"final",
"Preference",
"preference",
")",
"{",
"if",
"(",
"shouldUseAnimations",
"(",
")",
")",
"{",
"RecyclerView",
"recyclerView",
"=",
"getListView",
"(",
")",
";",
"View",
"... | Creates and returns the rectangular reveal animation, which should be used to show or hide
dialogs.
@param preference
The preference, which is used to show the dialog, as an instance of the class {@link
Preference}
@return The animation, which has been created, as an instance of the type {@link
DialogAnimation} | [
"Creates",
"and",
"returns",
"the",
"rectangular",
"reveal",
"animation",
"which",
"should",
"be",
"used",
"to",
"show",
"or",
"hide",
"dialogs",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L444-L465 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createCircleRevealAnimation | private DialogAnimation createCircleRevealAnimation(@NonNull final View view) {
int[] location = new int[2];
view.getLocationOnScreen(location);
int margin = getResources().getDimensionPixelSize(R.dimen.floating_action_button_margin);
int width = view.getWidth();
int height = vie... | java | private DialogAnimation createCircleRevealAnimation(@NonNull final View view) {
int[] location = new int[2];
view.getLocationOnScreen(location);
int margin = getResources().getDimensionPixelSize(R.dimen.floating_action_button_margin);
int width = view.getWidth();
int height = vie... | [
"private",
"DialogAnimation",
"createCircleRevealAnimation",
"(",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"int",
"[",
"]",
"location",
"=",
"new",
"int",
"[",
"2",
"]",
";",
"view",
".",
"getLocationOnScreen",
"(",
"location",
")",
";",
"int",
"... | Creates and returns the circle reveal animation, which should be used to show or hide
dialogs.
@param view
The view, which is used to show the dialog, as an instance of the class {@link View}
@return The animation, which has been created, as an instance of the type {@link
DialogAnimation} | [
"Creates",
"and",
"returns",
"the",
"circle",
"reveal",
"animation",
"which",
"should",
"be",
"used",
"to",
"show",
"or",
"hide",
"dialogs",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L476-L487 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createSingleChoiceListener | private OnClickListener createSingleChoiceListener() {
return new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position) {
String text = getString(R.string.single_choice_listener_text);
showToast(String.format(... | java | private OnClickListener createSingleChoiceListener() {
return new OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position) {
String text = getString(R.string.single_choice_listener_text);
showToast(String.format(... | [
"private",
"OnClickListener",
"createSingleChoiceListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"DialogInterface",
"dialog",
",",
"final",
"int",
"position",
")",
"{",
"Str... | Creates and returns a listener, which allows to show a toast, which indicates when a single
choice list item of a dialog has been selected or unselected.
@return The listener, which has been created, as an instance of the type {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"a",
"toast",
"which",
"indicates",
"when",
"a",
"single",
"choice",
"list",
"item",
"of",
"a",
"dialog",
"has",
"been",
"selected",
"or",
"unselected",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L496-L506 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createMultiChoiceListener | private OnMultiChoiceClickListener createMultiChoiceListener() {
return new OnMultiChoiceClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position,
final boolean isChecked) {
String text = getString(R... | java | private OnMultiChoiceClickListener createMultiChoiceListener() {
return new OnMultiChoiceClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position,
final boolean isChecked) {
String text = getString(R... | [
"private",
"OnMultiChoiceClickListener",
"createMultiChoiceListener",
"(",
")",
"{",
"return",
"new",
"OnMultiChoiceClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"DialogInterface",
"dialog",
",",
"final",
"int",
"position",... | Creates and returns a listener, which allows to show a toast, which indicates when a multi
choice list item of a dialog has been selected or unselected.
@return The listener, which has been created, as an instance of the type {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"a",
"toast",
"which",
"indicates",
"when",
"a",
"multi",
"choice",
"list",
"item",
"of",
"a",
"dialog",
"has",
"been",
"selected",
"or",
"unselected",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L515-L535 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.initializeShowWizardDialogPreference | private void initializeShowWizardDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_wizard_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceCli... | java | private void initializeShowWizardDialogPreference() {
Preference preference =
findPreference(getString(R.string.show_wizard_dialog_preference_key));
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceCli... | [
"private",
"void",
"initializeShowWizardDialogPreference",
"(",
")",
"{",
"Preference",
"preference",
"=",
"findPreference",
"(",
"getString",
"(",
"R",
".",
"string",
".",
"show_wizard_dialog_preference_key",
")",
")",
";",
"preference",
".",
"setOnPreferenceClickListe... | Initializes the preference, which allows to show a wizard dialog. | [
"Initializes",
"the",
"preference",
"which",
"allows",
"to",
"show",
"a",
"wizard",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L540-L573 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createWizardDialogPageChangeListener | private OnPageChangeListener createWizardDialogPageChangeListener(
@NonNull final WizardDialog wizardDialog) {
return new OnPageChangeListener() {
@Override
public void onPageScrolled(final int position, final float positionOffset,
fina... | java | private OnPageChangeListener createWizardDialogPageChangeListener(
@NonNull final WizardDialog wizardDialog) {
return new OnPageChangeListener() {
@Override
public void onPageScrolled(final int position, final float positionOffset,
fina... | [
"private",
"OnPageChangeListener",
"createWizardDialogPageChangeListener",
"(",
"@",
"NonNull",
"final",
"WizardDialog",
"wizardDialog",
")",
"{",
"return",
"new",
"OnPageChangeListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onPageScrolled",
"(",
"final",
... | Creates and returns a listener, which allows to change the background color of the wizard
dialog, when its view pager is scrolled.
@param wizardDialog
The wizard dialog as an instance of the class {@link WizardDialog}. The wizard dialog
may not be null
@return The listener, which has been created, as an instance of th... | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"change",
"the",
"background",
"color",
"of",
"the",
"wizard",
"dialog",
"when",
"its",
"view",
"pager",
"is",
"scrolled",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L585-L623 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createHeaderAnimationListener | private AnimationListener createHeaderAnimationListener(
@NonNull final WizardDialog wizardDialog) {
return new AnimationListener() {
@Override
public void onAnimationStart() {
}
@Override
public void onAnimationEnd() {
i... | java | private AnimationListener createHeaderAnimationListener(
@NonNull final WizardDialog wizardDialog) {
return new AnimationListener() {
@Override
public void onAnimationStart() {
}
@Override
public void onAnimationEnd() {
i... | [
"private",
"AnimationListener",
"createHeaderAnimationListener",
"(",
"@",
"NonNull",
"final",
"WizardDialog",
"wizardDialog",
")",
"{",
"return",
"new",
"AnimationListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onAnimationStart",
"(",
")",
"{",
"}",
... | Creates and returns a listener, which allows to reset a wizard dialog's header background to
default, when its animation is finished.
@param wizardDialog
The wizard dialog as an instance of the class {@link WizardDialog}
@return The listener, which has been created, as an instance of the type {@link
AnimationListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"reset",
"a",
"wizard",
"dialog",
"s",
"header",
"background",
"to",
"default",
"when",
"its",
"animation",
"is",
"finished",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L634-L653 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.addFragment | private void addFragment(@NonNull final WizardDialog.Builder builder, final int index) {
Bundle arguments = new Bundle();
arguments.putInt(DialogFragment.INDEX_EXTRA, index);
CharSequence title = shouldHeaderBeShown() ? null :
String.format(getString(R.string.dialog_tab_text), in... | java | private void addFragment(@NonNull final WizardDialog.Builder builder, final int index) {
Bundle arguments = new Bundle();
arguments.putInt(DialogFragment.INDEX_EXTRA, index);
CharSequence title = shouldHeaderBeShown() ? null :
String.format(getString(R.string.dialog_tab_text), in... | [
"private",
"void",
"addFragment",
"(",
"@",
"NonNull",
"final",
"WizardDialog",
".",
"Builder",
"builder",
",",
"final",
"int",
"index",
")",
"{",
"Bundle",
"arguments",
"=",
"new",
"Bundle",
"(",
")",
";",
"arguments",
".",
"putInt",
"(",
"DialogFragment",
... | Adds a new fragment to a builder, which allows to create wizard dialogs.
@param builder
The builder, the fragment should be added to, as an instance of the class {@link
WizardDialog.Builder}
@param index
The index of the fragment, which should be added | [
"Adds",
"a",
"new",
"fragment",
"to",
"a",
"builder",
"which",
"allows",
"to",
"create",
"wizard",
"dialogs",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L664-L670 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.showToast | private void showToast(@Nullable final String text) {
if (toast != null) {
toast.cancel();
}
toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);
toast.show();
} | java | private void showToast(@Nullable final String text) {
if (toast != null) {
toast.cancel();
}
toast = Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT);
toast.show();
} | [
"private",
"void",
"showToast",
"(",
"@",
"Nullable",
"final",
"String",
"text",
")",
"{",
"if",
"(",
"toast",
"!=",
"null",
")",
"{",
"toast",
".",
"cancel",
"(",
")",
";",
"}",
"toast",
"=",
"Toast",
".",
"makeText",
"(",
"getActivity",
"(",
")",
... | Shows a specific toast and cancels a previous one, if existing.
@param text
The text of the toast, which should be shown, as a {@link String}, or null, if no
toast should be shown | [
"Shows",
"a",
"specific",
"toast",
"and",
"cancels",
"a",
"previous",
"one",
"if",
"existing",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L679-L686 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.configureHeaderDialogBuilder | private void configureHeaderDialogBuilder(@NonNull final AbstractHeaderDialogBuilder builder) {
builder.setFullscreen(shouldUseFullscreen());
if (shouldTitleBeShown()) {
builder.setTitle(getDialogTitle());
}
if (shouldMessageBeShown()) {
builder.setMessage(getDi... | java | private void configureHeaderDialogBuilder(@NonNull final AbstractHeaderDialogBuilder builder) {
builder.setFullscreen(shouldUseFullscreen());
if (shouldTitleBeShown()) {
builder.setTitle(getDialogTitle());
}
if (shouldMessageBeShown()) {
builder.setMessage(getDi... | [
"private",
"void",
"configureHeaderDialogBuilder",
"(",
"@",
"NonNull",
"final",
"AbstractHeaderDialogBuilder",
"builder",
")",
"{",
"builder",
".",
"setFullscreen",
"(",
"shouldUseFullscreen",
"(",
")",
")",
";",
"if",
"(",
"shouldTitleBeShown",
"(",
")",
")",
"{... | Configures a builder, which allows to create header dialogs, depending on the app's
settings.
@param builder
The builder, which should be configured, as an instance of the class {@link
AbstractHeaderDialogBuilder} | [
"Configures",
"a",
"builder",
"which",
"allows",
"to",
"create",
"header",
"dialogs",
"depending",
"on",
"the",
"app",
"s",
"settings",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L696-L718 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.configureButtonBarDialogBuilder | private void configureButtonBarDialogBuilder(
@NonNull final AbstractButtonBarDialogBuilder builder) {
if (shouldNegativeButtonBeShown()) {
builder.setNegativeButton(getNegativeButtonText(), createNegativeButtonListener());
}
if (shouldNeutralButtonBeShown()) {
... | java | private void configureButtonBarDialogBuilder(
@NonNull final AbstractButtonBarDialogBuilder builder) {
if (shouldNegativeButtonBeShown()) {
builder.setNegativeButton(getNegativeButtonText(), createNegativeButtonListener());
}
if (shouldNeutralButtonBeShown()) {
... | [
"private",
"void",
"configureButtonBarDialogBuilder",
"(",
"@",
"NonNull",
"final",
"AbstractButtonBarDialogBuilder",
"builder",
")",
"{",
"if",
"(",
"shouldNegativeButtonBeShown",
"(",
")",
")",
"{",
"builder",
".",
"setNegativeButton",
"(",
"getNegativeButtonText",
"(... | Configures a builder, which allows to create button bar dialogs, depending on the app's
settings.
@param builder
The builder, which should be configured as an instance of the class {@link
AbstractButtonBarDialogBuilder} | [
"Configures",
"a",
"builder",
"which",
"allows",
"to",
"create",
"button",
"bar",
"dialogs",
"depending",
"on",
"the",
"app",
"s",
"settings",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L728-L744 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createNegativeButtonListener | private OnClickListener createNegativeButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.negative_button_toast, Toast.LENGTH_SHORT)
.show();
... | java | private OnClickListener createNegativeButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.negative_button_toast, Toast.LENGTH_SHORT)
.show();
... | [
"private",
"OnClickListener",
"createNegativeButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"DialogInterface",
"dialog",
",",
"int",
"which",
")",
"{",
"Toast",
".",
"makeText... | Creates and returns a listener, which allows to show a toast, when the negative button of a
dialog has been clicked.
@return The listener, which has been created, as an instance of the class {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"a",
"toast",
"when",
"the",
"negative",
"button",
"of",
"a",
"dialog",
"has",
"been",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L753-L763 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createNeutralButtonListener | private OnClickListener createNeutralButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.neutral_button_toast, Toast.LENGTH_SHORT)
.show();
... | java | private OnClickListener createNeutralButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.neutral_button_toast, Toast.LENGTH_SHORT)
.show();
... | [
"private",
"OnClickListener",
"createNeutralButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"DialogInterface",
"dialog",
",",
"int",
"which",
")",
"{",
"Toast",
".",
"makeText"... | Creates and returns a listener, which allows to show a toast, when the neutral button of a
dialog has been clicked.
@return The listener, which has been created, as an instance of the class {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"a",
"toast",
"when",
"the",
"neutral",
"button",
"of",
"a",
"dialog",
"has",
"been",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L772-L782 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.createPositiveButtonListener | private OnClickListener createPositiveButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.positive_button_toast, Toast.LENGTH_SHORT)
.show();
... | java | private OnClickListener createPositiveButtonListener() {
return new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getActivity(), R.string.positive_button_toast, Toast.LENGTH_SHORT)
.show();
... | [
"private",
"OnClickListener",
"createPositiveButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"DialogInterface",
"dialog",
",",
"int",
"which",
")",
"{",
"Toast",
".",
"makeText... | Creates and returns a listener, which allows to show a toast, when the positive button of a
dialog has been clicked.
@return The listener, which has been created, as an instance of the class {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"a",
"toast",
"when",
"the",
"positive",
"button",
"of",
"a",
"dialog",
"has",
"been",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L791-L801 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldTitleBeShown | private boolean shouldTitleBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_title_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.sh... | java | private boolean shouldTitleBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_title_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.sh... | [
"private",
"boolean",
"shouldTitleBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
"... | Returns, whether the title of the example dialog should be shown, or not.
@return True, if the title should be shown, false otherwise | [
"Returns",
"whether",
"the",
"title",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L808-L815 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.getDialogTitle | private String getDialogTitle() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.dialog_title_preference_key);
String defaultValue = getString(R.string.dialog_title_preference_default_value);
... | java | private String getDialogTitle() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.dialog_title_preference_key);
String defaultValue = getString(R.string.dialog_title_preference_default_value);
... | [
"private",
"String",
"getDialogTitle",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
".",
... | Returns the title of the example dialog.
@return The title of the example dialog | [
"Returns",
"the",
"title",
"of",
"the",
"example",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L822-L828 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldIconBeShown | private boolean shouldIconBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_icon_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.show... | java | private boolean shouldIconBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_icon_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.show... | [
"private",
"boolean",
"shouldIconBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
".... | Returns, whether the icon of the example dialog should be shown, or not.
@return True, if the icon should be shown, false otherwise | [
"Returns",
"whether",
"the",
"icon",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L835-L842 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldMessageBeShown | private boolean shouldMessageBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_message_preference_key);
boolean defaultValue =
getResources().getBoolean(R.boo... | java | private boolean shouldMessageBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_message_preference_key);
boolean defaultValue =
getResources().getBoolean(R.boo... | [
"private",
"boolean",
"shouldMessageBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns, whether the message of the example dialog should be shown, or not.
@return True, if the message should be shown, false otherwise | [
"Returns",
"whether",
"the",
"message",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L849-L856 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.getDialogMessage | private String getDialogMessage() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.dialog_message_preference_key);
String defaultValue = getString(R.string.dialog_message_preference_default_value... | java | private String getDialogMessage() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.dialog_message_preference_key);
String defaultValue = getString(R.string.dialog_message_preference_default_value... | [
"private",
"String",
"getDialogMessage",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
".",... | Returns the message of the example dialog.
@return The message of the example dialog | [
"Returns",
"the",
"message",
"of",
"the",
"example",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L863-L869 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldNegativeButtonBeShown | private boolean shouldNegativeButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_negative_button_preference_key);
boolean defaultValue =
getResources().getBoole... | java | private boolean shouldNegativeButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_negative_button_preference_key);
boolean defaultValue =
getResources().getBoole... | [
"private",
"boolean",
"shouldNegativeButtonBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"str... | Returns, whether the negative button of the example dialog should be shown, or not.
@return True, if the negative button should be shown, false otherwise | [
"Returns",
"whether",
"the",
"negative",
"button",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L876-L883 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.getNegativeButtonText | private String getNegativeButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.negative_button_text_preference_key);
String defaultValue = getString(R.string.negative_button_text_prefere... | java | private String getNegativeButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.negative_button_text_preference_key);
String defaultValue = getString(R.string.negative_button_text_prefere... | [
"private",
"String",
"getNegativeButtonText",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns the text of the example dialog's negative button.
@return The text of the negative button | [
"Returns",
"the",
"text",
"of",
"the",
"example",
"dialog",
"s",
"negative",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L890-L896 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldNeutralButtonBeShown | private boolean shouldNeutralButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_neutral_button_preference_key);
boolean defaultValue =
getResources().getBoolean... | java | private boolean shouldNeutralButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_neutral_button_preference_key);
boolean defaultValue =
getResources().getBoolean... | [
"private",
"boolean",
"shouldNeutralButtonBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"stri... | Returns, whether the neutral button of the example dialog should be shown, or not.
@return True, if the neutral button should be shown, false otherwise | [
"Returns",
"whether",
"the",
"neutral",
"button",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L903-L910 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.getNeutralButtonText | private String getNeutralButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.neutral_button_text_preference_key);
String defaultValue = getString(R.string.neutral_button_text_preference... | java | private String getNeutralButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.neutral_button_text_preference_key);
String defaultValue = getString(R.string.neutral_button_text_preference... | [
"private",
"String",
"getNeutralButtonText",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns the text of the example dialog's neutral button.
@return The text of the neutral button | [
"Returns",
"the",
"text",
"of",
"the",
"example",
"dialog",
"s",
"neutral",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L917-L923 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldPositiveButtonBeShown | private boolean shouldPositiveButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_positive_button_preference_key);
boolean defaultValue =
getResources().getBoole... | java | private boolean shouldPositiveButtonBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_positive_button_preference_key);
boolean defaultValue =
getResources().getBoole... | [
"private",
"boolean",
"shouldPositiveButtonBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"str... | Returns, whether the positive button of the example dialog should be shown, or not.
@return True, if the positive button should be shown, false otherwise | [
"Returns",
"whether",
"the",
"positive",
"button",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L930-L937 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.getPositiveButtonText | private String getPositiveButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.positive_button_text_preference_key);
String defaultValue = getString(R.string.positive_button_text_prefere... | java | private String getPositiveButtonText() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.positive_button_text_preference_key);
String defaultValue = getString(R.string.positive_button_text_prefere... | [
"private",
"String",
"getPositiveButtonText",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns the text of the example dialog's positive button.
@return The text of the positive button | [
"Returns",
"the",
"text",
"of",
"the",
"example",
"dialog",
"s",
"positive",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L944-L950 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldStackButtons | private boolean shouldStackButtons() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.stack_buttons_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.stack_... | java | private boolean shouldStackButtons() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.stack_buttons_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.stack_... | [
"private",
"boolean",
"shouldStackButtons",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
"... | Returns, whether the buttons of the example dialog should be stacked, or not.
@return True, if the buttons should be stacked, false otherwise | [
"Returns",
"whether",
"the",
"buttons",
"of",
"the",
"example",
"dialog",
"should",
"be",
"stacked",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L957-L964 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldButtonBarDividerBeShown | private boolean shouldButtonBarDividerBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_button_bar_divider_preference_key);
boolean defaultValue =
getResources().get... | java | private boolean shouldButtonBarDividerBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_button_bar_divider_preference_key);
boolean defaultValue =
getResources().get... | [
"private",
"boolean",
"shouldButtonBarDividerBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"s... | Returns, whether the divider, which is located above the dialog's buttons, should be shown,
or not.
@return True, if the divider should be shown, false otherwise | [
"Returns",
"whether",
"the",
"divider",
"which",
"is",
"located",
"above",
"the",
"dialog",
"s",
"buttons",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L972-L979 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldHeaderBeShown | private boolean shouldHeaderBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_header_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.... | java | private boolean shouldHeaderBeShown() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.show_dialog_header_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.... | [
"private",
"boolean",
"shouldHeaderBeShown",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns, whether the header of the example dialog should be shown, or not.
@return True, if the header should be shown, false otherwise | [
"Returns",
"whether",
"the",
"header",
"of",
"the",
"example",
"dialog",
"should",
"be",
"shown",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L986-L993 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldUseAnimations | private boolean shouldUseAnimations() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.animation_preference_key);
boolean defaultValue = getResources().getBoolean(R.bool.animation_preference_defa... | java | private boolean shouldUseAnimations() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.animation_preference_key);
boolean defaultValue = getResources().getBoolean(R.bool.animation_preference_defa... | [
"private",
"boolean",
"shouldUseAnimations",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns, whether animations should be used to show or hide dialogs, or not.
@return True, if animations should be used, false otherwise | [
"Returns",
"whether",
"animations",
"should",
"be",
"used",
"to",
"show",
"or",
"hide",
"dialogs",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L1000-L1006 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.shouldUseFullscreen | private boolean shouldUseFullscreen() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.fullscreen_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.fullscre... | java | private boolean shouldUseFullscreen() {
SharedPreferences sharedPreferences =
PreferenceManager.getDefaultSharedPreferences(getActivity());
String key = getString(R.string.fullscreen_preference_key);
boolean defaultValue =
getResources().getBoolean(R.bool.fullscre... | [
"private",
"boolean",
"shouldUseFullscreen",
"(",
")",
"{",
"SharedPreferences",
"sharedPreferences",
"=",
"PreferenceManager",
".",
"getDefaultSharedPreferences",
"(",
"getActivity",
"(",
")",
")",
";",
"String",
"key",
"=",
"getString",
"(",
"R",
".",
"string",
... | Returns, whether dialogs should be shown fullscreen, or not.
@return True, if dialogs should be shown fullscreen, false otherwise | [
"Returns",
"whether",
"dialogs",
"should",
"be",
"shown",
"fullscreen",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L1013-L1020 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java | PreferenceFragment.showAlertDialog | public final void showAlertDialog(@NonNull final View view) {
initializeAlertDialog();
alertDialog.setShowAnimation(createCircleRevealAnimation(view));
alertDialog.setDismissAnimation(createCircleRevealAnimation(view));
alertDialog.setCancelAnimation(createCircleRevealAnimation(view));
... | java | public final void showAlertDialog(@NonNull final View view) {
initializeAlertDialog();
alertDialog.setShowAnimation(createCircleRevealAnimation(view));
alertDialog.setDismissAnimation(createCircleRevealAnimation(view));
alertDialog.setCancelAnimation(createCircleRevealAnimation(view));
... | [
"public",
"final",
"void",
"showAlertDialog",
"(",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"initializeAlertDialog",
"(",
")",
";",
"alertDialog",
".",
"setShowAnimation",
"(",
"createCircleRevealAnimation",
"(",
"view",
")",
")",
";",
"alertDialog",
"... | Shows an alert dialog using a circle reveal animation.
@param view
The view, which is used to show the dialog, as an instance of the class {@link View} | [
"Shows",
"an",
"alert",
"dialog",
"using",
"a",
"circle",
"reveal",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L1028-L1034 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/Divider.java | Divider.createVisibilityAnimationListener | @NonNull
private AnimatorListener createVisibilityAnimationListener(final boolean show) {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(final Animator animation) {
super.onAnimationStart(animation);
if (show) {
... | java | @NonNull
private AnimatorListener createVisibilityAnimationListener(final boolean show) {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(final Animator animation) {
super.onAnimationStart(animation);
if (show) {
... | [
"@",
"NonNull",
"private",
"AnimatorListener",
"createVisibilityAnimationListener",
"(",
"final",
"boolean",
"show",
")",
"{",
"return",
"new",
"AnimatorListenerAdapter",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onAnimationStart",
"(",
"final",
"Animator",
... | Creates and returns a listener, which allows to observe the progress of an animation, which
is used to show or hide the divider.
@param show
True, if the divider is shown by the animation, false otherwise
@return The listener, which has been created, as an instance of the type {@link
AnimatorListener}. The listener ma... | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"the",
"progress",
"of",
"an",
"animation",
"which",
"is",
"used",
"to",
"show",
"or",
"hide",
"the",
"divider",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/Divider.java#L59-L82 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/Divider.java | Divider.setVisibility | public final void setVisibility(final int visibility, final boolean animate) {
boolean visible = visibility == View.VISIBLE;
Boolean tag = (Boolean) getTag();
setTag(visible);
if (animate) {
if (tag == null || tag != visible) {
if (getAnimation() != null) {
... | java | public final void setVisibility(final int visibility, final boolean animate) {
boolean visible = visibility == View.VISIBLE;
Boolean tag = (Boolean) getTag();
setTag(visible);
if (animate) {
if (tag == null || tag != visible) {
if (getAnimation() != null) {
... | [
"public",
"final",
"void",
"setVisibility",
"(",
"final",
"int",
"visibility",
",",
"final",
"boolean",
"animate",
")",
"{",
"boolean",
"visible",
"=",
"visibility",
"==",
"View",
".",
"VISIBLE",
";",
"Boolean",
"tag",
"=",
"(",
"Boolean",
")",
"getTag",
"... | Sets the visibility of the divider.
@param visibility
The visibility, which should be set, as an {@link Integer} value. Must be one of
{@link #VISIBLE}, {@link #INVISIBLE} or {@link #GONE}.
@param animate
True, if the visibility should be changed in an animated manner, false otherwise | [
"Sets",
"the",
"visibility",
"of",
"the",
"divider",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/Divider.java#L180-L199 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialogFragment.java | AbstractMaterialDialogFragment.applyDecorators | private Map<ViewType, View> applyDecorators(@NonNull final Window window,
@NonNull final DialogRootView rootView,
@NonNull final View view,
@NonNull final FragmentManager fragm... | java | private Map<ViewType, View> applyDecorators(@NonNull final Window window,
@NonNull final DialogRootView rootView,
@NonNull final View view,
@NonNull final FragmentManager fragm... | [
"private",
"Map",
"<",
"ViewType",
",",
"View",
">",
"applyDecorators",
"(",
"@",
"NonNull",
"final",
"Window",
"window",
",",
"@",
"NonNull",
"final",
"DialogRootView",
"rootView",
",",
"@",
"NonNull",
"final",
"View",
"view",
",",
"@",
"NonNull",
"final",
... | Applies all registered decorators to the dialog.
@param window
The window, the dialog belongs to, as an instance of the class {@link Window}. The
window may not be null
@param rootView
The root view of the dialog as an instance of the class {@link DialogRootView}. The
root view may not be null
@param view
The view of ... | [
"Applies",
"all",
"registered",
"decorators",
"to",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialogFragment.java#L158-L179 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialogFragment.java | AbstractMaterialDialogFragment.detachDecorators | private void detachDecorators(@NonNull final DialogRootView rootView) {
for (AbstractDecorator<?, ?> decorator : decorators) {
decorator.detach();
decorator.removeAreaListener(rootView);
}
} | java | private void detachDecorators(@NonNull final DialogRootView rootView) {
for (AbstractDecorator<?, ?> decorator : decorators) {
decorator.detach();
decorator.removeAreaListener(rootView);
}
} | [
"private",
"void",
"detachDecorators",
"(",
"@",
"NonNull",
"final",
"DialogRootView",
"rootView",
")",
"{",
"for",
"(",
"AbstractDecorator",
"<",
"?",
",",
"?",
">",
"decorator",
":",
"decorators",
")",
"{",
"decorator",
".",
"detach",
"(",
")",
";",
"dec... | Detaches all registered decorators from the dialog.
@param rootView
The root view of the dialog as an instance of the class {@link DialogRootView}. The
root view may not be null | [
"Detaches",
"all",
"registered",
"decorators",
"from",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialogFragment.java#L188-L193 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainShowHeader | private void obtainShowHeader(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowHeader});
showHeader(typedArray.getBoolean(0, false));
} | java | private void obtainShowHeader(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowHeader});
showHeader(typedArray.getBoolean(0, false));
} | [
"private",
"void",
"obtainShowHeader",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int"... | Obtains, whether the dialog's header should be shown, or not, from a specific theme.
@param themeResourceId
The resource id of the theme, the visibility should be obtained from, as an {@link
Integer} value | [
"Obtains",
"whether",
"the",
"dialog",
"s",
"header",
"should",
"be",
"shown",
"or",
"not",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L57-L61 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainHeaderHeight | private void obtainHeaderHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderHeight});
int defaultHeight =
getContext().getResources().getDimensionPixelS... | java | private void obtainHeaderHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderHeight});
int defaultHeight =
getContext().getResources().getDimensionPixelS... | [
"private",
"void",
"obtainHeaderHeight",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"in... | Obtains the height of the dialog's header from a specific theme.
@param themeResourceId
The resource id of the theme, the height should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"height",
"of",
"the",
"dialog",
"s",
"header",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L70-L76 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainHeaderBackground | private void obtainHeaderBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId !... | java | private void obtainHeaderBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId !... | [
"private",
"void",
"obtainHeaderBackground",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
... | Obtains the background of the dialog's header from a specific theme.
@param themeResourceId
The resource id of the theme, the background should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"background",
"of",
"the",
"dialog",
"s",
"header",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L85-L96 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainHeaderIcon | private void obtainHeaderIcon(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderIcon});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId != 0) {
... | java | private void obtainHeaderIcon(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderIcon});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId != 0) {
... | [
"private",
"void",
"obtainHeaderIcon",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int"... | Obtains the icon of the dialog's header from a specific theme.
@param themeResourceId
The resource id of the theme, the icon should be obtained from, as an {@link Integer}
value | [
"Obtains",
"the",
"icon",
"of",
"the",
"dialog",
"s",
"header",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L105-L113 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainHeaderIconTintList | private void obtainHeaderIconTintList(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderIconTint});
setHeaderIconTintList(typedArray.getColorStateList(0));
} | java | private void obtainHeaderIconTintList(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderIconTint});
setHeaderIconTintList(typedArray.getColorStateList(0));
} | [
"private",
"void",
"obtainHeaderIconTintList",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",... | Obtains the color state list, which is used to tint the header icon of the dialog, from a
specific theme.
@param themeResourceId
The resource id of the theme, the color state list should be obtained from, as an
{@link Integer} value | [
"Obtains",
"the",
"color",
"state",
"list",
"which",
"is",
"used",
"to",
"tint",
"the",
"header",
"icon",
"of",
"the",
"dialog",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L123-L127 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainHeaderDividerColor | private void obtainHeaderDividerColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderDividerColor});
int defaultColor = ContextCompat.getColor(getContext(), R.color.header... | java | private void obtainHeaderDividerColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogHeaderDividerColor});
int defaultColor = ContextCompat.getColor(getContext(), R.color.header... | [
"private",
"void",
"obtainHeaderDividerColor",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",... | Obtains the color of the divider of the dialog's header from a specific theme.
@param themeResourceId
The resource id of the theme, the color should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"color",
"of",
"the",
"divider",
"of",
"the",
"dialog",
"s",
"header",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L136-L141 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java | AbstractHeaderDialogBuilder.obtainShowHeaderDivider | private void obtainShowHeaderDivider(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowHeaderDivider});
showHeaderDivider(typedArray.getBoolean(0, true));
} | java | private void obtainShowHeaderDivider(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowHeaderDivider});
showHeaderDivider(typedArray.getBoolean(0, true));
} | [
"private",
"void",
"obtainShowHeaderDivider",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
... | Obtains, whether the divider of the dialog's header should be shown, or not, from a specific
theme.
@param themeResourceId
The resource id of the theme, the visibility should be obtained from, as an {@link
Integer} value | [
"Obtains",
"whether",
"the",
"divider",
"of",
"the",
"dialog",
"s",
"header",
"should",
"be",
"shown",
"or",
"not",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractHeaderDialogBuilder.java#L151-L155 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/ScrollableArea.java | ScrollableArea.create | public static ScrollableArea create(@Nullable final Area top, @Nullable final Area bottom) {
return new ScrollableArea(top, bottom);
} | java | public static ScrollableArea create(@Nullable final Area top, @Nullable final Area bottom) {
return new ScrollableArea(top, bottom);
} | [
"public",
"static",
"ScrollableArea",
"create",
"(",
"@",
"Nullable",
"final",
"Area",
"top",
",",
"@",
"Nullable",
"final",
"Area",
"bottom",
")",
"{",
"return",
"new",
"ScrollableArea",
"(",
"top",
",",
"bottom",
")",
";",
"}"
] | Creates and returns a new scrollable area.
@param top
The top-most area, which should be scrollable, as a value of the enum {@link Area} or
null, if no area should be scrollable
@param bottom
The bottom-most area, which should be scrollable, as a value of the enum {@link
Area}. If the top-most area is null, the bottom... | [
"Creates",
"and",
"returns",
"a",
"new",
"scrollable",
"area",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/ScrollableArea.java#L196-L198 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/ScrollableArea.java | ScrollableArea.isScrollable | public final boolean isScrollable(@NonNull final Area area) {
return topScrollableArea != null && topScrollableArea.getIndex() <= area.getIndex() &&
bottomScrollableArea.getIndex() >= area.getIndex();
} | java | public final boolean isScrollable(@NonNull final Area area) {
return topScrollableArea != null && topScrollableArea.getIndex() <= area.getIndex() &&
bottomScrollableArea.getIndex() >= area.getIndex();
} | [
"public",
"final",
"boolean",
"isScrollable",
"(",
"@",
"NonNull",
"final",
"Area",
"area",
")",
"{",
"return",
"topScrollableArea",
"!=",
"null",
"&&",
"topScrollableArea",
".",
"getIndex",
"(",
")",
"<=",
"area",
".",
"getIndex",
"(",
")",
"&&",
"bottomScr... | Returns, whether a specific area is scrollable.
@param area
The area, which should be checked, as a value of the enum {@link Area}. The area may
not be null
@return True, if the given area is scrollable, false otherwise | [
"Returns",
"whether",
"a",
"specific",
"area",
"is",
"scrollable",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/ScrollableArea.java#L208-L211 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.reInflateTabLayout | private void reInflateTabLayout() {
View rootView = getRootView();
if (rootView != null) {
View headerContentContainer = rootView.findViewById(R.id.header_content_container);
View contentContainer = rootView.findViewById(R.id.content_container);
if (headerContentCon... | java | private void reInflateTabLayout() {
View rootView = getRootView();
if (rootView != null) {
View headerContentContainer = rootView.findViewById(R.id.header_content_container);
View contentContainer = rootView.findViewById(R.id.content_container);
if (headerContentCon... | [
"private",
"void",
"reInflateTabLayout",
"(",
")",
"{",
"View",
"rootView",
"=",
"getRootView",
"(",
")",
";",
"if",
"(",
"rootView",
"!=",
"null",
")",
"{",
"View",
"headerContentContainer",
"=",
"rootView",
".",
"findViewById",
"(",
"R",
".",
"id",
".",
... | Re-inflates the tab layout, which indicates the currently shown fragment, if the dialog has
already been created. | [
"Re",
"-",
"inflates",
"the",
"tab",
"layout",
"which",
"indicates",
"the",
"currently",
"shown",
"fragment",
"if",
"the",
"dialog",
"has",
"already",
"been",
"created",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L327-L338 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.inflateTabLayout | private void inflateTabLayout(@NonNull final View headerView, @NonNull final View contentView) {
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
ViewGroup headerContentContainer = headerView.findViewById(R.id.header_content_container);
ViewGroup contentContainer = contentView.... | java | private void inflateTabLayout(@NonNull final View headerView, @NonNull final View contentView) {
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
ViewGroup headerContentContainer = headerView.findViewById(R.id.header_content_container);
ViewGroup contentContainer = contentView.... | [
"private",
"void",
"inflateTabLayout",
"(",
"@",
"NonNull",
"final",
"View",
"headerView",
",",
"@",
"NonNull",
"final",
"View",
"contentView",
")",
"{",
"LayoutInflater",
"layoutInflater",
"=",
"LayoutInflater",
".",
"from",
"(",
"getContext",
"(",
")",
")",
... | Inflates the tab layout, which indicates the currently shown fragment.
@param headerView
The view, which contains the dialog's header, as an instance of the class {@link
View}. The view may not be null
@param contentView
The view, which contains the dialog's content, as an instance of the class {@link
View}. The view ... | [
"Inflates",
"the",
"tab",
"layout",
"which",
"indicates",
"the",
"currently",
"shown",
"fragment",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L350-L379 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptTabLayoutEnableState | private void adaptTabLayoutEnableState() {
if (tabLayout != null) {
LinearLayout tabStrip = ((LinearLayout) tabLayout.getChildAt(0));
tabStrip.setEnabled(tabLayoutEnabled);
for (int i = 0; i < tabStrip.getChildCount(); i++) {
tabStrip.getChildAt(i).setEnabled... | java | private void adaptTabLayoutEnableState() {
if (tabLayout != null) {
LinearLayout tabStrip = ((LinearLayout) tabLayout.getChildAt(0));
tabStrip.setEnabled(tabLayoutEnabled);
for (int i = 0; i < tabStrip.getChildCount(); i++) {
tabStrip.getChildAt(i).setEnabled... | [
"private",
"void",
"adaptTabLayoutEnableState",
"(",
")",
"{",
"if",
"(",
"tabLayout",
"!=",
"null",
")",
"{",
"LinearLayout",
"tabStrip",
"=",
"(",
"(",
"LinearLayout",
")",
"tabLayout",
".",
"getChildAt",
"(",
"0",
")",
")",
";",
"tabStrip",
".",
"setEna... | Adapts the enable state of the tab layout, which indicates the currently shown fragment. | [
"Adapts",
"the",
"enable",
"state",
"of",
"the",
"tab",
"layout",
"which",
"indicates",
"the",
"currently",
"shown",
"fragment",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L422-L431 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptTabLayoutVisibility | private void adaptTabLayoutVisibility() {
if (tabLayout != null) {
tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
}
} | java | private void adaptTabLayoutVisibility() {
if (tabLayout != null) {
tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
}
} | [
"private",
"void",
"adaptTabLayoutVisibility",
"(",
")",
"{",
"if",
"(",
"tabLayout",
"!=",
"null",
")",
"{",
"tabLayout",
".",
"setVisibility",
"(",
"tabLayoutShown",
"?",
"View",
".",
"VISIBLE",
":",
"View",
".",
"GONE",
")",
";",
"}",
"}"
] | Adapts the visibility of the tab layout, which indicates the currently shown fragment. | [
"Adapts",
"the",
"visibility",
"of",
"the",
"tab",
"layout",
"which",
"indicates",
"the",
"currently",
"shown",
"fragment",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L436-L440 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptBackButton | private void adaptBackButton() {
if (backButton != null) {
backButton.setText(backButtonText.toString().toUpperCase(Locale.getDefault()));
backButton.setOnClickListener(createBackButtonListener());
}
} | java | private void adaptBackButton() {
if (backButton != null) {
backButton.setText(backButtonText.toString().toUpperCase(Locale.getDefault()));
backButton.setOnClickListener(createBackButtonListener());
}
} | [
"private",
"void",
"adaptBackButton",
"(",
")",
"{",
"if",
"(",
"backButton",
"!=",
"null",
")",
"{",
"backButton",
".",
"setText",
"(",
"backButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")"... | Adapts the dialog's back button. | [
"Adapts",
"the",
"dialog",
"s",
"back",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L498-L503 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.createBackButtonListener | private OnClickListener createBackButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnPrevious(selectedIndex)) {
viewPager.setCurr... | java | private OnClickListener createBackButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnPrevious(selectedIndex)) {
viewPager.setCurr... | [
"private",
"OnClickListener",
"createBackButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"View",
"v",
")",
"{",
"int",
"selectedIndex",
"=",
"viewPager",
".",
"getCu... | Creates and returns a listener, which allows to show the previous fragment, when the
corresponding button is clicked.
@return The listener, which has been created, as an instance of the type {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"the",
"previous",
"fragment",
"when",
"the",
"corresponding",
"button",
"is",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L512-L525 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptNextButton | private void adaptNextButton() {
if (nextButton != null) {
nextButton.setText(nextButtonText.toString().toUpperCase(Locale.getDefault()));
nextButton.setOnClickListener(createNextButtonListener());
}
} | java | private void adaptNextButton() {
if (nextButton != null) {
nextButton.setText(nextButtonText.toString().toUpperCase(Locale.getDefault()));
nextButton.setOnClickListener(createNextButtonListener());
}
} | [
"private",
"void",
"adaptNextButton",
"(",
")",
"{",
"if",
"(",
"nextButton",
"!=",
"null",
")",
"{",
"nextButton",
".",
"setText",
"(",
"nextButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")",
")"... | Adapts the dialog's next button. | [
"Adapts",
"the",
"dialog",
"s",
"next",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L530-L535 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.createNextButtonListener | private OnClickListener createNextButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnNext(selectedIndex)) {
viewPager.setCurrentI... | java | private OnClickListener createNextButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnNext(selectedIndex)) {
viewPager.setCurrentI... | [
"private",
"OnClickListener",
"createNextButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"View",
"v",
")",
"{",
"int",
"selectedIndex",
"=",
"viewPager",
".",
"getCu... | Creates and returns a listener, which allows to show the next fragment, when the
corresponding button is clicked.
@return The listener, which has been created, as an instance of the type {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"show",
"the",
"next",
"fragment",
"when",
"the",
"corresponding",
"button",
"is",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L544-L557 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptFinishButton | private void adaptFinishButton() {
if (finishButton != null) {
finishButton.setText(finishButtonText.toString().toUpperCase(Locale.getDefault()));
finishButton.setOnClickListener(createFinishButtonListener());
}
} | java | private void adaptFinishButton() {
if (finishButton != null) {
finishButton.setText(finishButtonText.toString().toUpperCase(Locale.getDefault()));
finishButton.setOnClickListener(createFinishButtonListener());
}
} | [
"private",
"void",
"adaptFinishButton",
"(",
")",
"{",
"if",
"(",
"finishButton",
"!=",
"null",
")",
"{",
"finishButton",
".",
"setText",
"(",
"finishButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"(",
"Locale",
".",
"getDefault",
"(",
")",
")... | Adapts the dialog's finish button. | [
"Adapts",
"the",
"dialog",
"s",
"finish",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L562-L567 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.createFinishButtonListener | private OnClickListener createFinishButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnFinish(selectedIndex)) {
getDialog().dismi... | java | private OnClickListener createFinishButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
int selectedIndex = viewPager.getCurrentItem();
if (notifyOnFinish(selectedIndex)) {
getDialog().dismi... | [
"private",
"OnClickListener",
"createFinishButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"View",
"v",
")",
"{",
"int",
"selectedIndex",
"=",
"viewPager",
".",
"get... | Creates and returns a listener, which allows to close the dialog, when the corresponding
button is clicked.
@return The listener, which has been created, as an instance of the type {@link
OnClickListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"close",
"the",
"dialog",
"when",
"the",
"corresponding",
"button",
"is",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L576-L589 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptButtonBarVisibility | private void adaptButtonBarVisibility() {
if (buttonBarContainer != null) {
buttonBarContainer.setVisibility(buttonBarShown ? View.VISIBLE : View.GONE);
}
} | java | private void adaptButtonBarVisibility() {
if (buttonBarContainer != null) {
buttonBarContainer.setVisibility(buttonBarShown ? View.VISIBLE : View.GONE);
}
} | [
"private",
"void",
"adaptButtonBarVisibility",
"(",
")",
"{",
"if",
"(",
"buttonBarContainer",
"!=",
"null",
")",
"{",
"buttonBarContainer",
".",
"setVisibility",
"(",
"buttonBarShown",
"?",
"View",
".",
"VISIBLE",
":",
"View",
".",
"GONE",
")",
";",
"}",
"}... | Adapts the visibility of the dialog's buttons. | [
"Adapts",
"the",
"visibility",
"of",
"the",
"dialog",
"s",
"buttons",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L594-L598 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptButtonBarDividerMargin | private void adaptButtonBarDividerMargin() {
if (buttonBarDivider != null) {
LinearLayout.LayoutParams layoutParams =
(LinearLayout.LayoutParams) buttonBarDivider.getLayoutParams();
layoutParams.leftMargin = buttonBarDividerMargin;
layoutParams.rightMargin... | java | private void adaptButtonBarDividerMargin() {
if (buttonBarDivider != null) {
LinearLayout.LayoutParams layoutParams =
(LinearLayout.LayoutParams) buttonBarDivider.getLayoutParams();
layoutParams.leftMargin = buttonBarDividerMargin;
layoutParams.rightMargin... | [
"private",
"void",
"adaptButtonBarDividerMargin",
"(",
")",
"{",
"if",
"(",
"buttonBarDivider",
"!=",
"null",
")",
"{",
"LinearLayout",
".",
"LayoutParams",
"layoutParams",
"=",
"(",
"LinearLayout",
".",
"LayoutParams",
")",
"buttonBarDivider",
".",
"getLayoutParams... | Adapts the left and right margin of the divider, which is shown above the dialog's buttons. | [
"Adapts",
"the",
"left",
"and",
"right",
"margin",
"of",
"the",
"divider",
"which",
"is",
"shown",
"above",
"the",
"dialog",
"s",
"buttons",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L621-L629 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.adaptButtonVisibility | private void adaptButtonVisibility() {
if (viewPager != null && viewPagerAdapter != null && backButton != null &&
nextButton != null && finishButton != null) {
int selectedIndex = viewPager.getCurrentItem();
backButton.setVisibility(selectedIndex > 0 ? View.VISIBLE : View... | java | private void adaptButtonVisibility() {
if (viewPager != null && viewPagerAdapter != null && backButton != null &&
nextButton != null && finishButton != null) {
int selectedIndex = viewPager.getCurrentItem();
backButton.setVisibility(selectedIndex > 0 ? View.VISIBLE : View... | [
"private",
"void",
"adaptButtonVisibility",
"(",
")",
"{",
"if",
"(",
"viewPager",
"!=",
"null",
"&&",
"viewPagerAdapter",
"!=",
"null",
"&&",
"backButton",
"!=",
"null",
"&&",
"nextButton",
"!=",
"null",
"&&",
"finishButton",
"!=",
"null",
")",
"{",
"int",
... | Adapts the visibility of the dialog's buttons, depending on the currently shown fragment. | [
"Adapts",
"the",
"visibility",
"of",
"the",
"dialog",
"s",
"buttons",
"depending",
"on",
"the",
"currently",
"shown",
"fragment",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L634-L644 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.notifyOnNext | private boolean notifyOnNext(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onNext(index, viewPagerAdapter.getItem(index));
}
return result;
} | java | private boolean notifyOnNext(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onNext(index, viewPagerAdapter.getItem(index));
}
return result;
} | [
"private",
"boolean",
"notifyOnNext",
"(",
"final",
"int",
"index",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"for",
"(",
"WizardListener",
"listener",
":",
"wizardListeners",
")",
"{",
"result",
"&=",
"listener",
".",
"onNext",
"(",
"index",
",",
"... | Notifies all listeners, when the next fragment is about to be shown.
@param index
The index of the fragment, which is about to be shown, as an {@link Integer} value
@return True, if the fragment is allowed to be shown, false otherwise | [
"Notifies",
"all",
"listeners",
"when",
"the",
"next",
"fragment",
"is",
"about",
"to",
"be",
"shown",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L653-L661 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.notifyOnPrevious | private boolean notifyOnPrevious(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onPrevious(index, viewPagerAdapter.getItem(index));
}
return result;
} | java | private boolean notifyOnPrevious(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onPrevious(index, viewPagerAdapter.getItem(index));
}
return result;
} | [
"private",
"boolean",
"notifyOnPrevious",
"(",
"final",
"int",
"index",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"for",
"(",
"WizardListener",
"listener",
":",
"wizardListeners",
")",
"{",
"result",
"&=",
"listener",
".",
"onPrevious",
"(",
"index",
... | Notifies all listeners, when the previous fragment is about to be shown.
@param index
The index of the fragment, which is about to be shown, as an {@link Integer} value
@return True, if the fragment is allowed to be shown, false otherwise | [
"Notifies",
"all",
"listeners",
"when",
"the",
"previous",
"fragment",
"is",
"about",
"to",
"be",
"shown",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L670-L678 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java | WizardDialogDecorator.notifyOnFinish | private boolean notifyOnFinish(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onFinish(index, viewPagerAdapter.getItem(index));
}
return result;
} | java | private boolean notifyOnFinish(final int index) {
boolean result = true;
for (WizardListener listener : wizardListeners) {
result &= listener.onFinish(index, viewPagerAdapter.getItem(index));
}
return result;
} | [
"private",
"boolean",
"notifyOnFinish",
"(",
"final",
"int",
"index",
")",
"{",
"boolean",
"result",
"=",
"true",
";",
"for",
"(",
"WizardListener",
"listener",
":",
"wizardListeners",
")",
"{",
"result",
"&=",
"listener",
".",
"onFinish",
"(",
"index",
",",... | Notifies all listeners, when the last fragment is about to be finished.
@param index
The index of the fragment, which is about to be finished, as an {@link Integer}
value
@return True, if the last fragment is allowed to be finished, false otherwise | [
"Notifies",
"all",
"listeners",
"when",
"the",
"last",
"fragment",
"is",
"about",
"to",
"be",
"finished",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/WizardDialogDecorator.java#L688-L696 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractButtonBarDialogBuilder.java | AbstractButtonBarDialogBuilder.obtainButtonTextColor | private void obtainButtonTextColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogButtonTextColor});
ColorStateList colorStateList = typedArray.getColorStateList(0);
if... | java | private void obtainButtonTextColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogButtonTextColor});
ColorStateList colorStateList = typedArray.getColorStateList(0);
if... | [
"private",
"void",
"obtainButtonTextColor",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
... | Obtains the button text color from a specific theme.
@param themeResourceId
The resource id of the theme, the color should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"button",
"text",
"color",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractButtonBarDialogBuilder.java#L55-L63 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractButtonBarDialogBuilder.java | AbstractButtonBarDialogBuilder.obtainShowButtonBarDivider | private void obtainShowButtonBarDivider(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowButtonBarDivider});
showButtonBarDivider(typedArray.getBoolean(0, false));
} | java | private void obtainShowButtonBarDivider(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowButtonBarDivider});
showButtonBarDivider(typedArray.getBoolean(0, false));
} | [
"private",
"void",
"obtainShowButtonBarDivider",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new... | Obtains, whether the divider, which is located above the dialog's buttons, should be shown,
or not, from a specific theme.
@param themeResourceId
The resource id of the theme, the visibility should be obtained from, as an {@link
Integer} value | [
"Obtains",
"whether",
"the",
"divider",
"which",
"is",
"located",
"above",
"the",
"dialog",
"s",
"buttons",
"should",
"be",
"shown",
"or",
"not",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractButtonBarDialogBuilder.java#L73-L77 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractValidateableDialogBuilder.java | AbstractValidateableDialogBuilder.addDialogValidator | public final BuilderType addDialogValidator(@NonNull final DialogValidator validator) {
Condition.INSTANCE.ensureNotNull(validator, "The validator may not be null");
getProduct().addDialogValidator(validator);
return self();
} | java | public final BuilderType addDialogValidator(@NonNull final DialogValidator validator) {
Condition.INSTANCE.ensureNotNull(validator, "The validator may not be null");
getProduct().addDialogValidator(validator);
return self();
} | [
"public",
"final",
"BuilderType",
"addDialogValidator",
"(",
"@",
"NonNull",
"final",
"DialogValidator",
"validator",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"validator",
",",
"\"The validator may not be null\"",
")",
";",
"getProduct",
"(",... | Adds a new validator, which should be executed when the positive button of the dialog, which
is created by the builder, is clicked.
@param validator
The validator, which should be added, as an instance of the type {@link
DialogValidator}. The validator may not be null
@return The builder, the method has been called up... | [
"Adds",
"a",
"new",
"validator",
"which",
"should",
"be",
"executed",
"when",
"the",
"positive",
"button",
"of",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"is",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractValidateableDialogBuilder.java#L81-L85 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractValidateableDialogBuilder.java | AbstractValidateableDialogBuilder.addAllDialogValidators | public final BuilderType addAllDialogValidators(
@NonNull final Collection<DialogValidator> validators) {
Condition.INSTANCE.ensureNotNull(validators, "The collection may not be null");
getProduct().addAllDialogValidators(validators);
return self();
} | java | public final BuilderType addAllDialogValidators(
@NonNull final Collection<DialogValidator> validators) {
Condition.INSTANCE.ensureNotNull(validators, "The collection may not be null");
getProduct().addAllDialogValidators(validators);
return self();
} | [
"public",
"final",
"BuilderType",
"addAllDialogValidators",
"(",
"@",
"NonNull",
"final",
"Collection",
"<",
"DialogValidator",
">",
"validators",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"validators",
",",
"\"The collection may not be null\"",... | Adds all validators, which are contained by a specific collection and should be executed when
the positive button of the dialog, which is created by the builder, is clicked.
@param validators
A collection, which contains all validators, which should be added, as an instance of
the type {@link Collection} or an empty c... | [
"Adds",
"all",
"validators",
"which",
"are",
"contained",
"by",
"a",
"specific",
"collection",
"and",
"should",
"be",
"executed",
"when",
"the",
"positive",
"button",
"of",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"is",
"clicked",
"... | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractValidateableDialogBuilder.java#L97-L102 | train |
kejunxia/AndroidMvc | library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcDialog.java | MvcDialog.show | public static void show(FragmentManager fragmentManager, Class<? extends MvcDialog> dialogClass) {
FragmentTransaction ft = fragmentManager.beginTransaction();
MvcDialog dialogFragment = (MvcDialog) fragmentManager.findFragmentByTag(dialogClass.getName());
if (dialogFragment == null) {
... | java | public static void show(FragmentManager fragmentManager, Class<? extends MvcDialog> dialogClass) {
FragmentTransaction ft = fragmentManager.beginTransaction();
MvcDialog dialogFragment = (MvcDialog) fragmentManager.findFragmentByTag(dialogClass.getName());
if (dialogFragment == null) {
... | [
"public",
"static",
"void",
"show",
"(",
"FragmentManager",
"fragmentManager",
",",
"Class",
"<",
"?",
"extends",
"MvcDialog",
">",
"dialogClass",
")",
"{",
"FragmentTransaction",
"ft",
"=",
"fragmentManager",
".",
"beginTransaction",
"(",
")",
";",
"MvcDialog",
... | Show dialog.
@param fragmentManager The fragment manager. Usually it's the child fragment manager of the
fragment on which the dialog will show
@param dialogClass The class type of the dialog extending {@link MvcDialog} | [
"Show",
"dialog",
"."
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcDialog.java#L57-L70 | train |
kejunxia/AndroidMvc | library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcService.java | MvcService.onCreate | @Override
public void onCreate() {
super.onCreate();
graphMonitor = new Graph.Monitor() {
@Override
public void onInject(Object target) {
if (controller != null && target == MvcService.this) {
controller.view = MvcService.this;
... | java | @Override
public void onCreate() {
super.onCreate();
graphMonitor = new Graph.Monitor() {
@Override
public void onInject(Object target) {
if (controller != null && target == MvcService.this) {
controller.view = MvcService.this;
... | [
"@",
"Override",
"public",
"void",
"onCreate",
"(",
")",
"{",
"super",
".",
"onCreate",
"(",
")",
";",
"graphMonitor",
"=",
"new",
"Graph",
".",
"Monitor",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onInject",
"(",
"Object",
"target",
")",
"{",... | Callback of creating a service | [
"Callback",
"of",
"creating",
"a",
"service"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcService.java#L47-L83 | train |
kejunxia/AndroidMvc | library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcService.java | MvcService.onDestroy | @Override
public void onDestroy() {
super.onDestroy();
eventRegister.unregisterEventBuses();
if (getControllerClass() != null) {
try {
Mvc.graph().dereference(controller, getControllerClass(), null);
} catch (ProviderMissingException e) {
... | java | @Override
public void onDestroy() {
super.onDestroy();
eventRegister.unregisterEventBuses();
if (getControllerClass() != null) {
try {
Mvc.graph().dereference(controller, getControllerClass(), null);
} catch (ProviderMissingException e) {
... | [
"@",
"Override",
"public",
"void",
"onDestroy",
"(",
")",
"{",
"super",
".",
"onDestroy",
"(",
")",
";",
"eventRegister",
".",
"unregisterEventBuses",
"(",
")",
";",
"if",
"(",
"getControllerClass",
"(",
")",
"!=",
"null",
")",
"{",
"try",
"{",
"Mvc",
... | Callback of destroying a service | [
"Callback",
"of",
"destroying",
"a",
"service"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcService.java#L88-L106 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Component.java | Component.unregister | public Component unregister(Provider provider) throws ProviderMissingException {
return unregister(provider.type(), provider.getQualifier());
} | java | public Component unregister(Provider provider) throws ProviderMissingException {
return unregister(provider.type(), provider.getQualifier());
} | [
"public",
"Component",
"unregister",
"(",
"Provider",
"provider",
")",
"throws",
"ProviderMissingException",
"{",
"return",
"unregister",
"(",
"provider",
".",
"type",
"(",
")",
",",
"provider",
".",
"getQualifier",
"(",
")",
")",
";",
"}"
] | Unregister provider. If there is an overridden type registered already, only unregister the
overridden binding. The original one will be unregistered if the this method is called
again against to the type and qualifier associated with the provider.
@param provider The provider that has the type and qualifier to unregi... | [
"Unregister",
"provider",
".",
"If",
"there",
"is",
"an",
"overridden",
"type",
"registered",
"already",
"only",
"unregister",
"the",
"overridden",
"binding",
".",
"The",
"original",
"one",
"will",
"be",
"unregistered",
"if",
"the",
"this",
"method",
"is",
"ca... | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Component.java#L194-L196 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Component.java | Component.findProvider | protected <T> Provider<T> findProvider(Class<T> type, Annotation qualifier) throws ProviderMissingException {
String key = PokeHelper.makeProviderKey(type, qualifier);
Component targetComponent = getRootComponent().componentLocator.get(key);
Provider provider = null;
if (targetComponent... | java | protected <T> Provider<T> findProvider(Class<T> type, Annotation qualifier) throws ProviderMissingException {
String key = PokeHelper.makeProviderKey(type, qualifier);
Component targetComponent = getRootComponent().componentLocator.get(key);
Provider provider = null;
if (targetComponent... | [
"protected",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"findProvider",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"Annotation",
"qualifier",
")",
"throws",
"ProviderMissingException",
"{",
"String",
"key",
"=",
"PokeHelper",
".",
"makeProviderKey",
"(",
"type... | Find the provider specified by the type and qualifier. It will look through the providers
registered to this component and all its children components'.
@param type The type the provider is associated with
@param qualifier The qualifier the provider is associated with
@return The provider
@throws ProviderMissingExcepti... | [
"Find",
"the",
"provider",
"specified",
"by",
"the",
"type",
"and",
"qualifier",
".",
"It",
"will",
"look",
"through",
"the",
"providers",
"registered",
"to",
"this",
"component",
"and",
"all",
"its",
"children",
"components",
"."
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Component.java#L493-L507 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Component.java | Component.addNewKeyToComponent | private void addNewKeyToComponent(String key, Component component) throws ProviderConflictException {
Component root = getRootComponent();
if (componentLocator.keySet().contains(key)) {
String msg = String.format("Type %s has already been registered " +
"in this componen... | java | private void addNewKeyToComponent(String key, Component component) throws ProviderConflictException {
Component root = getRootComponent();
if (componentLocator.keySet().contains(key)) {
String msg = String.format("Type %s has already been registered " +
"in this componen... | [
"private",
"void",
"addNewKeyToComponent",
"(",
"String",
"key",
",",
"Component",
"component",
")",
"throws",
"ProviderConflictException",
"{",
"Component",
"root",
"=",
"getRootComponent",
"(",
")",
";",
"if",
"(",
"componentLocator",
".",
"keySet",
"(",
")",
... | Add key to the component locator of the component. This component and the the component tree
root's component locator will both be updated.
@param key The key to add
@param component The component whose providers directly contain the key
@throws ProviderConflictException The key has been added to the component or the c... | [
"Add",
"key",
"to",
"the",
"component",
"locator",
"of",
"the",
"component",
".",
"This",
"component",
"and",
"the",
"the",
"component",
"tree",
"root",
"s",
"component",
"locator",
"will",
"both",
"be",
"updated",
"."
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Component.java#L535-L555 | train |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/MvcGraph.java | MvcGraph.release | public void release(final Object target) {
if (uiThreadRunner.isOnUiThread()) {
try {
graph.release(target, Inject.class);
} catch (ProviderMissingException e) {
throw new MvcGraphException(e.getMessage(), e);
}
} else {
uiT... | java | public void release(final Object target) {
if (uiThreadRunner.isOnUiThread()) {
try {
graph.release(target, Inject.class);
} catch (ProviderMissingException e) {
throw new MvcGraphException(e.getMessage(), e);
}
} else {
uiT... | [
"public",
"void",
"release",
"(",
"final",
"Object",
"target",
")",
"{",
"if",
"(",
"uiThreadRunner",
".",
"isOnUiThread",
"(",
")",
")",
"{",
"try",
"{",
"graph",
".",
"release",
"(",
"target",
",",
"Inject",
".",
"class",
")",
";",
"}",
"catch",
"(... | Release cached instances held by fields of target object. References of instances of the
instances will be decremented. Once the reference count of a contract type reaches 0, it will
be removed from the instances.
@param target of which the object fields will be released. | [
"Release",
"cached",
"instances",
"held",
"by",
"fields",
"of",
"target",
"object",
".",
"References",
"of",
"instances",
"of",
"the",
"instances",
"will",
"be",
"decremented",
".",
"Once",
"the",
"reference",
"count",
"of",
"a",
"contract",
"type",
"reaches",... | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/MvcGraph.java#L379-L398 | train |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java | Navigator.go | private void go() {
if (navigateEvent != null) {
navigationManager.postEvent2C(navigateEvent);
if (navigationManager.logger.isTraceEnabled()) {
if (navigateEvent instanceof NavigationManager.Event.OnLocationForward) {
NavigationManager.Event.OnLocatio... | java | private void go() {
if (navigateEvent != null) {
navigationManager.postEvent2C(navigateEvent);
if (navigationManager.logger.isTraceEnabled()) {
if (navigateEvent instanceof NavigationManager.Event.OnLocationForward) {
NavigationManager.Event.OnLocatio... | [
"private",
"void",
"go",
"(",
")",
"{",
"if",
"(",
"navigateEvent",
"!=",
"null",
")",
"{",
"navigationManager",
".",
"postEvent2C",
"(",
"navigateEvent",
")",
";",
"if",
"(",
"navigationManager",
".",
"logger",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
... | Sends out the navigation event to execute the navigation | [
"Sends",
"out",
"the",
"navigation",
"event",
"to",
"execute",
"the",
"navigation"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java#L406-L434 | train |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java | Navigator.destroy | void destroy() {
if (onSettled != null) {
onSettled.run();
}
if (pendingReleaseInstances != null) {
for (PendingReleaseInstance i : pendingReleaseInstances) {
try {
Mvc.graph().dereference(i.instance, i.type, i.qualifier);
... | java | void destroy() {
if (onSettled != null) {
onSettled.run();
}
if (pendingReleaseInstances != null) {
for (PendingReleaseInstance i : pendingReleaseInstances) {
try {
Mvc.graph().dereference(i.instance, i.type, i.qualifier);
... | [
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"onSettled",
"!=",
"null",
")",
"{",
"onSettled",
".",
"run",
"(",
")",
";",
"}",
"if",
"(",
"pendingReleaseInstances",
"!=",
"null",
")",
"{",
"for",
"(",
"PendingReleaseInstance",
"i",
":",
"pendingReleaseIn... | Internal use. Don't do it in your app. | [
"Internal",
"use",
".",
"Don",
"t",
"do",
"it",
"in",
"your",
"app",
"."
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java#L439-L455 | train |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java | Navigator.checkAppExit | private void checkAppExit(Object sender) {
NavLocation curLocation = navigationManager.getModel().getCurrentLocation();
if (curLocation == null) {
navigationManager.postEvent2C(new NavigationManager.Event.OnAppExit(sender));
}
} | java | private void checkAppExit(Object sender) {
NavLocation curLocation = navigationManager.getModel().getCurrentLocation();
if (curLocation == null) {
navigationManager.postEvent2C(new NavigationManager.Event.OnAppExit(sender));
}
} | [
"private",
"void",
"checkAppExit",
"(",
"Object",
"sender",
")",
"{",
"NavLocation",
"curLocation",
"=",
"navigationManager",
".",
"getModel",
"(",
")",
".",
"getCurrentLocation",
"(",
")",
";",
"if",
"(",
"curLocation",
"==",
"null",
")",
"{",
"navigationMana... | Check the app is exiting
@param sender The sender | [
"Check",
"the",
"app",
"is",
"exiting"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java#L462-L467 | train |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java | Navigator.dumpHistory | private void dumpHistory() {
if (navigationManager.dumpHistoryOnLocationChange) {
navigationManager.logger.trace("");
navigationManager.logger.trace("Nav Controller: dump: begin ---------------------------------------------->");
NavLocation curLoc = navigationManager.getModel... | java | private void dumpHistory() {
if (navigationManager.dumpHistoryOnLocationChange) {
navigationManager.logger.trace("");
navigationManager.logger.trace("Nav Controller: dump: begin ---------------------------------------------->");
NavLocation curLoc = navigationManager.getModel... | [
"private",
"void",
"dumpHistory",
"(",
")",
"{",
"if",
"(",
"navigationManager",
".",
"dumpHistoryOnLocationChange",
")",
"{",
"navigationManager",
".",
"logger",
".",
"trace",
"(",
"\"\"",
")",
";",
"navigationManager",
".",
"logger",
".",
"trace",
"(",
"\"Na... | Prints navigation history | [
"Prints",
"navigation",
"history"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Navigator.java#L472-L484 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Provider.java | Provider.retain | void retain(Object owner, Field field) {
retain();
Map<String, Integer> fields = owners.get(owner);
if (fields == null) {
fields = new HashMap<>();
owners.put(owner, fields);
}
Integer count = fields.get(field.toGenericString());
if (count == null... | java | void retain(Object owner, Field field) {
retain();
Map<String, Integer> fields = owners.get(owner);
if (fields == null) {
fields = new HashMap<>();
owners.put(owner, fields);
}
Integer count = fields.get(field.toGenericString());
if (count == null... | [
"void",
"retain",
"(",
"Object",
"owner",
",",
"Field",
"field",
")",
"{",
"retain",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Integer",
">",
"fields",
"=",
"owners",
".",
"get",
"(",
"owner",
")",
";",
"if",
"(",
"fields",
"==",
"null",
")",
"{... | Retain an instance injected as a field of an object
@param owner The owner of the field
@param field The field | [
"Retain",
"an",
"instance",
"injected",
"as",
"a",
"field",
"of",
"an",
"object"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Provider.java#L188-L203 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Provider.java | Provider.release | void release(Object owner, Field field) {
Map<String, Integer> fields = owners.get(owner);
if(fields != null) {
release();
Integer count = fields.get(field.toGenericString());
if(--count > 0) {
fields.put(field.toGenericString(), count);
}... | java | void release(Object owner, Field field) {
Map<String, Integer> fields = owners.get(owner);
if(fields != null) {
release();
Integer count = fields.get(field.toGenericString());
if(--count > 0) {
fields.put(field.toGenericString(), count);
}... | [
"void",
"release",
"(",
"Object",
"owner",
",",
"Field",
"field",
")",
"{",
"Map",
"<",
"String",
",",
"Integer",
">",
"fields",
"=",
"owners",
".",
"get",
"(",
"owner",
")",
";",
"if",
"(",
"fields",
"!=",
"null",
")",
"{",
"release",
"(",
")",
... | Release an instance injected as a field of an object
@param owner The owner of the field
@param field The field | [
"Release",
"an",
"instance",
"injected",
"as",
"a",
"field",
"of",
"an",
"object"
] | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Provider.java#L232-L248 | train |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/Provider.java | Provider.getCachedInstance | public T getCachedInstance() {
ScopeCache cache = getScopeCache();
if (cache != null) {
String key = PokeHelper.makeProviderKey(type, qualifier);
Object instance = cache.findInstance(key);
if(instance != null) {
return (T) instance;
}
... | java | public T getCachedInstance() {
ScopeCache cache = getScopeCache();
if (cache != null) {
String key = PokeHelper.makeProviderKey(type, qualifier);
Object instance = cache.findInstance(key);
if(instance != null) {
return (T) instance;
}
... | [
"public",
"T",
"getCachedInstance",
"(",
")",
"{",
"ScopeCache",
"cache",
"=",
"getScopeCache",
"(",
")",
";",
"if",
"(",
"cache",
"!=",
"null",
")",
"{",
"String",
"key",
"=",
"PokeHelper",
".",
"makeProviderKey",
"(",
"type",
",",
"qualifier",
")",
";"... | Get the cached instance of this provider when there is a instances associated with this provider
and the instance is cached already. Note that, the method will NOT increase reference count of
this provider
@return The cached instance of this provider if there is a instances associated with this provider
and the instanc... | [
"Get",
"the",
"cached",
"instance",
"of",
"this",
"provider",
"when",
"there",
"is",
"a",
"instances",
"associated",
"with",
"this",
"provider",
"and",
"the",
"instance",
"is",
"cached",
"already",
".",
"Note",
"that",
"the",
"method",
"will",
"NOT",
"increa... | c7893f0a13119d64297b9eb2988f7323b7da5bbc | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/Provider.java#L295-L306 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.