how to set width and height in popup menu ?
karthisammannan opened this issue · 5 comments
karthisammannan commented
style.xml is not working ?
shehabic commented
please, follow the example for custom styles, you have to create your own custom view and/or use the appropriate style items
skywalkerlw commented
is there a way to change width programmably? For example, in my project, i want to get a width of "screen width - 20 (left margin) - 30 (right margin)
shehabic-work commented
@wangbourne follow the sample, you can customize the menu completely, just implement your own style:
https://github.com/shehabic/Droppy/blob/master/samples/src/main/res/values/styles.xml#L23
shehabic-work commented
@wangbourne
you can set with to match_parent and margin left to 20dp and right to 30 dp.
skywalkerlw commented
it does not work if i do following way. Appreciate if you could let me what's the wrong with
<resources>
<style name="AppTheme" parent="@style/MaterialDesignLibraryTheme.Light">
<item name="colorPrimary">#3f51b5</item>
<item name="colorPrimaryDark">#303f9f</item>
<item name="droppyPopupStyle">@style/customDroppyPopup</item>
</style>
<style name="customDroppyPopup" parent="Droppy.DroppyPopup">
<item name="android:layout_width">match_parent</item>
</style>
</resources>