Beruflich Dokumente
Kultur Dokumente
4069 (https://github.com/orhanobut/dialogplus/stargazers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413) 139
(https://github.com/orhanobut/dialogplus/watchers?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413) 696
(https://github.com/orhanobut/dialogplus/network?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413) 28
(https://github.com/orhanobut/dialogplus/issues?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413)
(https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/1413)
Free (/free)
Tag
(https://twitter.com/intent/twe
arsenal.com/details/1/1413&text=The%20An
Dialogs (/tag/30)
License %20Dialogs%20-%20dialogplus
Apache License, Version 2.0 (http://opensource.org/licenses/Apache-2.0?utm_source=android-arsenal.co
(http://news.ycombinator.com/submitlink
m&utm_medium=referral&utm_campaign=1413)
arsenal.com/details/1/1413&t=The%20Andro
Min SDK
10 (Android 2.3.3–2.3.7 Gingerbread) (/api?level=10)
Registered
%20Dialogs%
Jan 20, 2015
Favorites
(https://plus.google.com/share?
24 url=https://android-
Link arsenal.com/details/1/1413)
https://github.com/orhanobut/dialogplus (https://github.com/orhanobut/dialogplus?utm_source=android-ar
(https://reddit.com/subm
senal.com&utm_medium=referral&utm_campaign=1413)
arsenal.com/details/1/1413&title=The%20An
See also
AwesomeDialog (/details/1/6109)
Bottom Dialog (/details/1/3168) %20Dialog
CircularDialogs (/details/1/6485)
HeaderDialog (/details/1/5076)
LovelyDialog (/details/1/3452)
Additional
Language
Java
Version
1.11 (Jan 31, 2016) (https://github.com/orhanobut/dialogplus/releases/tag/1.11?utm_source=android-arse
nal.com&utm_medium=referral&utm_campaign=1413)
Created
Dec 12, 2014
Updated
May 7, 2018
Owner
Orhan Obut (orhanobut) (/user/orhanobut)
Contributors
10 (https://github.com/orhanobut/dialogplus/graphs/contributors?utm_source=android-arsenal.com&utm_
medium=referral&utm_campaign=1413)
Activity
Badge
Generate
Download
Source code
APK file
Announcement
¡FELICIDADES!
USUARIO 1.000.000
Nuestro sistema aleatorio de
selección de ganadores podría
elegirte como ganador de un
SMARTPHONE
ONLINE: 16/09/2018 14:55
CLICA AQUI
©fabricadepremios
(https://github.com/orhanobut/dialogplus/blob/master/art/DP1.png?
utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413)
DialogPlus
(https://github.com/nr4bt/dialogplus/blob/master/art/dialogplusanim.gif?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=1413)
Gradle
implementation 'com.orhanobut:dialogplus:1.11@aar'
Usage
Use the builder to create the dialog.
Basic usage
More options
Enable expand animation same as Android L share dialog
.setExpanded(true, 300)
Use ListView as content holder, note that this is default content type.
setContentHolder(new ListHolder())
Use ViewHolder as content holder if you want to use a custom view for your dialog. Pass
resource id
.setContentHolder(new ViewHolder(R.layout.content))
.setContentHolder(new ViewHolder(view))
Use GridHolder if you want to use GridView for the dialog. You must set column number.
.setContentHolder(new GridHolder(COLUMN_NUMBER))
Set dialog position. BOTTOM (default), TOP or CENTER. You can also combine other Gravity
options.
.setGravity(Gravity.CENTER)
Define if the dialog is cancelable and should be closed when back pressed or out of dialog is
clicked
.setCancelable(true)
Set Adapter, this adapter will be used to fill the content for ListHolder and GridHolder. This is
required if the content holder is ListHolder or GridHolder. It is not required if the content holder
is ViewHolder.
.setAdapter(adapter);
Set an item click listener when list or grid holder is chosen. In that way you can have callbacks
when one of your items is clicked
.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
}
})
Set a global click listener to you dialog in order to handle all the possible click events. You can
then identify the view by using its id and handle the correct behaviour. Only views which has id
will trigger this event.
.setOnClickListener(new OnClickListener() {
@Override
public void onClick(DialogPlus dialog, View view) {
}
})
Add margins to your dialog. They are set to 0 except when gravity is center. In that case basic
margins are applied
.setFooter(R.layout.footer)
or use view
.setFooter(view)
.setHeader(R.layout.header)
or use view
.setHeader(view)
.setInAnimation(R.anim.abc_fade_in)
.setOutAnimation(R.anim.abc_fade_out)
.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogPlus dialog) {
}
})
Cancel Listener, triggered when the dialog is cancelled by back button or clicking outside
.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogPlus dialog) {
}
})
.setOnBackPressListener(new OnBackPressListener() {
@Override
public void onBackPressed(DialogPlus dialog) {
}
})
.setContentBackgroundResource(resource)
License
http://www.apache.org/licenses/LICENSE-2.0