I need to make a AlertDialog
with a custom view.
The message of a AlertDialog
has a default padding but when i set a view it has no padding, i wand to
The ?dialogPreferredPadding
attribute now has this value. It was introduced in API 22; see https://developer.android.com/sdk/api_diff/22/changes/android.R.attr.html.
You can get consistent padding in your custom dialogs by specifying this attribute on the dialog's layout. For example, android:paddingLeft="?dialogPreferredPadding"
will bring the dialog's contents into alignment with its title.