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/AbstractListDialogBuilder.java | AbstractListDialogBuilder.setOnItemSelectedListener | public final BuilderType setOnItemSelectedListener(
@Nullable final ListDialog.OnItemSelectedListener listener) {
getProduct().setOnItemSelectedListener(listener);
return self();
} | java | public final BuilderType setOnItemSelectedListener(
@Nullable final ListDialog.OnItemSelectedListener listener) {
getProduct().setOnItemSelectedListener(listener);
return self();
} | [
"public",
"final",
"BuilderType",
"setOnItemSelectedListener",
"(",
"@",
"Nullable",
"final",
"ListDialog",
".",
"OnItemSelectedListener",
"listener",
")",
"{",
"getProduct",
"(",
")",
".",
"setOnItemSelectedListener",
"(",
"listener",
")",
";",
"return",
"self",
"(... | Sets the listener, which should be notified, when an item, which is shown by the dialog,
which is created by the builder, is selected.
@param listener
The listener, which should be set, as an instance of the type {@link
ListDialog.OnItemSelectedListener} or null, if no listener should be notified
@return The builder, ... | [
"Sets",
"the",
"listener",
"which",
"should",
"be",
"notified",
"when",
"an",
"item",
"which",
"is",
"shown",
"by",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"is",
"selected",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractListDialogBuilder.java#L386-L390 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.addAreas | private void addAreas() {
if (areas != null) {
removeAllViews();
scrollView = null;
topDivider = null;
bottomDivider = null;
Area previousArea = null;
boolean canAddTopDivider = false;
for (Map.Entry<Area, View> entry : areas.e... | java | private void addAreas() {
if (areas != null) {
removeAllViews();
scrollView = null;
topDivider = null;
bottomDivider = null;
Area previousArea = null;
boolean canAddTopDivider = false;
for (Map.Entry<Area, View> entry : areas.e... | [
"private",
"void",
"addAreas",
"(",
")",
"{",
"if",
"(",
"areas",
"!=",
"null",
")",
"{",
"removeAllViews",
"(",
")",
";",
"scrollView",
"=",
"null",
";",
"topDivider",
"=",
"null",
";",
"bottomDivider",
"=",
"null",
";",
"Area",
"previousArea",
"=",
"... | Adds the areas, which are contained by the dialog, to the root view. | [
"Adds",
"the",
"areas",
"which",
"are",
"contained",
"by",
"the",
"dialog",
"to",
"the",
"root",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L363-L407 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.addDividers | private void addDividers() {
for (Map.Entry<DividerLocation, Divider> entry : dividers.entrySet()) {
if (entry.getKey() == DividerLocation.BOTTOM && bottomDivider == null &&
!scrollableArea.isScrollable(Area.BUTTON_BAR)) {
bottomDivider = entry.getValue();
... | java | private void addDividers() {
for (Map.Entry<DividerLocation, Divider> entry : dividers.entrySet()) {
if (entry.getKey() == DividerLocation.BOTTOM && bottomDivider == null &&
!scrollableArea.isScrollable(Area.BUTTON_BAR)) {
bottomDivider = entry.getValue();
... | [
"private",
"void",
"addDividers",
"(",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"DividerLocation",
",",
"Divider",
">",
"entry",
":",
"dividers",
".",
"entrySet",
"(",
")",
")",
"{",
"if",
"(",
"entry",
".",
"getKey",
"(",
")",
"==",
"DividerL... | Adds the dividers, which are contained by the dialog, to the root view. | [
"Adds",
"the",
"dividers",
"which",
"are",
"contained",
"by",
"the",
"dialog",
"to",
"the",
"root",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L452-L462 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.addDivider | @NonNull
private Divider addDivider() {
Divider divider = new Divider(getContext());
divider.setVisibility(View.INVISIBLE);
divider.setBackgroundColor(dividerColor);
LayoutParams layoutParams =
new LayoutParams(LayoutParams.MATCH_PARENT, dpToPixels(getContext(), 1));
... | java | @NonNull
private Divider addDivider() {
Divider divider = new Divider(getContext());
divider.setVisibility(View.INVISIBLE);
divider.setBackgroundColor(dividerColor);
LayoutParams layoutParams =
new LayoutParams(LayoutParams.MATCH_PARENT, dpToPixels(getContext(), 1));
... | [
"@",
"NonNull",
"private",
"Divider",
"addDivider",
"(",
")",
"{",
"Divider",
"divider",
"=",
"new",
"Divider",
"(",
"getContext",
"(",
")",
")",
";",
"divider",
".",
"setVisibility",
"(",
"View",
".",
"INVISIBLE",
")",
";",
"divider",
".",
"setBackgroundC... | Adds a divider to the view.
@return The divider, which has been added to the view, as an instance of the class {@link
Divider}. The divider may not be null | [
"Adds",
"a",
"divider",
"to",
"the",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L470-L481 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.adaptAreaPadding | private void adaptAreaPadding() {
if (areas != null) {
boolean paddingTopApplied = false;
Area previousArea = null;
View previousView = null;
int scrollViewPaddingTop = 0;
int scrollViewMarginBottom = 0;
Iterator<Map.Entry<Area, View>> iter... | java | private void adaptAreaPadding() {
if (areas != null) {
boolean paddingTopApplied = false;
Area previousArea = null;
View previousView = null;
int scrollViewPaddingTop = 0;
int scrollViewMarginBottom = 0;
Iterator<Map.Entry<Area, View>> iter... | [
"private",
"void",
"adaptAreaPadding",
"(",
")",
"{",
"if",
"(",
"areas",
"!=",
"null",
")",
"{",
"boolean",
"paddingTopApplied",
"=",
"false",
";",
"Area",
"previousArea",
"=",
"null",
";",
"View",
"previousView",
"=",
"null",
";",
"int",
"scrollViewPadding... | Adapts the padding of the areas, which are contained by the dialog. | [
"Adapts",
"the",
"padding",
"of",
"the",
"areas",
"which",
"are",
"contained",
"by",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L486-L534 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.adaptDividerVisibilities | private void adaptDividerVisibilities() {
if (scrollView != null) {
adaptDividerVisibilities(scrollView.isScrolledToTop(), scrollView.isScrolledToBottom(),
false);
} else if (listView != null) {
adaptDividerVisibilities(isListViewScrolledToTop(listView),
... | java | private void adaptDividerVisibilities() {
if (scrollView != null) {
adaptDividerVisibilities(scrollView.isScrolledToTop(), scrollView.isScrolledToBottom(),
false);
} else if (listView != null) {
adaptDividerVisibilities(isListViewScrolledToTop(listView),
... | [
"private",
"void",
"adaptDividerVisibilities",
"(",
")",
"{",
"if",
"(",
"scrollView",
"!=",
"null",
")",
"{",
"adaptDividerVisibilities",
"(",
"scrollView",
".",
"isScrolledToTop",
"(",
")",
",",
"scrollView",
".",
"isScrolledToBottom",
"(",
")",
",",
"false",
... | Adapts the visibility of the top and bottom divider, depending on the state of the dialog's
scroll view. | [
"Adapts",
"the",
"visibility",
"of",
"the",
"top",
"and",
"bottom",
"divider",
"depending",
"on",
"the",
"state",
"of",
"the",
"dialog",
"s",
"scroll",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L577-L585 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.isListViewScrolledToBottom | private boolean isListViewScrolledToBottom(@NonNull final AbsListView scrollView) {
if (scrollView.getCount() > 0 && scrollView.getChildCount() > 0) {
if (scrollView.getLastVisiblePosition() == scrollView.getCount() - 1) {
View child = scrollView.getChildAt(scrollView.getChildCount()... | java | private boolean isListViewScrolledToBottom(@NonNull final AbsListView scrollView) {
if (scrollView.getCount() > 0 && scrollView.getChildCount() > 0) {
if (scrollView.getLastVisiblePosition() == scrollView.getCount() - 1) {
View child = scrollView.getChildAt(scrollView.getChildCount()... | [
"private",
"boolean",
"isListViewScrolledToBottom",
"(",
"@",
"NonNull",
"final",
"AbsListView",
"scrollView",
")",
"{",
"if",
"(",
"scrollView",
".",
"getCount",
"(",
")",
">",
"0",
"&&",
"scrollView",
".",
"getChildCount",
"(",
")",
">",
"0",
")",
"{",
"... | Returns, whether a specific list view is scrolled to the bottom, or not.
@param scrollView
The list view as an instance of the class {@link AbsListView}. The list view may not
be null
@return True, if the given list view is scrolled to the bottom, false otherwise | [
"Returns",
"whether",
"a",
"specific",
"list",
"view",
"is",
"scrolled",
"to",
"the",
"bottom",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L621-L632 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.isListViewScrolledToTop | private boolean isListViewScrolledToTop(@NonNull final AbsListView listView) {
if (listView.getFirstVisiblePosition() == 0) {
if (listView.getChildCount() == 0) {
return true;
} else {
View child = listView.getChildAt(0);
return child == nu... | java | private boolean isListViewScrolledToTop(@NonNull final AbsListView listView) {
if (listView.getFirstVisiblePosition() == 0) {
if (listView.getChildCount() == 0) {
return true;
} else {
View child = listView.getChildAt(0);
return child == nu... | [
"private",
"boolean",
"isListViewScrolledToTop",
"(",
"@",
"NonNull",
"final",
"AbsListView",
"listView",
")",
"{",
"if",
"(",
"listView",
".",
"getFirstVisiblePosition",
"(",
")",
"==",
"0",
")",
"{",
"if",
"(",
"listView",
".",
"getChildCount",
"(",
")",
"... | Returns, whether a specific list view is scrolled to the top, or not.
@param listView
The list view as an instance of the class {@link AbsListView}. The list view may not
be null
@return True, if the given list view is scrolled to the top, false otherwise | [
"Returns",
"whether",
"a",
"specific",
"list",
"view",
"is",
"scrolled",
"to",
"the",
"top",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L642-L653 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.applyDialogPaddingLeft | private void applyDialogPaddingLeft(@NonNull final Area area, @NonNull final View view) {
int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ?
dialogPadding[0] : 0;
view.setPadding(padding, view.getPaddingTop(), view.getPaddingRight(),
vi... | java | private void applyDialogPaddingLeft(@NonNull final Area area, @NonNull final View view) {
int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ?
dialogPadding[0] : 0;
view.setPadding(padding, view.getPaddingTop(), view.getPaddingRight(),
vi... | [
"private",
"void",
"applyDialogPaddingLeft",
"(",
"@",
"NonNull",
"final",
"Area",
"area",
",",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"int",
"padding",
"=",
"area",
"!=",
"Area",
".",
"HEADER",
"&&",
"area",
"!=",
"Area",
".",
"BUTTON_BAR",
... | Applies the dialog's left padding to the view of a specific area.
@param area
The area, the view, the padding should be applied to, corresponds to, as an instance
of the class {@link Area}. The area may not be null
@param view
The view, the padding should be applied to, as an instance of the class {@link View}.
The vi... | [
"Applies",
"the",
"dialog",
"s",
"left",
"padding",
"to",
"the",
"view",
"of",
"a",
"specific",
"area",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L665-L670 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.applyDialogPaddingTop | private boolean applyDialogPaddingTop(@NonNull final Area area, @NonNull final View view) {
if (area != Area.HEADER && area != Area.CONTENT && area != Area.BUTTON_BAR &&
view.getVisibility() == View.VISIBLE) {
view.setPadding(view.getPaddingLeft(), dialogPadding[1], view.getPaddingRi... | java | private boolean applyDialogPaddingTop(@NonNull final Area area, @NonNull final View view) {
if (area != Area.HEADER && area != Area.CONTENT && area != Area.BUTTON_BAR &&
view.getVisibility() == View.VISIBLE) {
view.setPadding(view.getPaddingLeft(), dialogPadding[1], view.getPaddingRi... | [
"private",
"boolean",
"applyDialogPaddingTop",
"(",
"@",
"NonNull",
"final",
"Area",
"area",
",",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"if",
"(",
"area",
"!=",
"Area",
".",
"HEADER",
"&&",
"area",
"!=",
"Area",
".",
"CONTENT",
"&&",
"area",... | Applies the dialog's top padding to the view of a specific area.
@param area
The area, the view, the padding should be applied to, corresponds to, as an instance
of the class {@link Area}. The area may not be null
@param view
The view, the padding should be applied to, as an instance of the class {@link View}.
The vie... | [
"Applies",
"the",
"dialog",
"s",
"top",
"padding",
"to",
"the",
"view",
"of",
"a",
"specific",
"area",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L682-L691 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.applyDialogPaddingRight | private void applyDialogPaddingRight(@NonNull final Area area, @NonNull final View view) {
int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ?
dialogPadding[2] : 0;
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), padding,
vi... | java | private void applyDialogPaddingRight(@NonNull final Area area, @NonNull final View view) {
int padding = area != Area.HEADER && area != Area.BUTTON_BAR && area != Area.CONTENT ?
dialogPadding[2] : 0;
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), padding,
vi... | [
"private",
"void",
"applyDialogPaddingRight",
"(",
"@",
"NonNull",
"final",
"Area",
"area",
",",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"int",
"padding",
"=",
"area",
"!=",
"Area",
".",
"HEADER",
"&&",
"area",
"!=",
"Area",
".",
"BUTTON_BAR",
... | Applies the dialog's right padding to the view of a specific area.
@param area
The area, the view, the padding should be applied to, corresponds to, as an instance
of the class {@link Area}. The area may not be null
@param view
The view, the padding should be applied to, as an instance of the class {@link View}.
The v... | [
"Applies",
"the",
"dialog",
"s",
"right",
"padding",
"to",
"the",
"view",
"of",
"a",
"specific",
"area",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L703-L708 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.applyDialogPaddingBottom | private void applyDialogPaddingBottom(@NonNull final Area area, @NonNull final View view) {
if (area != Area.HEADER && area != Area.BUTTON_BAR) {
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(),
dialogPadding[3]);
}
} | java | private void applyDialogPaddingBottom(@NonNull final Area area, @NonNull final View view) {
if (area != Area.HEADER && area != Area.BUTTON_BAR) {
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(),
dialogPadding[3]);
}
} | [
"private",
"void",
"applyDialogPaddingBottom",
"(",
"@",
"NonNull",
"final",
"Area",
"area",
",",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"if",
"(",
"area",
"!=",
"Area",
".",
"HEADER",
"&&",
"area",
"!=",
"Area",
".",
"BUTTON_BAR",
")",
"{",
... | Applies the dialog's bottom padding to the view of a specific area.
@param area
The area, the view, the padding should be applied to, corresponds to, as an instance
of the class {@link Area}. The area may not be null
@param view
The view, the padding should be applied to, as an instance of the class {@link View}.
The ... | [
"Applies",
"the",
"dialog",
"s",
"bottom",
"padding",
"to",
"the",
"view",
"of",
"a",
"specific",
"area",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L720-L725 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.addViewSpacing | @NonNull
private Pair<Integer, Integer> addViewSpacing(@NonNull final Area previousArea,
@NonNull final View previousView,
@NonNull final Area area) {
int scrollViewPaddingTop = 0;
int scrollViewMargi... | java | @NonNull
private Pair<Integer, Integer> addViewSpacing(@NonNull final Area previousArea,
@NonNull final View previousView,
@NonNull final Area area) {
int scrollViewPaddingTop = 0;
int scrollViewMargi... | [
"@",
"NonNull",
"private",
"Pair",
"<",
"Integer",
",",
"Integer",
">",
"addViewSpacing",
"(",
"@",
"NonNull",
"final",
"Area",
"previousArea",
",",
"@",
"NonNull",
"final",
"View",
"previousView",
",",
"@",
"NonNull",
"final",
"Area",
"area",
")",
"{",
"i... | Adds spacing to the view of a specific area. The spacing is added to the view's current
bottom padding.
@param previousArea
The area, the view, the spacing should be applied to, corresponds to, as an instance
of the class {@link Area}. The area may not be null
@param previousView
The view, the spacing should be applie... | [
"Adds",
"spacing",
"to",
"the",
"view",
"of",
"a",
"specific",
"area",
".",
"The",
"spacing",
"is",
"added",
"to",
"the",
"view",
"s",
"current",
"bottom",
"padding",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L742-L774 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.inflateScrollView | private void inflateScrollView(@NonNull final ScrollableArea scrollableArea) {
if (scrollView == null) {
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
scrollView = (ScrollView) layoutInflater
.inflate(R.layout.material_dialog_scroll_view, this, fa... | java | private void inflateScrollView(@NonNull final ScrollableArea scrollableArea) {
if (scrollView == null) {
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
scrollView = (ScrollView) layoutInflater
.inflate(R.layout.material_dialog_scroll_view, this, fa... | [
"private",
"void",
"inflateScrollView",
"(",
"@",
"NonNull",
"final",
"ScrollableArea",
"scrollableArea",
")",
"{",
"if",
"(",
"scrollView",
"==",
"null",
")",
"{",
"LayoutInflater",
"layoutInflater",
"=",
"LayoutInflater",
".",
"from",
"(",
"getContext",
"(",
"... | Inflates the scroll view, which contains the dialog's scrollable areas, if it has not been
inflated yet.
@param scrollableArea
The scrollable area of the dialog, as an instance of the class {@link
ScrollableArea}. The scrollable area may not be null | [
"Inflates",
"the",
"scroll",
"view",
"which",
"contains",
"the",
"dialog",
"s",
"scrollable",
"areas",
"if",
"it",
"has",
"not",
"been",
"inflated",
"yet",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L784-L803 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.createScrollViewChildLayoutListener | @NonNull
private OnGlobalLayoutListener createScrollViewChildLayoutListener() {
return new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
View child = scrollView.getChildAt(0);
int childHeight = child.getHeight();
... | java | @NonNull
private OnGlobalLayoutListener createScrollViewChildLayoutListener() {
return new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
View child = scrollView.getChildAt(0);
int childHeight = child.getHeight();
... | [
"@",
"NonNull",
"private",
"OnGlobalLayoutListener",
"createScrollViewChildLayoutListener",
"(",
")",
"{",
"return",
"new",
"OnGlobalLayoutListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onGlobalLayout",
"(",
")",
"{",
"View",
"child",
"=",
"scrollView... | Creates and returns a listener, which allows to observe, when the child of the dialog's
scroll view has been layouted. If the scroll view's height is greater than necessary, its
height is reduced to match the height of its child.
@return The listener, which has been created, as an instance of the type {@link
OnGlobalL... | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"when",
"the",
"child",
"of",
"the",
"dialog",
"s",
"scroll",
"view",
"has",
"been",
"layouted",
".",
"If",
"the",
"scroll",
"view",
"s",
"height",
"is",
"greater",
"than",
... | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L813-L836 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.createScrollViewScrollListener | @NonNull
private ScrollListener createScrollViewScrollListener() {
return new ScrollListener() {
@Override
public void onScrolled(final boolean scrolledToTop, final boolean scrolledToBottom) {
adaptDividerVisibilities(scrolledToTop, scrolledToBottom, true);
... | java | @NonNull
private ScrollListener createScrollViewScrollListener() {
return new ScrollListener() {
@Override
public void onScrolled(final boolean scrolledToTop, final boolean scrolledToBottom) {
adaptDividerVisibilities(scrolledToTop, scrolledToBottom, true);
... | [
"@",
"NonNull",
"private",
"ScrollListener",
"createScrollViewScrollListener",
"(",
")",
"{",
"return",
"new",
"ScrollListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onScrolled",
"(",
"final",
"boolean",
"scrolledToTop",
",",
"final",
"boolean",
"scr... | Creates and returns a listener, which allows to observe when the scroll view, which is
contained by the dialog, is scrolled.
@return The listener, which has been created, as an instance of the type {@link
OnScrollChangedListener}. The listener may not be null | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"when",
"the",
"scroll",
"view",
"which",
"is",
"contained",
"by",
"the",
"dialog",
"is",
"scrolled",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L845-L855 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.createListViewScrollListener | @NonNull
private AbsListView.OnScrollListener createListViewScrollListener() {
return new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(final AbsListView view, final int scrollState) {
}
@Override
public void onScro... | java | @NonNull
private AbsListView.OnScrollListener createListViewScrollListener() {
return new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(final AbsListView view, final int scrollState) {
}
@Override
public void onScro... | [
"@",
"NonNull",
"private",
"AbsListView",
".",
"OnScrollListener",
"createListViewScrollListener",
"(",
")",
"{",
"return",
"new",
"AbsListView",
".",
"OnScrollListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onScrollStateChanged",
"(",
"final",
"AbsLis... | Creates and returns a listener, which allows to observe the list view, which is contained by
the dialog, is scrolled.
@return The listener, which has been created, as an instance of the type {@link
android.widget.AbsListView.OnScrollListener}. The listener may not be null | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"the",
"list",
"view",
"which",
"is",
"contained",
"by",
"the",
"dialog",
"is",
"scrolled",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L864-L881 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.adaptDividerColor | private void adaptDividerColor() {
adaptDividerColor(topDivider);
adaptDividerColor(bottomDivider);
if (dividers != null) {
for (Divider divider : dividers.values()) {
adaptDividerColor(divider);
}
}
} | java | private void adaptDividerColor() {
adaptDividerColor(topDivider);
adaptDividerColor(bottomDivider);
if (dividers != null) {
for (Divider divider : dividers.values()) {
adaptDividerColor(divider);
}
}
} | [
"private",
"void",
"adaptDividerColor",
"(",
")",
"{",
"adaptDividerColor",
"(",
"topDivider",
")",
";",
"adaptDividerColor",
"(",
"bottomDivider",
")",
";",
"if",
"(",
"dividers",
"!=",
"null",
")",
"{",
"for",
"(",
"Divider",
"divider",
":",
"dividers",
".... | Adapts the color of dividers. | [
"Adapts",
"the",
"color",
"of",
"dividers",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L886-L895 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.adaptDividerMargin | private void adaptDividerMargin() {
adaptDividerMargin(topDivider);
adaptDividerMargin(bottomDivider);
if (dividers != null) {
for (Divider divider : dividers.values()) {
adaptDividerMargin(divider);
}
}
} | java | private void adaptDividerMargin() {
adaptDividerMargin(topDivider);
adaptDividerMargin(bottomDivider);
if (dividers != null) {
for (Divider divider : dividers.values()) {
adaptDividerMargin(divider);
}
}
} | [
"private",
"void",
"adaptDividerMargin",
"(",
")",
"{",
"adaptDividerMargin",
"(",
"topDivider",
")",
";",
"adaptDividerMargin",
"(",
"bottomDivider",
")",
";",
"if",
"(",
"dividers",
"!=",
"null",
")",
"{",
"for",
"(",
"Divider",
"divider",
":",
"dividers",
... | Adapts the left and right margin of dividers. | [
"Adapts",
"the",
"left",
"and",
"right",
"margin",
"of",
"dividers",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L913-L922 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.adaptDividerMargin | private void adaptDividerMargin(@Nullable final Divider divider) {
if (divider != null) {
ViewGroup.LayoutParams layoutParams = divider.getLayoutParams();
if (layoutParams instanceof LayoutParams) {
((LayoutParams) layoutParams).leftMargin = dividerMargin;
... | java | private void adaptDividerMargin(@Nullable final Divider divider) {
if (divider != null) {
ViewGroup.LayoutParams layoutParams = divider.getLayoutParams();
if (layoutParams instanceof LayoutParams) {
((LayoutParams) layoutParams).leftMargin = dividerMargin;
... | [
"private",
"void",
"adaptDividerMargin",
"(",
"@",
"Nullable",
"final",
"Divider",
"divider",
")",
"{",
"if",
"(",
"divider",
"!=",
"null",
")",
"{",
"ViewGroup",
".",
"LayoutParams",
"layoutParams",
"=",
"divider",
".",
"getLayoutParams",
"(",
")",
";",
"if... | Adapts the left and right margin of a specific divider.
@param divider
The divider, whose left and right margin should be adapted, as an instance of the
class {@link Divider} | [
"Adapts",
"the",
"left",
"and",
"right",
"margin",
"of",
"a",
"specific",
"divider",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L931-L940 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.setWindowBackgroundAndInset | public final void setWindowBackgroundAndInset(@Nullable final Drawable windowBackground,
@Nullable final Rect windowInsets) {
this.windowBackground = windowBackground;
this.windowInsets = windowInsets;
adaptWindowBackgroundAndInsets();
} | java | public final void setWindowBackgroundAndInset(@Nullable final Drawable windowBackground,
@Nullable final Rect windowInsets) {
this.windowBackground = windowBackground;
this.windowInsets = windowInsets;
adaptWindowBackgroundAndInsets();
} | [
"public",
"final",
"void",
"setWindowBackgroundAndInset",
"(",
"@",
"Nullable",
"final",
"Drawable",
"windowBackground",
",",
"@",
"Nullable",
"final",
"Rect",
"windowInsets",
")",
"{",
"this",
".",
"windowBackground",
"=",
"windowBackground",
";",
"this",
".",
"w... | Sets the background and inset of the dialog's window.
@param windowBackground
The background, which should be set, as an instance of the class {@link Drawable} or
null, if no window background is set
@param windowInsets
The insets of the dialog's window as an instance of the class {@link Rect} or null,
if no window ba... | [
"Sets",
"the",
"background",
"and",
"inset",
"of",
"the",
"dialog",
"s",
"window",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L1069-L1074 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.setMaxWidth | public final void setMaxWidth(final int maxWidth) {
if (maxWidth != -1) {
Condition.INSTANCE.ensureAtLeast(maxWidth, 1, "The maximum width must be at least 1");
}
this.maxWidth = maxWidth;
requestLayout();
} | java | public final void setMaxWidth(final int maxWidth) {
if (maxWidth != -1) {
Condition.INSTANCE.ensureAtLeast(maxWidth, 1, "The maximum width must be at least 1");
}
this.maxWidth = maxWidth;
requestLayout();
} | [
"public",
"final",
"void",
"setMaxWidth",
"(",
"final",
"int",
"maxWidth",
")",
"{",
"if",
"(",
"maxWidth",
"!=",
"-",
"1",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureAtLeast",
"(",
"maxWidth",
",",
"1",
",",
"\"The maximum width must be at least 1\""... | Sets the maximum width of the view.
@param maxWidth
The maximum width, which should be set, in pixels as an {@link Integer} value. The
maximum width must be at least 1 or -1, if no maximum width should be set | [
"Sets",
"the",
"maximum",
"width",
"of",
"the",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L1094-L1101 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.setMaxHeight | public final void setMaxHeight(final int maxHeight) {
if (maxHeight != -1) {
Condition.INSTANCE.ensureAtLeast(maxHeight, 1, "The maximum height must be at least 1");
}
this.maxHeight = maxHeight;
requestLayout();
} | java | public final void setMaxHeight(final int maxHeight) {
if (maxHeight != -1) {
Condition.INSTANCE.ensureAtLeast(maxHeight, 1, "The maximum height must be at least 1");
}
this.maxHeight = maxHeight;
requestLayout();
} | [
"public",
"final",
"void",
"setMaxHeight",
"(",
"final",
"int",
"maxHeight",
")",
"{",
"if",
"(",
"maxHeight",
"!=",
"-",
"1",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureAtLeast",
"(",
"maxHeight",
",",
"1",
",",
"\"The maximum height must be at least... | Sets the maximum height of the view.
@param maxHeight
The maximum height, which should be set, in pixels as an {@link Integer} value. The
maximum height must be at least 1 or -1, if no maximum height should be set | [
"Sets",
"the",
"maximum",
"height",
"of",
"the",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L1110-L1117 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.setScrollableArea | public final void setScrollableArea(@NonNull final ScrollableArea scrollableArea) {
Condition.INSTANCE.ensureNotNull(scrollableArea, "The scrollable area may not be null");
this.scrollableArea = scrollableArea;
addAreas();
} | java | public final void setScrollableArea(@NonNull final ScrollableArea scrollableArea) {
Condition.INSTANCE.ensureNotNull(scrollableArea, "The scrollable area may not be null");
this.scrollableArea = scrollableArea;
addAreas();
} | [
"public",
"final",
"void",
"setScrollableArea",
"(",
"@",
"NonNull",
"final",
"ScrollableArea",
"scrollableArea",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"scrollableArea",
",",
"\"The scrollable area may not be null\"",
")",
";",
"this",
"."... | Sets the scrollable area of the dialog.
@param scrollableArea
The scrollable area, which should be set, as an instance of the class {@link
ScrollableArea}. The scrollable area may not be null | [
"Sets",
"the",
"scrollable",
"area",
"of",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L1138-L1142 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java | DialogRootView.addAreas | public final void addAreas(@NonNull final Map<ViewType, View> areas) {
this.areas = new TreeMap<>(new AreaComparator());
this.dividers = new HashMap<>();
for (Map.Entry<ViewType, View> entry : areas.entrySet()) {
ViewType viewType = entry.getKey();
View view = entry.getV... | java | public final void addAreas(@NonNull final Map<ViewType, View> areas) {
this.areas = new TreeMap<>(new AreaComparator());
this.dividers = new HashMap<>();
for (Map.Entry<ViewType, View> entry : areas.entrySet()) {
ViewType viewType = entry.getKey();
View view = entry.getV... | [
"public",
"final",
"void",
"addAreas",
"(",
"@",
"NonNull",
"final",
"Map",
"<",
"ViewType",
",",
"View",
">",
"areas",
")",
"{",
"this",
".",
"areas",
"=",
"new",
"TreeMap",
"<>",
"(",
"new",
"AreaComparator",
"(",
")",
")",
";",
"this",
".",
"divid... | Adds the different areas of a dialog to the root view.
@param areas
A map, which contains the areas, which should be added, as keys and their
corresponding views as values, as an instance of the type {@link Map}. The map may
not be null | [
"Adds",
"the",
"different",
"areas",
"of",
"a",
"dialog",
"to",
"the",
"root",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L1189-L1207 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/ViewPager.java | ViewPager.setDialog | public final void setDialog(@NonNull final MaterialDialog dialog) {
Condition.INSTANCE.ensureNotNull(dialog, "The dialog may not be null");
this.dialog = dialog;
} | java | public final void setDialog(@NonNull final MaterialDialog dialog) {
Condition.INSTANCE.ensureNotNull(dialog, "The dialog may not be null");
this.dialog = dialog;
} | [
"public",
"final",
"void",
"setDialog",
"(",
"@",
"NonNull",
"final",
"MaterialDialog",
"dialog",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"dialog",
",",
"\"The dialog may not be null\"",
")",
";",
"this",
".",
"dialog",
"=",
"dialog",
... | Sets the dialog, which contains the view pager.
@param dialog
The dialog, which should be set, as an instance of the type {@link MaterialDialog}.
The dialog may not be null | [
"Sets",
"the",
"dialog",
"which",
"contains",
"the",
"view",
"pager",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/ViewPager.java#L78-L81 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.inflateEditText | private void inflateEditText() {
LayoutInflater inflater = LayoutInflater.from(getContext());
View view = inflater.inflate(R.layout.edit_text_dialog, getRootView(), false);
getDialog().setView(view);
View textInputLayoutView = view.findViewById(R.id.text_input_layout);
textInputL... | java | private void inflateEditText() {
LayoutInflater inflater = LayoutInflater.from(getContext());
View view = inflater.inflate(R.layout.edit_text_dialog, getRootView(), false);
getDialog().setView(view);
View textInputLayoutView = view.findViewById(R.id.text_input_layout);
textInputL... | [
"private",
"void",
"inflateEditText",
"(",
")",
"{",
"LayoutInflater",
"inflater",
"=",
"LayoutInflater",
".",
"from",
"(",
"getContext",
"(",
")",
")",
";",
"View",
"view",
"=",
"inflater",
".",
"inflate",
"(",
"R",
".",
"layout",
".",
"edit_text_dialog",
... | Inflates the dialog's edit text widget. | [
"Inflates",
"the",
"dialog",
"s",
"edit",
"text",
"widget",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L173-L190 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.adaptText | private void adaptText() {
if (editText != null) {
editText.setText(text);
if (text != null) {
editText.setSelection(text.length());
}
}
} | java | private void adaptText() {
if (editText != null) {
editText.setText(text);
if (text != null) {
editText.setSelection(text.length());
}
}
} | [
"private",
"void",
"adaptText",
"(",
")",
"{",
"if",
"(",
"editText",
"!=",
"null",
")",
"{",
"editText",
".",
"setText",
"(",
"text",
")",
";",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"editText",
".",
"setSelection",
"(",
"text",
".",
"length",
... | Adapts the text of the edit text widget, which is contained by the dialog. | [
"Adapts",
"the",
"text",
"of",
"the",
"edit",
"text",
"widget",
"which",
"is",
"contained",
"by",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L195-L203 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.adaptHint | private void adaptHint() {
if (textInputLayout != null) {
textInputLayout.setHint(hint);
} else if (editText != null) {
editText.setHint(hint);
}
} | java | private void adaptHint() {
if (textInputLayout != null) {
textInputLayout.setHint(hint);
} else if (editText != null) {
editText.setHint(hint);
}
} | [
"private",
"void",
"adaptHint",
"(",
")",
"{",
"if",
"(",
"textInputLayout",
"!=",
"null",
")",
"{",
"textInputLayout",
".",
"setHint",
"(",
"hint",
")",
";",
"}",
"else",
"if",
"(",
"editText",
"!=",
"null",
")",
"{",
"editText",
".",
"setHint",
"(",
... | Adapts the hint of the dialog's edit text widget. | [
"Adapts",
"the",
"hint",
"of",
"the",
"dialog",
"s",
"edit",
"text",
"widget",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L208-L214 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.adaptHelperText | private void adaptHelperText() {
if (textInputLayout != null && TextUtils.isEmpty(getText())) {
textInputLayout.setHelperText(helperText);
textInputLayout.setHelperTextEnabled(true);
}
} | java | private void adaptHelperText() {
if (textInputLayout != null && TextUtils.isEmpty(getText())) {
textInputLayout.setHelperText(helperText);
textInputLayout.setHelperTextEnabled(true);
}
} | [
"private",
"void",
"adaptHelperText",
"(",
")",
"{",
"if",
"(",
"textInputLayout",
"!=",
"null",
"&&",
"TextUtils",
".",
"isEmpty",
"(",
"getText",
"(",
")",
")",
")",
"{",
"textInputLayout",
".",
"setHelperText",
"(",
"helperText",
")",
";",
"textInputLayou... | Adapts the helper text of the dialog's edit text widget. | [
"Adapts",
"the",
"helper",
"text",
"of",
"the",
"dialog",
"s",
"edit",
"text",
"widget",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L237-L242 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.showErrorText | private void showErrorText(@Nullable final CharSequence errorText) {
if (textInputLayout != null) {
if (TextUtils.isEmpty(errorText)) {
textInputLayout.setError(null);
textInputLayout.setErrorEnabled(false);
adaptHelperTextColor();
} else {... | java | private void showErrorText(@Nullable final CharSequence errorText) {
if (textInputLayout != null) {
if (TextUtils.isEmpty(errorText)) {
textInputLayout.setError(null);
textInputLayout.setErrorEnabled(false);
adaptHelperTextColor();
} else {... | [
"private",
"void",
"showErrorText",
"(",
"@",
"Nullable",
"final",
"CharSequence",
"errorText",
")",
"{",
"if",
"(",
"textInputLayout",
"!=",
"null",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"errorText",
")",
")",
"{",
"textInputLayout",
".",
... | Shows an error text. | [
"Shows",
"an",
"error",
"text",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L247-L260 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.requestFocus | private void requestFocus() {
Window window = getWindow();
if (window != null) {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
if (editText != null) {
editText.requestFocus();
}
} | java | private void requestFocus() {
Window window = getWindow();
if (window != null) {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
if (editText != null) {
editText.requestFocus();
}
} | [
"private",
"void",
"requestFocus",
"(",
")",
"{",
"Window",
"window",
"=",
"getWindow",
"(",
")",
";",
"if",
"(",
"window",
"!=",
"null",
")",
"{",
"window",
".",
"setSoftInputMode",
"(",
"WindowManager",
".",
"LayoutParams",
".",
"SOFT_INPUT_STATE_ALWAYS_VISI... | Requests the focus and displays the keyboard. | [
"Requests",
"the",
"focus",
"and",
"displays",
"the",
"keyboard",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L265-L275 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.adaptPositiveButtonEnableState | private void adaptPositiveButtonEnableState(final boolean enabled) {
Button button = getDialog().getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setEnabled(enabled);
}
} | java | private void adaptPositiveButtonEnableState(final boolean enabled) {
Button button = getDialog().getButton(DialogInterface.BUTTON_POSITIVE);
if (button != null) {
button.setEnabled(enabled);
}
} | [
"private",
"void",
"adaptPositiveButtonEnableState",
"(",
"final",
"boolean",
"enabled",
")",
"{",
"Button",
"button",
"=",
"getDialog",
"(",
")",
".",
"getButton",
"(",
"DialogInterface",
".",
"BUTTON_POSITIVE",
")",
";",
"if",
"(",
"button",
"!=",
"null",
")... | Adapts the enable state of the dialog's positive button.
@param enabled
True, if the button should be enabled, false otherwise | [
"Adapts",
"the",
"enable",
"state",
"of",
"the",
"dialog",
"s",
"positive",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L283-L289 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.createTextChangedListener | @NonNull
private TextWatcher createTextChangedListener() {
return new TextWatcher() {
@Override
public void beforeTextChanged(final CharSequence text, final int start, final int count,
final int after) {
}
@Override... | java | @NonNull
private TextWatcher createTextChangedListener() {
return new TextWatcher() {
@Override
public void beforeTextChanged(final CharSequence text, final int start, final int count,
final int after) {
}
@Override... | [
"@",
"NonNull",
"private",
"TextWatcher",
"createTextChangedListener",
"(",
")",
"{",
"return",
"new",
"TextWatcher",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"beforeTextChanged",
"(",
"final",
"CharSequence",
"text",
",",
"final",
"int",
"start",
",",
... | Creates and returns a listener, which allows to observe when the text of the dialog's edit
text has changed.
@return The listener, which has been created, as an instance of the type {@link TextWatcher}.
The listener may not be null | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"when",
"the",
"text",
"of",
"the",
"dialog",
"s",
"edit",
"text",
"has",
"changed",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L308-L334 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.createFocusChangeListener | @NonNull
private View.OnFocusChangeListener createFocusChangeListener() {
return new View.OnFocusChangeListener() {
@Override
public void onFocusChange(final View v, final boolean hasFocus) {
if (!hasFocus && validateOnFocusLost) {
validate();
... | java | @NonNull
private View.OnFocusChangeListener createFocusChangeListener() {
return new View.OnFocusChangeListener() {
@Override
public void onFocusChange(final View v, final boolean hasFocus) {
if (!hasFocus && validateOnFocusLost) {
validate();
... | [
"@",
"NonNull",
"private",
"View",
".",
"OnFocusChangeListener",
"createFocusChangeListener",
"(",
")",
"{",
"return",
"new",
"View",
".",
"OnFocusChangeListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onFocusChange",
"(",
"final",
"View",
"v",
",",... | Creates and returns a listener, which allows to validate the dialog's edit text widget when
its focus got lost.
@return The listener, which has been created, as an instance of the type {@link
View.OnFocusChangeListener}. The listener may not be null | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"validate",
"the",
"dialog",
"s",
"edit",
"text",
"widget",
"when",
"its",
"focus",
"got",
"lost",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L352-L364 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java | EditTextDialogDecorator.notifyOnValidationFailure | private void notifyOnValidationFailure(@NonNull final Validator<CharSequence> validator) {
for (ValidationListener<CharSequence> validationListener : validationListeners) {
validationListener.onValidationFailure(this, validator);
}
} | java | private void notifyOnValidationFailure(@NonNull final Validator<CharSequence> validator) {
for (ValidationListener<CharSequence> validationListener : validationListeners) {
validationListener.onValidationFailure(this, validator);
}
} | [
"private",
"void",
"notifyOnValidationFailure",
"(",
"@",
"NonNull",
"final",
"Validator",
"<",
"CharSequence",
">",
"validator",
")",
"{",
"for",
"(",
"ValidationListener",
"<",
"CharSequence",
">",
"validationListener",
":",
"validationListeners",
")",
"{",
"valid... | Notifies the listeners that the validation of the dialog's edit text widget has failed.
@param validator
The validator, which caused the validation to fail, as an instance of the type {@link
Validator}. The validator may not be null | [
"Notifies",
"the",
"listeners",
"that",
"the",
"validation",
"of",
"the",
"dialog",
"s",
"edit",
"text",
"widget",
"has",
"failed",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/EditTextDialogDecorator.java#L373-L377 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.inflateListView | private void inflateListView(@NonNull final ViewGroup contentContainer) {
View listView = contentContainer.findViewById(android.R.id.list);
this.listView = listView instanceof RecyclerView ? (RecyclerView) listView : null;
if (this.listView == null && !getDialog().isCustomViewUsed()) {
... | java | private void inflateListView(@NonNull final ViewGroup contentContainer) {
View listView = contentContainer.findViewById(android.R.id.list);
this.listView = listView instanceof RecyclerView ? (RecyclerView) listView : null;
if (this.listView == null && !getDialog().isCustomViewUsed()) {
... | [
"private",
"void",
"inflateListView",
"(",
"@",
"NonNull",
"final",
"ViewGroup",
"contentContainer",
")",
"{",
"View",
"listView",
"=",
"contentContainer",
".",
"findViewById",
"(",
"android",
".",
"R",
".",
"id",
".",
"list",
")",
";",
"this",
".",
"listVie... | Inflates the list view, which is used to show the dialog's list items.
@param contentContainer
The view group, which contains the dialog's content, as an instance of the class
{@link ViewGroup}. The view group may not be null | [
"Inflates",
"the",
"list",
"view",
"which",
"is",
"used",
"to",
"show",
"the",
"dialog",
"s",
"list",
"items",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L179-L196 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.attachAdapter | private void attachAdapter() {
if (listView != null) {
if (adapter != null) {
listView.setHasFixedSize(false);
listView.setLayoutManager(layoutManager);
listView.setAdapter(adapter);
listView.setVisibility(adapter != null ? View.VISIBLE... | java | private void attachAdapter() {
if (listView != null) {
if (adapter != null) {
listView.setHasFixedSize(false);
listView.setLayoutManager(layoutManager);
listView.setAdapter(adapter);
listView.setVisibility(adapter != null ? View.VISIBLE... | [
"private",
"void",
"attachAdapter",
"(",
")",
"{",
"if",
"(",
"listView",
"!=",
"null",
")",
"{",
"if",
"(",
"adapter",
"!=",
"null",
")",
"{",
"listView",
".",
"setHasFixedSize",
"(",
"false",
")",
";",
"listView",
".",
"setLayoutManager",
"(",
"layoutM... | Attaches the adapter to the dialog's list view. | [
"Attaches",
"the",
"adapter",
"to",
"the",
"dialog",
"s",
"list",
"view",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L201-L221 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.initializeCheckedItems | private void initializeCheckedItems() {
if (checkedItems != null) {
for (int i = 0; i < checkedItems.length; i++) {
adapter.setItemChecked(i, checkedItems[i]);
}
}
} | java | private void initializeCheckedItems() {
if (checkedItems != null) {
for (int i = 0; i < checkedItems.length; i++) {
adapter.setItemChecked(i, checkedItems[i]);
}
}
} | [
"private",
"void",
"initializeCheckedItems",
"(",
")",
"{",
"if",
"(",
"checkedItems",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"checkedItems",
".",
"length",
";",
"i",
"++",
")",
"{",
"adapter",
".",
"setItemChecked",
... | Initializes the list items, which are checked by default. | [
"Initializes",
"the",
"list",
"items",
"which",
"are",
"checked",
"by",
"default",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L226-L232 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.getCheckedItems | @Nullable
private boolean[] getCheckedItems() {
if (listView != null && adapter != null) {
boolean[] result = new boolean[adapter.getItemCount()];
for (int i = 0; i < result.length; i++) {
result[i] = adapter.isItemChecked(i);
}
return result... | java | @Nullable
private boolean[] getCheckedItems() {
if (listView != null && adapter != null) {
boolean[] result = new boolean[adapter.getItemCount()];
for (int i = 0; i < result.length; i++) {
result[i] = adapter.isItemChecked(i);
}
return result... | [
"@",
"Nullable",
"private",
"boolean",
"[",
"]",
"getCheckedItems",
"(",
")",
"{",
"if",
"(",
"listView",
"!=",
"null",
"&&",
"adapter",
"!=",
"null",
")",
"{",
"boolean",
"[",
"]",
"result",
"=",
"new",
"boolean",
"[",
"adapter",
".",
"getItemCount",
... | Returns an array, which identifies the currently checked list items.
@return An array, which identifies the currently checked list items, as {@link Boolean} array | [
"Returns",
"an",
"array",
"which",
"identifies",
"the",
"currently",
"checked",
"list",
"items",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L239-L252 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.initializeSelectionListener | private void initializeSelectionListener() {
ChoiceMode choiceMode = adapter.getChoiceMode();
if (choiceMode instanceof MultipleChoiceMode) {
adapter.setOnItemClickListener(
new OnMultiChoiceClickListenerWrapper(multiChoiceListener, getDialog(), 0));
} else if (c... | java | private void initializeSelectionListener() {
ChoiceMode choiceMode = adapter.getChoiceMode();
if (choiceMode instanceof MultipleChoiceMode) {
adapter.setOnItemClickListener(
new OnMultiChoiceClickListenerWrapper(multiChoiceListener, getDialog(), 0));
} else if (c... | [
"private",
"void",
"initializeSelectionListener",
"(",
")",
"{",
"ChoiceMode",
"choiceMode",
"=",
"adapter",
".",
"getChoiceMode",
"(",
")",
";",
"if",
"(",
"choiceMode",
"instanceof",
"MultipleChoiceMode",
")",
"{",
"adapter",
".",
"setOnItemClickListener",
"(",
... | Initializes the listener, which should be notified, when the selection of a list item of the
dialog has been changed. | [
"Initializes",
"the",
"listener",
"which",
"should",
"be",
"notified",
"when",
"the",
"selection",
"of",
"a",
"list",
"item",
"of",
"the",
"dialog",
"has",
"been",
"changed",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L258-L272 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.adaptItemColor | private void adaptItemColor() {
if (adapter != null) {
RecyclerView.Adapter<?> wrappedAdapter = adapter.getWrappedAdapter();
if (wrappedAdapter instanceof ArrayRecyclerViewAdapter) {
((ArrayRecyclerViewAdapter) wrappedAdapter).setItemColor(itemColor);
}
... | java | private void adaptItemColor() {
if (adapter != null) {
RecyclerView.Adapter<?> wrappedAdapter = adapter.getWrappedAdapter();
if (wrappedAdapter instanceof ArrayRecyclerViewAdapter) {
((ArrayRecyclerViewAdapter) wrappedAdapter).setItemColor(itemColor);
}
... | [
"private",
"void",
"adaptItemColor",
"(",
")",
"{",
"if",
"(",
"adapter",
"!=",
"null",
")",
"{",
"RecyclerView",
".",
"Adapter",
"<",
"?",
">",
"wrappedAdapter",
"=",
"adapter",
".",
"getWrappedAdapter",
"(",
")",
";",
"if",
"(",
"wrappedAdapter",
"instan... | Adapts the color of the dialog's list items. | [
"Adapts",
"the",
"color",
"of",
"the",
"dialog",
"s",
"list",
"items",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L277-L285 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java | ListDialogDecorator.adaptItemTypeface | private void adaptItemTypeface() {
if (adapter != null && itemTypeface != null) {
RecyclerView.Adapter<?> wrappedAdapter = adapter.getWrappedAdapter();
if (wrappedAdapter instanceof ArrayRecyclerViewAdapter) {
((ArrayRecyclerViewAdapter) wrappedAdapter).setItemTypeface(i... | java | private void adaptItemTypeface() {
if (adapter != null && itemTypeface != null) {
RecyclerView.Adapter<?> wrappedAdapter = adapter.getWrappedAdapter();
if (wrappedAdapter instanceof ArrayRecyclerViewAdapter) {
((ArrayRecyclerViewAdapter) wrappedAdapter).setItemTypeface(i... | [
"private",
"void",
"adaptItemTypeface",
"(",
")",
"{",
"if",
"(",
"adapter",
"!=",
"null",
"&&",
"itemTypeface",
"!=",
"null",
")",
"{",
"RecyclerView",
".",
"Adapter",
"<",
"?",
">",
"wrappedAdapter",
"=",
"adapter",
".",
"getWrappedAdapter",
"(",
")",
";... | Adapts the typeface of the dialog's list items. | [
"Adapts",
"the",
"typeface",
"of",
"the",
"dialog",
"s",
"list",
"items",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L290-L298 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptButtonBar | private void adaptButtonBar() {
if (buttonBarContainer != null) {
inflateButtonBar();
adaptPositiveButton();
adaptNegativeButton();
adaptNeutralButton();
adaptButtonTextColor();
adaptButtonTypeface();
adaptButtonBarContainerVisi... | java | private void adaptButtonBar() {
if (buttonBarContainer != null) {
inflateButtonBar();
adaptPositiveButton();
adaptNegativeButton();
adaptNeutralButton();
adaptButtonTextColor();
adaptButtonTypeface();
adaptButtonBarContainerVisi... | [
"private",
"void",
"adaptButtonBar",
"(",
")",
"{",
"if",
"(",
"buttonBarContainer",
"!=",
"null",
")",
"{",
"inflateButtonBar",
"(",
")",
";",
"adaptPositiveButton",
"(",
")",
";",
"adaptNegativeButton",
"(",
")",
";",
"adaptNeutralButton",
"(",
")",
";",
"... | Adapts the button bar. | [
"Adapts",
"the",
"button",
"bar",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L238-L249 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptButtonTypeface | private void adaptButtonTypeface() {
if (buttonTypeface != null) {
if (positiveButton != null) {
positiveButton.setTypeface(buttonTypeface);
}
if (neutralButton != null) {
neutralButton.setTypeface(buttonTypeface);
}
i... | java | private void adaptButtonTypeface() {
if (buttonTypeface != null) {
if (positiveButton != null) {
positiveButton.setTypeface(buttonTypeface);
}
if (neutralButton != null) {
neutralButton.setTypeface(buttonTypeface);
}
i... | [
"private",
"void",
"adaptButtonTypeface",
"(",
")",
"{",
"if",
"(",
"buttonTypeface",
"!=",
"null",
")",
"{",
"if",
"(",
"positiveButton",
"!=",
"null",
")",
"{",
"positiveButton",
".",
"setTypeface",
"(",
"buttonTypeface",
")",
";",
"}",
"if",
"(",
"neutr... | Adapts the typeface of the dialog's buttons. | [
"Adapts",
"the",
"typeface",
"of",
"the",
"dialog",
"s",
"buttons",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L273-L287 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptPositiveButton | private void adaptPositiveButton() {
if (positiveButton != null) {
positiveButton.setText(positiveButtonText != null ?
positiveButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListe... | java | private void adaptPositiveButton() {
if (positiveButton != null) {
positiveButton.setText(positiveButtonText != null ?
positiveButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListe... | [
"private",
"void",
"adaptPositiveButton",
"(",
")",
"{",
"if",
"(",
"positiveButton",
"!=",
"null",
")",
"{",
"positiveButton",
".",
"setText",
"(",
"positiveButtonText",
"!=",
"null",
"?",
"positiveButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"... | Adapts the dialog's positive button. | [
"Adapts",
"the",
"dialog",
"s",
"positive",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L292-L304 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptNeutralButton | private void adaptNeutralButton() {
if (neutralButton != null) {
neutralButton.setText(neutralButtonText != null ?
neutralButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListenerWr... | java | private void adaptNeutralButton() {
if (neutralButton != null) {
neutralButton.setText(neutralButtonText != null ?
neutralButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListenerWr... | [
"private",
"void",
"adaptNeutralButton",
"(",
")",
"{",
"if",
"(",
"neutralButton",
"!=",
"null",
")",
"{",
"neutralButton",
".",
"setText",
"(",
"neutralButtonText",
"!=",
"null",
"?",
"neutralButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"(",
... | Adapts the dialog's neutral button. | [
"Adapts",
"the",
"dialog",
"s",
"neutral",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L309-L321 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptNegativeButton | private void adaptNegativeButton() {
if (negativeButton != null) {
negativeButton.setText(negativeButtonText != null ?
negativeButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListe... | java | private void adaptNegativeButton() {
if (negativeButton != null) {
negativeButton.setText(negativeButtonText != null ?
negativeButtonText.toString().toUpperCase(Locale.getDefault()) : null);
OnClickListenerWrapper onClickListener =
new OnClickListe... | [
"private",
"void",
"adaptNegativeButton",
"(",
")",
"{",
"if",
"(",
"negativeButton",
"!=",
"null",
")",
"{",
"negativeButton",
".",
"setText",
"(",
"negativeButtonText",
"!=",
"null",
"?",
"negativeButtonText",
".",
"toString",
"(",
")",
".",
"toUpperCase",
"... | Adapts the dialog's negative button. | [
"Adapts",
"the",
"dialog",
"s",
"negative",
"button",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L326-L338 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptButtonBarContainerVisibility | private void adaptButtonBarContainerVisibility() {
if (buttonBarContainer != null) {
if (TextUtils.isEmpty(positiveButtonText) && TextUtils.isEmpty(neutralButtonText) &&
TextUtils.isEmpty(negativeButtonText)) {
buttonBarContainer.setVisibility(View.GONE);
... | java | private void adaptButtonBarContainerVisibility() {
if (buttonBarContainer != null) {
if (TextUtils.isEmpty(positiveButtonText) && TextUtils.isEmpty(neutralButtonText) &&
TextUtils.isEmpty(negativeButtonText)) {
buttonBarContainer.setVisibility(View.GONE);
... | [
"private",
"void",
"adaptButtonBarContainerVisibility",
"(",
")",
"{",
"if",
"(",
"buttonBarContainer",
"!=",
"null",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"positiveButtonText",
")",
"&&",
"TextUtils",
".",
"isEmpty",
"(",
"neutralButtonText",
"... | Adapts the visibility of the parent view, which contains the dialog's buttons. | [
"Adapts",
"the",
"visibility",
"of",
"the",
"parent",
"view",
"which",
"contains",
"the",
"dialog",
"s",
"buttons",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java#L343-L352 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/ButtonBarDialogDecorator.java | ButtonBarDialogDecorator.adaptButtonBarDividerVisibility | private void adaptButtonBarDividerVisibility() {
if (buttonBarDivider != null) {
buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
}
} | java | private void adaptButtonBarDividerVisibility() {
if (buttonBarDivider != null) {
buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
}
} | [
"private",
"void",
"adaptButtonBarDividerVisibility",
"(",
")",
"{",
"if",
"(",
"buttonBarDivider",
"!=",
"null",
")",
"{",
"buttonBarDivider",
".",
"setVisibility",
"(",
"showButtonBarDivider",
"?",
"View",
".",
"VISIBLE",
":",
"View",
".",
"GONE",
")",
";",
... | Adapts the visibility of the divider, which is shown above the dialog's buttons. | [
"Adapts",
"the",
"visibility",
"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/ButtonBarDialogDecorator.java#L357-L362 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/adapter/ArrayRecyclerViewAdapter.java | ArrayRecyclerViewAdapter.setItemTypeface | public void setItemTypeface(@NonNull final Typeface typeface) {
Condition.INSTANCE.ensureNotNull(typeface, "The typeface may not be null");
this.itemTypeface = typeface;
notifyDataSetChanged();
} | java | public void setItemTypeface(@NonNull final Typeface typeface) {
Condition.INSTANCE.ensureNotNull(typeface, "The typeface may not be null");
this.itemTypeface = typeface;
notifyDataSetChanged();
} | [
"public",
"void",
"setItemTypeface",
"(",
"@",
"NonNull",
"final",
"Typeface",
"typeface",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"typeface",
",",
"\"The typeface may not be null\"",
")",
";",
"this",
".",
"itemTypeface",
"=",
"typeface... | Sets the typeface of the adapter's items.
@param typeface
The typeface, which should be set, as an instance of the class {@link Typeface}. The
typeface may not be null | [
"Sets",
"the",
"typeface",
"of",
"the",
"adapter",
"s",
"items",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/ArrayRecyclerViewAdapter.java#L148-L152 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.initialize | private void initialize(@StyleRes final int themeResourceId) {
int themeId = themeResourceId;
if (themeId == 0) {
TypedValue typedValue = new TypedValue();
getContext().getTheme().resolveAttribute(R.attr.materialDialogTheme, typedValue, true);
themeId = typedValue.re... | java | private void initialize(@StyleRes final int themeResourceId) {
int themeId = themeResourceId;
if (themeId == 0) {
TypedValue typedValue = new TypedValue();
getContext().getTheme().resolveAttribute(R.attr.materialDialogTheme, typedValue, true);
themeId = typedValue.re... | [
"private",
"void",
"initialize",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"int",
"themeId",
"=",
"themeResourceId",
";",
"if",
"(",
"themeId",
"==",
"0",
")",
"{",
"TypedValue",
"typedValue",
"=",
"new",
"TypedValue",
"(",
")",
";... | Initializes the builder.
@param themeResourceId
The resource id of the theme, which should be used by the dialog, as an {@link
Integer} value or 0, if the default theme should be used | [
"Initializes",
"the",
"builder",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L70-L83 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainFullscreen | private void obtainFullscreen(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogFullscreen});
setFullscreen(typedArray.getBoolean(0, false));
} | java | private void obtainFullscreen(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogFullscreen});
setFullscreen(typedArray.getBoolean(0, false));
} | [
"private",
"void",
"obtainFullscreen",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int"... | Obtains the boolean value, which specified whether the dialog should be shown fullscreen, or
not, from a specific theme.
@param themeResourceId
The resource id of the theme, the boolean value should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"boolean",
"value",
"which",
"specified",
"whether",
"the",
"dialog",
"should",
"be",
"shown",
"fullscreen",
"or",
"not",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L93-L97 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainGravity | private void obtainGravity(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogGravity});
setGravity(typedArray.getInteger(0, Dialog.Gravity.CENTER));
} | java | private void obtainGravity(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogGravity});
setGravity(typedArray.getInteger(0, Dialog.Gravity.CENTER));
} | [
"private",
"void",
"obtainGravity",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",
... | Obtains the gravity from a specific theme.
@param themeResourceId
The resource id of the theme, the gravity should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"gravity",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L106-L110 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainWidth | private void obtainWidth(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogWidth});
int defaultValue = getContext().getResources().getDimensionPixelSize(R.dimen.dialog_width);
... | java | private void obtainWidth(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogWidth});
int defaultValue = getContext().getResources().getDimensionPixelSize(R.dimen.dialog_width);
... | [
"private",
"void",
"obtainWidth",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",
"... | Obtains the width from a specific theme.
@param themeResourceId
The resource id of the theme, the width should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"width",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L119-L129 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainHeight | private void obtainHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogHeight});
int defaultValue = Dialog.WRAP_CONTENT;
try {
setHeight(typedArray.getDi... | java | private void obtainHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogHeight});
int defaultValue = Dialog.WRAP_CONTENT;
try {
setHeight(typedArray.getDi... | [
"private",
"void",
"obtainHeight",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",
... | Obtains the height 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",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L138-L148 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainMaxWidth | private void obtainMaxWidth(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogMaxWidth});
int defaultValue;
try {
defaultValue =
getContex... | java | private void obtainMaxWidth(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogMaxWidth});
int defaultValue;
try {
defaultValue =
getContex... | [
"private",
"void",
"obtainMaxWidth",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",
... | Obtains the maximum width from a specific theme.
@param themeResourceId
The resource id of the theme, the maximum width should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"maximum",
"width",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L157-L174 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainMaxHeight | private void obtainMaxHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogMaxHeight});
int defaultValue;
try {
defaultValue =
getCont... | java | private void obtainMaxHeight(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogMaxHeight});
int defaultValue;
try {
defaultValue =
getCont... | [
"private",
"void",
"obtainMaxHeight",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",... | Obtains the maximum height from a specific theme.
@param themeResourceId
The resource id of the theme, the maximum height should be obtained from, as an
{@link Integer} value | [
"Obtains",
"the",
"maximum",
"height",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L183-L200 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainMargin | private void obtainMargin(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogMarginLeft, R.attr.materialDialogMarginTop,
R.attr.materialDialogMarginRight, R.attr.mat... | java | private void obtainMargin(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogMarginLeft, R.attr.materialDialogMarginTop,
R.attr.materialDialogMarginRight, R.attr.mat... | [
"private",
"void",
"obtainMargin",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int",
... | Obtains the margin from a specific theme.
@param themeResourceId
The resource id of the theme, the margin should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"margin",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L209-L222 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainFitsSystemWindows | private void obtainFitsSystemWindows(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogFitsSystemWindowsLeft,
R.attr.materialDialogFitsSystemWindowsTop,
... | java | private void obtainFitsSystemWindows(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogFitsSystemWindowsLeft,
R.attr.materialDialogFitsSystemWindowsTop,
... | [
"private",
"void",
"obtainFitsSystemWindows",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
... | Obtains, whether the dialog's content should be inset, from a specific theme.
@param themeResourceId
The resource id of the theme, the boolean value, which specifies whether the dialog's
content should be inset, should be obtained from, as a {@link Integer} value | [
"Obtains",
"whether",
"the",
"dialog",
"s",
"content",
"should",
"be",
"inset",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L257-L268 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainWindowBackground | private void obtainWindowBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogWindowBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId !... | java | private void obtainWindowBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogWindowBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId !... | [
"private",
"void",
"obtainWindowBackground",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
... | Obtains the window background from a specific theme.
@param themeResourceId
The resource id of the theme, the window background should be obtained from, as an
{@link Integer} value | [
"Obtains",
"the",
"window",
"background",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L277-L287 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainBackground | private void obtainBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId != 0) {
... | java | private void obtainBackground(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogBackground});
int resourceId = typedArray.getResourceId(0, 0);
if (resourceId != 0) {
... | [
"private",
"void",
"obtainBackground",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int"... | Obtains the background 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",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L296-L307 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainMessageColor | private void obtainMessageColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogMessageColor});
int defaultColor = ThemeUtil
.getColor(getContext(), themeResource... | java | private void obtainMessageColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogMessageColor});
int defaultColor = ThemeUtil
.getColor(getContext(), themeResource... | [
"private",
"void",
"obtainMessageColor",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"in... | Obtains the message color from a specific theme.
@param themeResourceId
The resource id of the theme, the message color should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"message",
"color",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L316-L322 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainTitleColor | private void obtainTitleColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogTitleColor});
int defaultColor =
ThemeUtil.getColor(getContext(), themeResourceId, a... | java | private void obtainTitleColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogTitleColor});
int defaultColor =
ThemeUtil.getColor(getContext(), themeResourceId, a... | [
"private",
"void",
"obtainTitleColor",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"int"... | Obtains the title color from a specific theme.
@param themeResourceId
The resource id of the theme, the title color should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"title",
"color",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L331-L337 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainIconTintList | private void obtainIconTintList(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogIconTint});
setIconTintList(typedArray.getColorStateList(0));
} | java | private void obtainIconTintList(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme()
.obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogIconTint});
setIconTintList(typedArray.getColorStateList(0));
} | [
"private",
"void",
"obtainIconTintList",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"in... | Obtains the color state list, which is used to tint the 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",
"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/AbstractMaterialDialogBuilder.java#L347-L351 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainScrollableArea | private void obtainScrollableArea(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogScrollableAreaTop,
R.attr.materialDialogScrollableAreaBottom});
int topI... | java | private void obtainScrollableArea(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogScrollableAreaTop,
R.attr.materialDialogScrollableAreaBottom});
int topI... | [
"private",
"void",
"obtainScrollableArea",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"... | Obtains the scrollable area from a specific theme.
@param themeResourceId
The resource id of the theme, the scrollable area should be obtained from, as an
{@link Integer} value | [
"Obtains",
"the",
"scrollable",
"area",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L360-L379 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainShowDividersOnScroll | private void obtainShowDividersOnScroll(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowDividersOnScroll});
showDividersOnScroll(typedArray.getBoolean(0, true));
} | java | private void obtainShowDividersOnScroll(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogShowDividersOnScroll});
showDividersOnScroll(typedArray.getBoolean(0, true));
} | [
"private",
"void",
"obtainShowDividersOnScroll",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new... | Obtains, whether the dividers, which are located above and below the dialog's scrollable
areas, should be shown when scrolling, or not, from a specific theme.
@param themeResourceId
The resource id of the theme, the boolean value should be obtained from, as an {@link
Integer} value | [
"Obtains",
"whether",
"the",
"dividers",
"which",
"are",
"located",
"above",
"and",
"below",
"the",
"dialog",
"s",
"scrollable",
"areas",
"should",
"be",
"shown",
"when",
"scrolling",
"or",
"not",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L389-L393 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainDividerColor | private void obtainDividerColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogDividerColor});
int defaultColor = ContextCompat.getColor(getContext(), R.color.divider_color_ligh... | java | private void obtainDividerColor(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogDividerColor});
int defaultColor = ContextCompat.getColor(getContext(), R.color.divider_color_ligh... | [
"private",
"void",
"obtainDividerColor",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"in... | Obtains the color of dividers 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",
"dividers",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L402-L407 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainDividerMargin | private void obtainDividerMargin(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogDividerMargin});
setDividerMargin(typedArray.getDimensionPixelSize(0, 0));
} | java | private void obtainDividerMargin(@StyleRes final int themeResourceId) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(themeResourceId,
new int[]{R.attr.materialDialogDividerMargin});
setDividerMargin(typedArray.getDimensionPixelSize(0, 0));
} | [
"private",
"void",
"obtainDividerMargin",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"TypedArray",
"typedArray",
"=",
"getContext",
"(",
")",
".",
"getTheme",
"(",
")",
".",
"obtainStyledAttributes",
"(",
"themeResourceId",
",",
"new",
"i... | Obtains the left and right margin of dividers from a specific theme.
@param themeResourceId
The resource id of the theme, the margin should be obtained from, as an {@link
Integer} value | [
"Obtains",
"the",
"left",
"and",
"right",
"margin",
"of",
"dividers",
"from",
"a",
"specific",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L416-L420 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.obtainStyledAttributes | @CallSuper
protected void obtainStyledAttributes(@StyleRes final int themeResourceId) {
obtainFullscreen(themeResourceId);
obtainGravity(themeResourceId);
obtainWidth(themeResourceId);
obtainHeight(themeResourceId);
obtainMaxWidth(themeResourceId);
obtainMaxHeight(the... | java | @CallSuper
protected void obtainStyledAttributes(@StyleRes final int themeResourceId) {
obtainFullscreen(themeResourceId);
obtainGravity(themeResourceId);
obtainWidth(themeResourceId);
obtainHeight(themeResourceId);
obtainMaxWidth(themeResourceId);
obtainMaxHeight(the... | [
"@",
"CallSuper",
"protected",
"void",
"obtainStyledAttributes",
"(",
"@",
"StyleRes",
"final",
"int",
"themeResourceId",
")",
"{",
"obtainFullscreen",
"(",
"themeResourceId",
")",
";",
"obtainGravity",
"(",
"themeResourceId",
")",
";",
"obtainWidth",
"(",
"themeRes... | Obtains all relevant attributes from the current theme.
@param themeResourceId
The resource id of the theme, which should be used by the dialog, as an {@link
Integer} value. The resource id must correspond to a valid style resource | [
"Obtains",
"all",
"relevant",
"attributes",
"from",
"the",
"current",
"theme",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L429-L449 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setOnShowListener | public BuilderType setOnShowListener(@Nullable final DialogInterface.OnShowListener listener) {
getProduct().setOnShowListener(listener);
return self();
} | java | public BuilderType setOnShowListener(@Nullable final DialogInterface.OnShowListener listener) {
getProduct().setOnShowListener(listener);
return self();
} | [
"public",
"BuilderType",
"setOnShowListener",
"(",
"@",
"Nullable",
"final",
"DialogInterface",
".",
"OnShowListener",
"listener",
")",
"{",
"getProduct",
"(",
")",
".",
"setOnShowListener",
"(",
"listener",
")",
";",
"return",
"self",
"(",
")",
";",
"}"
] | Sets the listener, which should be notified, when the dialog has been shown.
@param listener
The listener, which should be set, as an instance of the type {@link
DialogInterface.OnShowListener}, or null, if no listener should be set | [
"Sets",
"the",
"listener",
"which",
"should",
"be",
"notified",
"when",
"the",
"dialog",
"has",
"been",
"shown",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L567-L570 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setOnDismissListener | public final BuilderType setOnDismissListener(
@Nullable final DialogInterface.OnDismissListener listener) {
getProduct().setOnDismissListener(listener);
return self();
} | java | public final BuilderType setOnDismissListener(
@Nullable final DialogInterface.OnDismissListener listener) {
getProduct().setOnDismissListener(listener);
return self();
} | [
"public",
"final",
"BuilderType",
"setOnDismissListener",
"(",
"@",
"Nullable",
"final",
"DialogInterface",
".",
"OnDismissListener",
"listener",
")",
"{",
"getProduct",
"(",
")",
".",
"setOnDismissListener",
"(",
"listener",
")",
";",
"return",
"self",
"(",
")",
... | Sets the listener, which should be notified, when the dialog, which is created by the
builder, is dismissed for any reason.
@param listener
The listener, which should be set, as an instance of the type {@link
DialogInterface.OnDismissListener}, or null, if no listener should be set
@return The builder, the method has ... | [
"Sets",
"the",
"listener",
"which",
"should",
"be",
"notified",
"when",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"is",
"dismissed",
"for",
"any",
"reason",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L605-L609 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setMargin | public final BuilderType setMargin(final int left, final int top, final int right,
final int bottom) {
getProduct().setMargin(left, top, right, bottom);
return self();
} | java | public final BuilderType setMargin(final int left, final int top, final int right,
final int bottom) {
getProduct().setMargin(left, top, right, bottom);
return self();
} | [
"public",
"final",
"BuilderType",
"setMargin",
"(",
"final",
"int",
"left",
",",
"final",
"int",
"top",
",",
"final",
"int",
"right",
",",
"final",
"int",
"bottom",
")",
"{",
"getProduct",
"(",
")",
".",
"setMargin",
"(",
"left",
",",
"top",
",",
"righ... | Sets the margin of the dialog, which is created by the builder.
@param left
The left margin, which should be set, in pixels as an {@link Integer} value. The left
margin must be at least 0
@param top
The top margin, which should be set, in pixels as an {@link Integer} value. The top
margin must be at least 0
@param rig... | [
"Sets",
"the",
"margin",
"of",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L715-L719 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setPadding | public final BuilderType setPadding(final int left, final int top, final int right,
final int bottom) {
getProduct().setPadding(left, top, right, bottom);
return self();
} | java | public final BuilderType setPadding(final int left, final int top, final int right,
final int bottom) {
getProduct().setPadding(left, top, right, bottom);
return self();
} | [
"public",
"final",
"BuilderType",
"setPadding",
"(",
"final",
"int",
"left",
",",
"final",
"int",
"top",
",",
"final",
"int",
"right",
",",
"final",
"int",
"bottom",
")",
"{",
"getProduct",
"(",
")",
".",
"setPadding",
"(",
"left",
",",
"top",
",",
"ri... | Sets the padding of the dialog, which is created by the builder.
@param left
The left padding, which should be set, in pixels as an {@link Integer} value. The
left padding must be at least 0
@param top
The top padding, which should be set, in pixels as an {@link Integer} value. The top
padding must be at least 0
@para... | [
"Sets",
"the",
"padding",
"of",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L739-L743 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setFitsSystemWindows | public final BuilderType setFitsSystemWindows(final boolean left, final boolean top,
final boolean right, final boolean bottom) {
getProduct().setFitsSystemWindows(left, top, right, bottom);
return self();
} | java | public final BuilderType setFitsSystemWindows(final boolean left, final boolean top,
final boolean right, final boolean bottom) {
getProduct().setFitsSystemWindows(left, top, right, bottom);
return self();
} | [
"public",
"final",
"BuilderType",
"setFitsSystemWindows",
"(",
"final",
"boolean",
"left",
",",
"final",
"boolean",
"top",
",",
"final",
"boolean",
"right",
",",
"final",
"boolean",
"bottom",
")",
"{",
"getProduct",
"(",
")",
".",
"setFitsSystemWindows",
"(",
... | Sets, whether the dialog, which is created by the builder, should account for system screen
decorations such as the status bar and inset its content, or not.
@param left
True, if the dialog should inset its content at the left edge, false otherwise
@param top
True, if the dialog should inset its content at the top edg... | [
"Sets",
"whether",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"should",
"account",
"for",
"system",
"screen",
"decorations",
"such",
"as",
"the",
"status",
"bar",
"and",
"inset",
"its",
"content",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L774-L778 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java | AbstractMaterialDialogBuilder.setScrollableArea | public final BuilderType setScrollableArea(@Nullable final Area top,
@Nullable final Area bottom) {
getProduct().setScrollableArea(top, bottom);
return self();
} | java | public final BuilderType setScrollableArea(@Nullable final Area top,
@Nullable final Area bottom) {
getProduct().setScrollableArea(top, bottom);
return self();
} | [
"public",
"final",
"BuilderType",
"setScrollableArea",
"(",
"@",
"Nullable",
"final",
"Area",
"top",
",",
"@",
"Nullable",
"final",
"Area",
"bottom",
")",
"{",
"getProduct",
"(",
")",
".",
"setScrollableArea",
"(",
"top",
",",
"bottom",
")",
";",
"return",
... | Sets the areas of the dialog, which is created by the builder, which should be scrollable.
@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... | [
"Sets",
"the",
"areas",
"of",
"the",
"dialog",
"which",
"is",
"created",
"by",
"the",
"builder",
"which",
"should",
"be",
"scrollable",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/builder/AbstractMaterialDialogBuilder.java#L1135-L1139 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/animation/DialogAnimation.java | DialogAnimation.setInterpolator | protected final void setInterpolator(@NonNull final Interpolator interpolator) {
Condition.INSTANCE.ensureNotNull(interpolator, "The interpolator may not be null");
this.interpolator = interpolator;
} | java | protected final void setInterpolator(@NonNull final Interpolator interpolator) {
Condition.INSTANCE.ensureNotNull(interpolator, "The interpolator may not be null");
this.interpolator = interpolator;
} | [
"protected",
"final",
"void",
"setInterpolator",
"(",
"@",
"NonNull",
"final",
"Interpolator",
"interpolator",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"interpolator",
",",
"\"The interpolator may not be null\"",
")",
";",
"this",
".",
"int... | Sets the interpolator, which should be used by the animation.
@param interpolator
The interpolator, which should be set, as an instance of the type {@link
Interpolator}. The interpolator may not be null | [
"Sets",
"the",
"interpolator",
"which",
"should",
"be",
"used",
"by",
"the",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/animation/DialogAnimation.java#L142-L145 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/animation/DialogAnimation.java | DialogAnimation.setAlpha | protected final void setAlpha(final float alpha) {
Condition.INSTANCE.ensureAtLeast(alpha, 0, "The alpha must be at least 0");
Condition.INSTANCE.ensureAtMaximum(alpha, 1, "The alpha must be at maximum 1");
this.alpha = alpha;
} | java | protected final void setAlpha(final float alpha) {
Condition.INSTANCE.ensureAtLeast(alpha, 0, "The alpha must be at least 0");
Condition.INSTANCE.ensureAtMaximum(alpha, 1, "The alpha must be at maximum 1");
this.alpha = alpha;
} | [
"protected",
"final",
"void",
"setAlpha",
"(",
"final",
"float",
"alpha",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureAtLeast",
"(",
"alpha",
",",
"0",
",",
"\"The alpha must be at least 0\"",
")",
";",
"Condition",
".",
"INSTANCE",
".",
"ensureAtMaximum... | Sets the alpha, which should be used by the animation.
@param alpha
The alpha, which should be set, as a {@link Float} value. The alpha must be at least
0 and at maximum 1 | [
"Sets",
"the",
"alpha",
"which",
"should",
"be",
"used",
"by",
"the",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/animation/DialogAnimation.java#L178-L182 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialog.java | AbstractMaterialDialog.createCanceledOnTouchListener | private View.OnTouchListener createCanceledOnTouchListener() {
return new View.OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(final View v, final MotionEvent event) {
return isCanceledOnTouchOutside() && !isFu... | java | private View.OnTouchListener createCanceledOnTouchListener() {
return new View.OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(final View v, final MotionEvent event) {
return isCanceledOnTouchOutside() && !isFu... | [
"private",
"View",
".",
"OnTouchListener",
"createCanceledOnTouchListener",
"(",
")",
"{",
"return",
"new",
"View",
".",
"OnTouchListener",
"(",
")",
"{",
"@",
"SuppressLint",
"(",
"\"ClickableViewAccessibility\"",
")",
"@",
"Override",
"public",
"boolean",
"onTouch... | Creates and returns a listener, which allows to cancel the dialog, when touched outside the
window.
@return The listener, which has been created, as an instance of the type {@link
View.OnTouchListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"cancel",
"the",
"dialog",
"when",
"touched",
"outside",
"the",
"window",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialog.java#L94-L104 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialog.java | AbstractMaterialDialog.attachDecorators | private Map<ViewType, View> attachDecorators(@NonNull final Window window,
@NonNull final DialogRootView rootView,
@NonNull final View view) {
Map<ViewType, View> result = new HashMap<>();
for (AbstractDec... | java | private Map<ViewType, View> attachDecorators(@NonNull final Window window,
@NonNull final DialogRootView rootView,
@NonNull final View view) {
Map<ViewType, View> result = new HashMap<>();
for (AbstractDec... | [
"private",
"Map",
"<",
"ViewType",
",",
"View",
">",
"attachDecorators",
"(",
"@",
"NonNull",
"final",
"Window",
"window",
",",
"@",
"NonNull",
"final",
"DialogRootView",
"rootView",
",",
"@",
"NonNull",
"final",
"View",
"view",
")",
"{",
"Map",
"<",
"View... | Attaches 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... | [
"Attaches",
"all",
"registered",
"decorators",
"to",
"the",
"dialog",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractMaterialDialog.java#L122-L133 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/MainActivity.java | MainActivity.initializeFloatingActionButton | private void initializeFloatingActionButton() {
floatingActionButton = findViewById(R.id.floating_action_button);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
floatingActionButton.show();
floatingActionButton.setOnClickListener(createFloatingActionButtonListener(... | java | private void initializeFloatingActionButton() {
floatingActionButton = findViewById(R.id.floating_action_button);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
floatingActionButton.show();
floatingActionButton.setOnClickListener(createFloatingActionButtonListener(... | [
"private",
"void",
"initializeFloatingActionButton",
"(",
")",
"{",
"floatingActionButton",
"=",
"findViewById",
"(",
"R",
".",
"id",
".",
"floating_action_button",
")",
";",
"if",
"(",
"Build",
".",
"VERSION",
".",
"SDK_INT",
">=",
"Build",
".",
"VERSION_CODES"... | Initializes the floating action button, which allows to show an alert dialog using a circle
reveal animation. | [
"Initializes",
"the",
"floating",
"action",
"button",
"which",
"allows",
"to",
"show",
"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/MainActivity.java#L57-L66 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/MainActivity.java | MainActivity.createFloatingActionButtonListener | private OnClickListener createFloatingActionButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
fragment.showAlertDialog(v);
}
};
} | java | private OnClickListener createFloatingActionButtonListener() {
return new OnClickListener() {
@Override
public void onClick(final View v) {
fragment.showAlertDialog(v);
}
};
} | [
"private",
"OnClickListener",
"createFloatingActionButtonListener",
"(",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"final",
"View",
"v",
")",
"{",
"fragment",
".",
"showAlertDialog",
"(",
"v",... | Creates and returns a listener, which allows to show an alert dialog using a circle reveal
animation, when the corresponding floating action 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",
"an",
"alert",
"dialog",
"using",
"a",
"circle",
"reveal",
"animation",
"when",
"the",
"corresponding",
"floating",
"action",
"button",
"is",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/MainActivity.java#L75-L84 | train |
michael-rapp/AndroidMaterialDialog | example/src/main/java/de/mrapp/android/dialog/example/MainActivity.java | MainActivity.createScrollListener | private RecyclerView.OnScrollListener createScrollListener() {
return new RecyclerView.OnScrollListener() {
/**
* True, if the view is currently scrolling up, false otherwise.
*/
private boolean scrollingUp;
@Override
public void onScro... | java | private RecyclerView.OnScrollListener createScrollListener() {
return new RecyclerView.OnScrollListener() {
/**
* True, if the view is currently scrolling up, false otherwise.
*/
private boolean scrollingUp;
@Override
public void onScro... | [
"private",
"RecyclerView",
".",
"OnScrollListener",
"createScrollListener",
"(",
")",
"{",
"return",
"new",
"RecyclerView",
".",
"OnScrollListener",
"(",
")",
"{",
"/**\n * True, if the view is currently scrolling up, false otherwise.\n */",
"private",
"bo... | Creates and returns a listener, which allows to hide or show the activity's floating action
button, when the preferences, which are shown by the activity's fragment, are scrolled.
@return The listener, which has been created, as an instance of the type {@link
RecyclerView.OnScrollListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"hide",
"or",
"show",
"the",
"activity",
"s",
"floating",
"action",
"button",
"when",
"the",
"preferences",
"which",
"are",
"shown",
"by",
"the",
"activity",
"s",
"fragment",
"are",
"scro... | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/MainActivity.java#L93-L122 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.createAnimator | private ViewPropertyAnimator createAnimator(@NonNull final View animatedView,
@NonNull final FadeAnimation animation,
@Nullable final AnimatorListener listener,
final boolean s... | java | private ViewPropertyAnimator createAnimator(@NonNull final View animatedView,
@NonNull final FadeAnimation animation,
@Nullable final AnimatorListener listener,
final boolean s... | [
"private",
"ViewPropertyAnimator",
"createAnimator",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"NonNull",
"final",
"FadeAnimation",
"animation",
",",
"@",
"Nullable",
"final",
"AnimatorListener",
"listener",
",",
"final",
"boolean",
"show",
")"... | Creates an animator, which should be used for a fade animation.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param animation
The animation as an instance of the class {@link FadeAnimation}. The animation may
not be null
@param listener
The listener, which sh... | [
"Creates",
"an",
"animator",
"which",
"should",
"be",
"used",
"for",
"a",
"fade",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L86-L108 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.createAnimator | @Nullable
private ViewPropertyAnimator createAnimator(@NonNull final View animatedView,
@NonNull final RectangleRevealAnimation animation,
@Nullable final AnimatorListener listener) {
if (animation.getX() != null... | java | @Nullable
private ViewPropertyAnimator createAnimator(@NonNull final View animatedView,
@NonNull final RectangleRevealAnimation animation,
@Nullable final AnimatorListener listener) {
if (animation.getX() != null... | [
"@",
"Nullable",
"private",
"ViewPropertyAnimator",
"createAnimator",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"NonNull",
"final",
"RectangleRevealAnimation",
"animation",
",",
"@",
"Nullable",
"final",
"AnimatorListener",
"listener",
")",
"{",
... | Creates an animator, which should be used for a rectangular reveal animation.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param animation
The animation as an instance of the class {@link RectangleRevealAnimation}. The
animation may not be null
@param listen... | [
"Creates",
"an",
"animator",
"which",
"should",
"be",
"used",
"for",
"a",
"rectangular",
"reveal",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L124-L136 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.configureShowAnimator | private void configureShowAnimator(@NonNull final View animatedView,
@NonNull final RectangleRevealAnimation animation,
@NonNull final ViewPropertyAnimator animator) {
int horizontalWindowInset =
getDialog().getWindowI... | java | private void configureShowAnimator(@NonNull final View animatedView,
@NonNull final RectangleRevealAnimation animation,
@NonNull final ViewPropertyAnimator animator) {
int horizontalWindowInset =
getDialog().getWindowI... | [
"private",
"void",
"configureShowAnimator",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"NonNull",
"final",
"RectangleRevealAnimation",
"animation",
",",
"@",
"NonNull",
"final",
"ViewPropertyAnimator",
"animator",
")",
"{",
"int",
"horizontalWindo... | Configures an animator, which should be used to show the dialog using a rectangular reveal
animation.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param animation
The animation as an instance of the class {@link RectangleRevealAnimation}. The
animation may n... | [
"Configures",
"an",
"animator",
"which",
"should",
"be",
"used",
"to",
"show",
"the",
"dialog",
"using",
"a",
"rectangular",
"reveal",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L151-L197 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.createAnimator | @Nullable
private Animator createAnimator(@NonNull final View animatedView, @NonNull final View rootView,
@NonNull final CircleRevealAnimation animation,
@Nullable final AnimatorListener listener, final boolean show) {
if (Build.VERSION... | java | @Nullable
private Animator createAnimator(@NonNull final View animatedView, @NonNull final View rootView,
@NonNull final CircleRevealAnimation animation,
@Nullable final AnimatorListener listener, final boolean show) {
if (Build.VERSION... | [
"@",
"Nullable",
"private",
"Animator",
"createAnimator",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"NonNull",
"final",
"View",
"rootView",
",",
"@",
"NonNull",
"final",
"CircleRevealAnimation",
"animation",
",",
"@",
"Nullable",
"final",
"... | Creates an animator, which should be used for a circle reveal animation.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param rootView
The root view of the dialog as an instance of the class {@link View}. The view may
not be null
@param animation
The animation... | [
"Creates",
"an",
"animator",
"which",
"should",
"be",
"used",
"for",
"a",
"circle",
"reveal",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L274-L314 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.getDuration | private long getDuration(@NonNull final View animatedView,
@NonNull final DialogAnimation animation) {
double scale = 1;
if (animatedView.getAnimation() != null) {
scale = (double) (System.currentTimeMillis() -
animatedView.getAnimation().get... | java | private long getDuration(@NonNull final View animatedView,
@NonNull final DialogAnimation animation) {
double scale = 1;
if (animatedView.getAnimation() != null) {
scale = (double) (System.currentTimeMillis() -
animatedView.getAnimation().get... | [
"private",
"long",
"getDuration",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"NonNull",
"final",
"DialogAnimation",
"animation",
")",
"{",
"double",
"scale",
"=",
"1",
";",
"if",
"(",
"animatedView",
".",
"getAnimation",
"(",
")",
"!=",
... | Returns the duration, which should be used for an animation, depending on whether a previous
animation is still running, or not.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param animation
The animation as an instance of the class {@link DialogAnimation}. T... | [
"Returns",
"the",
"duration",
"which",
"should",
"be",
"used",
"for",
"an",
"animation",
"depending",
"on",
"whether",
"a",
"previous",
"animation",
"is",
"still",
"running",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L328-L340 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.createHideAnimationListener | private AnimatorListener createHideAnimationListener(@NonNull final View animatedView,
@Nullable final AnimatorListener listener) {
return new AnimatorListener() {
@Override
public void onAnimationStart(final Animator animation) {... | java | private AnimatorListener createHideAnimationListener(@NonNull final View animatedView,
@Nullable final AnimatorListener listener) {
return new AnimatorListener() {
@Override
public void onAnimationStart(final Animator animation) {... | [
"private",
"AnimatorListener",
"createHideAnimationListener",
"(",
"@",
"NonNull",
"final",
"View",
"animatedView",
",",
"@",
"Nullable",
"final",
"AnimatorListener",
"listener",
")",
"{",
"return",
"new",
"AnimatorListener",
"(",
")",
"{",
"@",
"Override",
"public"... | Creates and returns an animation listener, which allows to hide the animated view once the
animation is finished.
@param animatedView
The animated view as an instance of the class {@link View}. The view may not be null
@param listener
The listener, which should be notified, as an instance of the type {@link
AnimatorLi... | [
"Creates",
"and",
"returns",
"an",
"animation",
"listener",
"which",
"allows",
"to",
"hide",
"the",
"animated",
"view",
"once",
"the",
"animation",
"is",
"finished",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L354-L389 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java | AnimateableDialogDecorator.showAnimated | public final boolean showAnimated(@Nullable final DialogAnimation animation,
@Nullable final AnimatorListener listener) {
hidden = false;
if (animation != null) {
Window window = getWindow();
View view = getRootView();
if (view ... | java | public final boolean showAnimated(@Nullable final DialogAnimation animation,
@Nullable final AnimatorListener listener) {
hidden = false;
if (animation != null) {
Window window = getWindow();
View view = getRootView();
if (view ... | [
"public",
"final",
"boolean",
"showAnimated",
"(",
"@",
"Nullable",
"final",
"DialogAnimation",
"animation",
",",
"@",
"Nullable",
"final",
"AnimatorListener",
"listener",
")",
"{",
"hidden",
"=",
"false",
";",
"if",
"(",
"animation",
"!=",
"null",
")",
"{",
... | Shows the dialog in an animated manner, according to a specific animation.
@param animation
The animation, which should be used, as an instance of the class {@link
DialogAnimation} or null, if no animation should be used
@param listener
The listener, which should be notified about the animation's events, as an instanc... | [
"Shows",
"the",
"dialog",
"in",
"an",
"animated",
"manner",
"according",
"to",
"a",
"specific",
"animation",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/AnimateableDialogDecorator.java#L415-L463 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/listener/AbstractListenerWrapper.java | AbstractListenerWrapper.attemptCloseDialog | protected final void attemptCloseDialog() {
switch (buttonType) {
case AlertDialog.BUTTON_NEGATIVE:
dialog.cancel();
break;
case AlertDialog.BUTTON_NEUTRAL:
dialog.cancel();
break;
case AlertDialog.BUTTON_POSITIV... | java | protected final void attemptCloseDialog() {
switch (buttonType) {
case AlertDialog.BUTTON_NEGATIVE:
dialog.cancel();
break;
case AlertDialog.BUTTON_NEUTRAL:
dialog.cancel();
break;
case AlertDialog.BUTTON_POSITIV... | [
"protected",
"final",
"void",
"attemptCloseDialog",
"(",
")",
"{",
"switch",
"(",
"buttonType",
")",
"{",
"case",
"AlertDialog",
".",
"BUTTON_NEGATIVE",
":",
"dialog",
".",
"cancel",
"(",
")",
";",
"break",
";",
"case",
"AlertDialog",
".",
"BUTTON_NEUTRAL",
... | Attempts to close the dialog depending on the type of the buttonType or list view, the
listener belongs to. | [
"Attempts",
"to",
"close",
"the",
"dialog",
"depending",
"on",
"the",
"type",
"of",
"the",
"buttonType",
"or",
"list",
"view",
"the",
"listener",
"belongs",
"to",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/listener/AbstractListenerWrapper.java#L47-L61 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java | AbstractAnimateableDialog.createOnShowListener | private OnShowListener createOnShowListener() {
return new OnShowListener() {
@Override
public void onShow(final DialogInterface dialog) {
decorator.showAnimated(getShowAnimation(), null);
if (onShowListener != null) {
onShowListener.... | java | private OnShowListener createOnShowListener() {
return new OnShowListener() {
@Override
public void onShow(final DialogInterface dialog) {
decorator.showAnimated(getShowAnimation(), null);
if (onShowListener != null) {
onShowListener.... | [
"private",
"OnShowListener",
"createOnShowListener",
"(",
")",
"{",
"return",
"new",
"OnShowListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onShow",
"(",
"final",
"DialogInterface",
"dialog",
")",
"{",
"decorator",
".",
"showAnimated",
"(",
"getSho... | Creates and returns a listener, which allows to observe, when the dialog has been shown.
@return The listener, which has been created, as an instance of the type {@link
OnShowListener} | [
"Creates",
"and",
"returns",
"a",
"listener",
"which",
"allows",
"to",
"observe",
"when",
"the",
"dialog",
"has",
"been",
"shown",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java#L57-L70 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java | AbstractAnimateableDialog.createDismissAnimationListener | private AnimatorListener createDismissAnimationListener() {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
AbstractAnimateableDialog.super.dismiss();
}
... | java | private AnimatorListener createDismissAnimationListener() {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
AbstractAnimateableDialog.super.dismiss();
}
... | [
"private",
"AnimatorListener",
"createDismissAnimationListener",
"(",
")",
"{",
"return",
"new",
"AnimatorListenerAdapter",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onAnimationEnd",
"(",
"Animator",
"animation",
")",
"{",
"super",
".",
"onAnimationEnd",
"(... | Creates and returns an animation listener, which allows to dismiss the dialog, once the
animation, which is used to hide it, has finished.
@return The animation listener, which has been created, as an instance of the type {@link
AnimatorListener} | [
"Creates",
"and",
"returns",
"an",
"animation",
"listener",
"which",
"allows",
"to",
"dismiss",
"the",
"dialog",
"once",
"the",
"animation",
"which",
"is",
"used",
"to",
"hide",
"it",
"has",
"finished",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java#L79-L89 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java | AbstractAnimateableDialog.createCancelAnimationListener | private AnimatorListener createCancelAnimationListener() {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animation) {
super.onAnimationEnd(animation);
AbstractAnimateableDialog.super.cancel();
}
... | java | private AnimatorListener createCancelAnimationListener() {
return new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final Animator animation) {
super.onAnimationEnd(animation);
AbstractAnimateableDialog.super.cancel();
}
... | [
"private",
"AnimatorListener",
"createCancelAnimationListener",
"(",
")",
"{",
"return",
"new",
"AnimatorListenerAdapter",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onAnimationEnd",
"(",
"final",
"Animator",
"animation",
")",
"{",
"super",
".",
"onAnimation... | Creates and returns an animation listener, which allows to cancel the dialog, once the
animation, which is used to hide it, has finished.
@return The animation listener, which has been created, as an instance of the type {@link
AnimatorListener} | [
"Creates",
"and",
"returns",
"an",
"animation",
"listener",
"which",
"allows",
"to",
"cancel",
"the",
"dialog",
"once",
"the",
"animation",
"which",
"is",
"used",
"to",
"hide",
"it",
"has",
"finished",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/AbstractAnimateableDialog.java#L98-L108 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java | RecyclerViewAdapterWrapper.createItemClickListener | @NonNull
private View.OnClickListener createItemClickListener(final int position) {
return new View.OnClickListener() {
@Override
public void onClick(View v) {
setItemChecked(position, !isItemChecked(position));
if (itemClickListener != null) {
... | java | @NonNull
private View.OnClickListener createItemClickListener(final int position) {
return new View.OnClickListener() {
@Override
public void onClick(View v) {
setItemChecked(position, !isItemChecked(position));
if (itemClickListener != null) {
... | [
"@",
"NonNull",
"private",
"View",
".",
"OnClickListener",
"createItemClickListener",
"(",
"final",
"int",
"position",
")",
"{",
"return",
"new",
"View",
".",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"View",
"v",
"... | Creates a listener, which allows to select a list item when it has been clicked.
@param position
The position of the list item as an {@link Integer} value
@return The listener, which has been created, as an instance of the type {@link
View.OnClickListener}. The listener may not be null | [
"Creates",
"a",
"listener",
"which",
"allows",
"to",
"select",
"a",
"list",
"item",
"when",
"it",
"has",
"been",
"clicked",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java#L242-L256 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java | RecyclerViewAdapterWrapper.setItemChecked | public final void setItemChecked(final int position, final boolean checked) {
if (choiceMode.setItemChecked(position, checked)) {
notifyDataSetChanged();
if (checked && itemSelectedListener != null) {
itemSelectedListener.onItemSelected(position);
}
}... | java | public final void setItemChecked(final int position, final boolean checked) {
if (choiceMode.setItemChecked(position, checked)) {
notifyDataSetChanged();
if (checked && itemSelectedListener != null) {
itemSelectedListener.onItemSelected(position);
}
}... | [
"public",
"final",
"void",
"setItemChecked",
"(",
"final",
"int",
"position",
",",
"final",
"boolean",
"checked",
")",
"{",
"if",
"(",
"choiceMode",
".",
"setItemChecked",
"(",
"position",
",",
"checked",
")",
")",
"{",
"notifyDataSetChanged",
"(",
")",
";",... | Sets, whether the list item at a specific position should be selected, or not.
@param position
The position of the list item, whose selection state should be changed, as an {@link
Integer} value
@param checked
True, if the list item should be selected, false otherwise | [
"Sets",
"whether",
"the",
"list",
"item",
"at",
"a",
"specific",
"position",
"should",
"be",
"selected",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java#L373-L381 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java | ScrollView.notifyOnScrolled | private void notifyOnScrolled(final boolean scrolledToTop, final boolean scrolledToBottom) {
for (ScrollListener listener : scrollListeners) {
listener.onScrolled(scrolledToTop, scrolledToBottom);
}
} | java | private void notifyOnScrolled(final boolean scrolledToTop, final boolean scrolledToBottom) {
for (ScrollListener listener : scrollListeners) {
listener.onScrolled(scrolledToTop, scrolledToBottom);
}
} | [
"private",
"void",
"notifyOnScrolled",
"(",
"final",
"boolean",
"scrolledToTop",
",",
"final",
"boolean",
"scrolledToBottom",
")",
"{",
"for",
"(",
"ScrollListener",
"listener",
":",
"scrollListeners",
")",
"{",
"listener",
".",
"onScrolled",
"(",
"scrolledToTop",
... | Notifies, when the scroll view has been scrolled.
@param scrolledToTop
True, if the scroll view is scrolled to the top, false otherwise
@param scrolledToBottom
True, if the scroll view is scrolled to the bottom, false otherwise | [
"Notifies",
"when",
"the",
"scroll",
"view",
"has",
"been",
"scrolled",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java#L76-L80 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java | ScrollView.addScrollListener | public void addScrollListener(@NonNull final ScrollListener listener) {
Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null");
this.scrollListeners.add(listener);
} | java | public void addScrollListener(@NonNull final ScrollListener listener) {
Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null");
this.scrollListeners.add(listener);
} | [
"public",
"void",
"addScrollListener",
"(",
"@",
"NonNull",
"final",
"ScrollListener",
"listener",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"listener",
",",
"\"The listener may not be null\"",
")",
";",
"this",
".",
"scrollListeners",
".",
... | Adds a listener, which should be notified, when the scroll view is scrolled.
@param listener
The listener, which should be added, as an instance of the type {@link
ScrollListener}. The listener may not be null | [
"Adds",
"a",
"listener",
"which",
"should",
"be",
"notified",
"when",
"the",
"scroll",
"view",
"is",
"scrolled",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java#L160-L163 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java | ScrollView.removeScrollListener | public void removeScrollListener(@NonNull final ScrollListener listener) {
Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null");
this.scrollListeners.remove(listener);
} | java | public void removeScrollListener(@NonNull final ScrollListener listener) {
Condition.INSTANCE.ensureNotNull(listener, "The listener may not be null");
this.scrollListeners.remove(listener);
} | [
"public",
"void",
"removeScrollListener",
"(",
"@",
"NonNull",
"final",
"ScrollListener",
"listener",
")",
"{",
"Condition",
".",
"INSTANCE",
".",
"ensureNotNull",
"(",
"listener",
",",
"\"The listener may not be null\"",
")",
";",
"this",
".",
"scrollListeners",
".... | Removes a specific listener, which should not be notified, when the scroll view is scrolled,
anymore.
@param listener
The listener, which should be removed, as an instance of the type {@link
ScrollListener}. The listener may not be null | [
"Removes",
"a",
"specific",
"listener",
"which",
"should",
"not",
"be",
"notified",
"when",
"the",
"scroll",
"view",
"is",
"scrolled",
"anymore",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java#L173-L176 | train |
michael-rapp/AndroidMaterialDialog | library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java | ScrollView.isScrolledToBottom | public final boolean isScrolledToBottom() {
int y = getScrollY();
View view = getChildAt(0);
return (view.getBottom() - y) == getHeight();
} | java | public final boolean isScrolledToBottom() {
int y = getScrollY();
View view = getChildAt(0);
return (view.getBottom() - y) == getHeight();
} | [
"public",
"final",
"boolean",
"isScrolledToBottom",
"(",
")",
"{",
"int",
"y",
"=",
"getScrollY",
"(",
")",
";",
"View",
"view",
"=",
"getChildAt",
"(",
"0",
")",
";",
"return",
"(",
"view",
".",
"getBottom",
"(",
")",
"-",
"y",
")",
"==",
"getHeight... | Returns, whether the scroll view is scrolled to the bottom, or not.
@return True, if the scroll view is scrolled to the bottom, false otherwise | [
"Returns",
"whether",
"the",
"scroll",
"view",
"is",
"scrolled",
"to",
"the",
"bottom",
"or",
"not",
"."
] | 8990eed72ee5f5a9720836ee708f71ac0d43053b | https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/ScrollView.java#L192-L196 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.