shehabic / Droppy

A simple yet-powerful and fully customizable Android drop-down menu. It supports Text with/without Icons, Separators, and even fully customized views.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to set width and height in popup menu ?

karthisammannan opened this issue · comments

style.xml is not working ?

please, follow the example for custom styles, you have to create your own custom view and/or use the appropriate style items

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)

@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

@wangbourne
you can set with to match_parent and margin left to 20dp and right to 30 dp.

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>