javiersantos / MaterialStyledDialogs

A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.
Apache License 2.0
1.17k stars 155 forks source link

How to set the CustomView width wider? #15

Closed FeedyFeedback closed 8 years ago

FeedyFeedback commented 8 years ago

See the title, I want to make the CustomView width a little bit wider, so It will fit. How can I do this?

javiersantos commented 8 years ago

It isn't possible right now, because a marging is included to the custom view by default. I will prepare an update to fix this asap.

javiersantos commented 8 years ago
dependencies {
    compile 'com.github.javiersantos:MaterialStyledDialogs:1.4'
}

Using the latest version you can set a padding for the custom view. Otherwise it will fit the entire dialog.

// Set a custom view for the dialog with optional padding in DP.
// Check out the wiki for more documentation: https://github.com/javiersantos/MaterialStyledDialogs/wiki/Adding-a-custom-view
.setCustomView(your_custom_view, int left, int top, int right, int bottom)