Giter VIP home page Giter VIP logo

droppy's People

Contributors

shehabic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

droppy's Issues

allowBackup is throwing error. Can you make it false.

Error:Execution failed for task ':app:processInternalConfigDebugManifest'.
Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:36:9-36
is also present at [com.shehabic.droppy:Droppy:0.2.5.2] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:34:5-101:19 to override.

How to change Text in Custom View??

i try to use your Custom View Excample:

// Add custom views DroppyMenuCustomView sBarItem = new DroppyMenuCustomView(R.layout.slider); droppyBuilder.addMenuItem(sBarItem);

and my Slider looks like this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    >


    <ImageView
        android:id="@+id/picDrawable"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:scaleType="centerCrop"
        android:src="@drawable/pic"
        android:layout_marginRight="10dp"
         />

    <TextView
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@+id/picDrawable"
        android:maxLines="1"
        android:layout_marginBottom="2dp"
        android:text="test"
        />

how can i set the text of "android:id="@+id/name"" dynamically ?? I've tried with sBarItem.getView().findViewById(R.id.name)
but sBarItem.getView() is always null...

add Custom font

Could you please write how to change font family of menu items as a custom font

Direction of Popup

Is there a way to control the direction of popup?

I am asking this because droppy is being hidden by keyboard i.e. if soft keyboard is open, and the anchor view is in the center of the screen, droppy drops down and is not visible as keyboard is over it.

How to change the color of the separator?

Hello,

is it possible to create a separator via XML Resource file?
As I did not succeed in doing this via XML, I managed to do it via code (like in your example).
Somehow I was not able to change the color of the divider.
Could you give me a hint?

I tried this in styles.xml

`item name="droppyMenuSeparatorStyle">@style/My.Custom.Divider
...

<style name="My.Custom.Divider" parent="Droppy.DroppyMenuSeparator"> @drawable/droppy_separator 0.5dp match_parent horizontal </style>`

and droppy_separator.xml:

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/c_green"/> </shape>

Not working

When I try to add Droppy in gradle, it errors:

Error:Module version com.shehabic.droppy:Droppy:0.2.1 depends on libraries but is not a library itself

Drop down alignment problem (In continuation to issue #32)

As mentioned in the title, I this issue has been mentioned in issue #32 which was closed, but suggestions there didn't solve the issue for me.
trying the solution suggested in the last comment didn't solve it.

My code is:

DroppyMenuPopup.Builder droppyBuilder =
new DroppyMenuPopup.Builder(getActivity(), tab.getCustomView());

droppyBuilder.addMenuItem(new DroppyMenuItem("תאריך דיווח"))
.addSeparator()
.setOnClick(new DroppyClickCallbackInterface() {...}
.addMenuItem(new DroppyMenuItem("קרוב אליי"))
.setOnClick(new DroppyClickCallbackInterface() {...}
.setYOffset(50)
.setXOffset(-110);

DroppyMenuPopup droppyMenu = droppyBuilder.build();
droppyMenu.show();

As you can see in the image, setXOffset works fine (used it to move the popup window left)
from:
2016-12-23_08-56-13

to:
2016-12-23_08-50-20

But the setYOffset doesn't work add all.
Minimum SDK = 17
Target SDK = 24

How to show ripple effect on menu item like native pop up menu on lollipop ?

I am using following code
<itemname="droppyMenuItemStyle"tools:targetApi="21">@style/Your.Custom.DroppyMenuItem</item>

<style name="Your.Custom.DroppyMenuItem" parent="Droppy.DroppyMenuItem">
        <item name="android:selectableItemBackgroundBorderless"tools:targetApi="21">
@drawable/ripple_selector</item>
</style>

and my ripple_selector is

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item>
        <shape android:shape="rectangle">
            <stroke
                android:color="?android:colorAccent"
                android:width="1dp" />
        </shape>
    </item>
</ripple>

Also tried "backgroud" in place of "selectableItemBackgroundBorderless"
still not working.
Min sdk - 14
target sdk - 21
support library - appcompat-v7:22.1.1 and support-v4:22.1.1

Droppy in AlertDialog

Hello! Can you suggest how to use droppy in alert dialog? The problem is that popup is shown under alertdialog. Thanks!

no icons

    DroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(getActivity(), view);
    droppyBuilder.triggerOnAnchorClick(false);
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.accept_bet), R.drawable.icon_ok_light).setId(R.string.accept_bet));
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.refuse_bet), R.drawable.icon_cancel_light).setId(R.string.refuse_bet));
    droppyBuilder.addSeparator();
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.delete_bet), R.drawable.icon_delete_light).setId(R.string.delete_bet));
    droppyBuilder.addMenuItem(new DroppyMenuItem(getString(R.string.add_friend_to_bet), R.drawable.icon_add_light).setId(R.string.add_friend_to_bet));
    droppyBuilder.setOnClick(new DroppyClickCallbackInterface() {
        @Override
        public void call(View v, int id) {
            ...
        }
    });
    DroppyMenuPopup droppyMenu = droppyBuilder.build();
    droppyMenu.show();

I call this code an a button click. I've an mobile with Android 5.0 and this does not show any icon... Can you tell me why?

Customer theme does not work.

<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar"> @style/Your.Custom.DroppyPopup @style/Your.Custom.DroppyMenu @style/Your.Custom.DroppyMenuItem @style/Your.Custom.DroppyMenuItemTitle @style/Your.Custom.DroppyMenuItemIcon </style>
<!-- Your custom styles go here -->
<style name="Your.Custom.DroppyPopup" parent="Droppy.DroppyPopup">
    <!-- Your Custom style attributes go here -->
</style>
<style name="Your.Custom.DroppyMenu" parent="Droppy.DroppyMenu">
    <!-- Your Custom style attributes go here -->
</style>
<style name="Your.Custom.DroppyMenuItem" parent="Droppy.DroppyMenuItem">
</style>
<style name="Your.Custom.DroppyMenuItemTitle" parent="Droppy.DroppyMenuItemTitle">
    <item name="android:textColor">@color/theme_color</item>
</style>
<style name="Your.Custom.DroppyMenuItemIcon" parent="Droppy.DroppyMenuItemIcon">
    <item name="android:layout_width">26dp</item>
    <item name="android:layout_height">26dp</item>
    <item name="android:tint">@color/theme_color</item>
</style>

Problem on ClickListener

I have customized appbar instead of default android toolbar, and this is my code:

`

more.setOnClickListener(new View.OnClickListener(){ public void onClick(View v)

    {
        DroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(HomeActivity.this, more);
        DroppyMenuCustomItem sBarItem = new DroppyMenuCustomItem(R.layout.item1);
        droppyBuilder.addMenuItem(sBarItem).addSeparator();
        DroppyMenuCustomItem sBarItem2 = new DroppyMenuCustomItem(R.layout.item2);
        droppyBuilder.addMenuItem(sBarItem2).addSeparator().setOnClick(HomeActivity.this);
        DroppyMenuCustomItem sBarItem3 = new DroppyMenuCustomItem(R.layout.item3);
        droppyBuilder.addMenuItem(sBarItem3);
        droppyBuilder.setOnClick(new DroppyClickCallbackInterface() {
            @Override
            public void call(View v, int id) {
                Log.d("Clicked on ", String.valueOf(id));
            }
        });
        DroppyMenuPopup droppyMenu = droppyBuilder.build();
        droppyMenu.show();
    }
    });

`

nothing happens when I click on my menu items!
please help me!

Subitems?

Hey.
I want to make a multi-level menu. Tell me, is there a chance?
Thank you!

With many items added some are not shown

I am trying to create a simple month picker with this lib. I just want to show dropdown of 12 month names from top of the screen but I can only see months from January to October, rest of the are missing. Can there be a option to wrap the dropdown view in scroll view or something like that so I can get access to rest of the options from dropdown menu ? Also it would be conviniet to have an onClickCallback that would return position of item.

Error implementing Long-Click to show

When using long-click to show the menu, it causes crash when clicking any other view.

Test case:

  1. Implement inside long-click listener
  2. Long-click on the button to show the menu
  3. click on the button again to dismiss the menu
  4. click on any other view, and it will cause crash.

at com.shehabic.droppy.DroppyMenuPopup.dismissPopup(DroppyMenuPopup.java:152)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at com.shehabic.droppy.DroppyMenuPopup.dismiss(DroppyMenuPopup.java:147)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at com.shehabic.droppy.DroppyMenuPopup$2.onClick(DroppyMenuPopup.java:103)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.view.View.performClick(View.java:5623)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.view.View$PerformClick.run(View.java:22433)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.os.Handler.handleCallback(Handler.java:751)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.os.Handler.dispatchMessage(Handler.java:95)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.os.Looper.loop(Looper.java:154)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at android.app.ActivityThread.main(ActivityThread.java:6247)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at java.lang.reflect.Method.invoke(Native Method)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
01-15 18:00:32.529 19205-19392/com.retailistan.salesflo:acra E/PRETTY_LOGGER: │ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)

NullPointer at DroppyMenuPopup.dismissPopup

Here is the trace:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference
at com.shehabic.droppy.DroppyMenuPopup.dismissPopup (DroppyMenuPopup.java:155)
at com.shehabic.droppy.DroppyMenuPopup.dismiss (DroppyMenuPopup.java:150)
at com.shehabic.droppy.DroppyMenuPopup$2.onClick (DroppyMenuPopup.java:105)

  • 10 non-project frames
    at android.view.View.performClick (View.java:4757)
    at android.view.View$PerformClick.run (View.java:19757)
    at android.os.Handler.handleCallback (Handler.java:739)
    at android.os.Handler.dispatchMessage (Handler.java:95)
    at android.os.Looper.loop (Looper.java:135)
    at android.app.ActivityThread.main (ActivityThread.java:5219)
    at java.lang.reflect.Method.invoke (Unknown source)
    at java.lang.reflect.Method.invoke (Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:898)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:693)

I think that fail comes at this point in DroppyLibrary:

protected void dismissPopup(boolean itemSelected)
{
    ((ViewGroup) mContentView.getParent()).removeView(mContentView);
    ((ViewGroup) modalWindow.getParent()).removeView(modalWindow);

...
...
but i'm not sure.

Fail dismissPopup on internal classes

This is the trace of the fail:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference at com.shehabic.droppy.DroppyMenuPopup.dismissPopup (DroppyMenuPopup.java:155) at com.shehabic.droppy.DroppyMenuPopup.dismiss (DroppyMenuPopup.java:150) at com.shehabic.droppy.DroppyMenuPopup$2.onClick (DroppyMenuPopup.java:105)

This is the piece of code where i build DroppyMenu:

 ` if (hasAnyProducts() && productIBTN != null) {
        DroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(this, productIBTN);

        for (Product product : getAvailableProductList()) {
            Drawable drawable = DrawableSquare.getDrawable(this, product);
            if (drawable != null) {
                DroppyMenuItem droppyMenuItem = new DroppyMenuItem(product.getName());
                droppyMenuItem.setIcon(drawable);

                droppyBuilder.addMenuItem(droppyMenuItem)
                        .addSeparator();
            }
        }

        droppyBuilder.setOnClick(new DroppyClickCallbackInterface() {
            @Override
            public void call(View v, int id) {
                e("DroppyMenuPopup", "Clicked on: " + String.valueOf(id));

                if (hasAnyProducts()) {
                    setSelectedProduct(id);
                    setReservationDates();
                    updateBookingFragment();
                    showBusinessPrivateSelector(hasToShowSelectorPrivateBusiness());
                    refreshUsageSelectorUI();
                    reloadMapParkingsAndSetToDefaultUI();
                }
            }
        });

        droppyBuilder.build();
    }`

The occurrences are at any mobile, by example: SM-J510FN, Aquaris X5 Plus, Moto G Play, HUAWEI MLA-L11, ONEPLUS A3003, E2303, SM-G920F, Aquaris M5.5, ... and any version of Android 5.X, 6.X or 7.X.

I can't protect my project code because fail is at internal classes.
Rollbar is from time to time sending me bugs related to this and I can not do anything when I would arrive with check, in my opinion, before making the DroppyMenu dismiss check if the view is null.
Please you could do something about this so that this does not continue.

The way to reproduce this myself or the users is by repeatedly clicking on the DroppyMenuButton without time to load the contents of the DroppyButton menu.

Creating in DialogFragment

when creating a menu in the DialogFragment ,it shows on back of the Dialogfragment , and when the dismiss Fragment ,you can see Menu.
how can i solve this problem? (English is my second Language)

NullPointerException onHideAnimationCompleted

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference at com.shehabic.droppy.DroppyMenuPopup.dismissPopup(DroppyMenuPopup.java:152) at com.shehabic.droppy.DroppyMenuPopup.hideAnimationCompleted(DroppyMenuPopup.java:138) at com.shehabic.droppy.animations.DroppyFadeInAnimation$1.onAnimationEnd(DroppyFadeInAnimation.java:30) at android.view.animation.Animation.fireAnimationEnd(Animation.java:932) at android.view.animation.Animation.getTransformation(Animation.java:886) at android.view.animation.Animation.getTransformation(Animation.java:952) at android.view.View.applyLegacyAnimation(View.java:16671) at android.view.View.draw(View.java:16787) at android.view.ViewGroup.drawChild(ViewGroup.java:3768) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3578) at android.view.View.updateDisplayListIfDirty(View.java:16060) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3752) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3732) at android.view.View.updateDisplayListIfDirty(View.java:16028) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3752) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3732) at android.view.View.updateDisplayListIfDirty(View.java:16028) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3752) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3732) at android.view.View.updateDisplayListIfDirty(View.java:16028) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:657) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:663) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:771) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2808) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2616) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2223) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1258) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6348) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871) at android.view.Choreographer.doCallbacks(Choreographer.java:683) at android.view.Choreographer.doFrame(Choreographer.java:619) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)

Position of menu to the top of screen

Hello,

droppy menu works well. But I cannot position the menu to top of the screen. I am using setOffsetY() method, but it is not helping. Please, is there anyway how to position the menu to the top (or at least get it more up). For anchoring I am using button for classic android action menu. I attach
screenshot for better understanding.

menu_position

Start Scale Animation from to Top to Bottom.

when clicked on button 3, I want to start the animation from top to bottom but its not happening. Here is what I'm doing:

@Override
public void animateShow(final DroppyMenuPopupView popup, final View anchor)
{

    //ScaleAnimation scaleAnimation = new ScaleAnimation(0f, 1f, 0f, 1f, Animation.RELATIVE_TO_SELF, 0.25f, Animation.RELATIVE_TO_SELF, 1f);
    Animation scaleAnimation = new ScaleAnimation(
            Animation.RELATIVE_TO_SELF,
            0.0f,
            Animation.RELATIVE_TO_SELF,
            0.0f,
            Animation.RELATIVE_TO_SELF,
            0.0f,
            Animation.RELATIVE_TO_SELF,
            5.2f);
    scaleAnimation.setDuration(ANIMATION_DURATION);
    scaleAnimation.setFillAfter(true);
    popup.startAnimation(scaleAnimation);
}

DroppyMenuItem icon doesn't work when using resId.

In the source code, in method DroppyMenuItem.render:
There is a lack of "renderedView.addView(droppyMenuItemIcon);" in first if block.

        if (this.icon != -1) {
            DroppyMenuItemIconView droppyMenuItemIcon = new DroppyMenuItemIconView(context);
            droppyMenuItemIcon.setImageResource(this.icon);
        } else if (this.iconDrawable != null) {
            DroppyMenuItemIconView droppyMenuItemIcon = new DroppyMenuItemIconView(context);
            droppyMenuItemIcon.setImageDrawable(iconDrawable);
            renderedView.addView(droppyMenuItemIcon);
        }

Fragment problem

I'm developing an Android and I'm using your library. I have several fragments. In one fragment I open the popupmenu but when I hit the back button the fragment changes but the menu is still visible.
How should I avoid this?
screen shot 2018-04-10 at 16 34 35
screen shot 2018-04-10 at 16 34 26

menu has no shadow {Solved}

it happens of you change popup's background on @Styles like that:

<style name="DroppyTheme" parent="Droppy.DroppyPopup"> <item name="android:background">@color/someColor</item> </style>

to solve this i created a shape and seted it as background using the theme above like :

<item name="android:background">@drawable/popup_background</item>

Here is the code :
hope it can be helpfull.

popup_background.xml

`

<item>
    <shape>
        <padding android:top="1dp" android:right="1dp" android:bottom="2dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="8dp" />
    </shape>
</item>

<item>
    <shape>
        <padding android:top="1dp" android:right="1dp" android:bottom="2dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="8dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="1dp" android:right="1dp" android:bottom="2dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="8dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1.5dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="8dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1.5dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="8dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1.5dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="7dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="6dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="5dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="4dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="3dp" />
    </shape>
</item>
<item>
    <shape>
        <padding android:top="0.4dp" android:right="1dp" android:bottom="1dp" android:left="1dp" />
        <solid android:color="#05000000" />
        <corners android:radius="3dp" />
    </shape>
</item>

<!-- Background -->
<item>
    <shape>
        <solid android:color="@color/colorAccent" />
        <corners android:radius="3dp" />
    </shape>
</item>

`

local use?

hi!
how to use your library completely locally in my project?

dismiss() crash

If you tap on the button that shows the dropdown menu over and over and say the user hits the back button to leave the current activity / fragment, it will crash. I am using Lollipop (API Level 22) Here is what I am seeing:

10-01 20:16:18.658 18836-18836/com.droid.visneta W/System.err﹕ java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at com.shehabic.droppy.DroppyMenuPopup.dismiss(DroppyMenuPopup.java:119)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at com.droid.visneta.NetworkQueueActivity.onDestroy(NetworkQueueActivity.java:154)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.Fragment.performDestroy(Fragment.java:2182)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1157)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1304)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:708)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:739)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.os.Looper.loop(Looper.java:135)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5254)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at java.lang.reflect.Method.invoke(Native Method)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:372)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
10-01 20:16:18.659 18836-18836/com.droid.visneta W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

DroppyMenuPopup.getMenuView() returns null

Hi,
I have a custom layout in first menu item inside DroppyMenuPopup and I am trying to access the inner views inside my custom layout after accessing my root view of the droppyMenuPopup:
DroppyMenuPopup droppyMenuPopup=droppyBuilder.build(); View menuPopupView=droppyMenuPopup.getMenuView(); Log.v(LOG_TAG,"view_id"+menuPopupView.getId());
What I get is a NullPointerException because menuPopupView is null, What is the problem?

doesn't support vector

hi
your library is great , unfortunately it doesn't support vector on pre-lollipop devices.
please make it happen , i would be so grateful . thanks

Together with SearchView

In my project, when I type query keyword in SearchView, the Droppy shows matched result list.

Currently, it only allows me to type a single character, then show result, then I have to click the SearchView again to continue. Is there any way that i could type continuously while Droppy simultaneously show related list?

How do i populate dynamic menus?

I have a radio button which when i select , it should change the droppy menu to other menu. I got 2 states of menus.

How do i mitigate this?

Got a crash on lower devices.

Got a crash while opening the popup on API level 19.

FATAL EXCEPTION: main Process: com.test.office, PID: 3710 android.content.res.Resources$NotFoundException: File res/drawable/ic_vector_agenda_view.xml from drawable resource ID #0x7f020138. If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info. at android.content.res.Resources.loadDrawable(Resources.java:3451) at android.content.res.Resources.getDrawable(Resources.java:1894) at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388) at com.shehabic.droppy.DroppyMenuPopup$Builder.fromMenu(DroppyMenuPopup.java:381) at com.test.office.features.home.appointment.AppointmentListFragment.toggleView(AppointmentListFragment.java:177) at com.test.office.features.home.appointment.AppointmentListFragment_ViewBinding$1.doClick(AppointmentListFragment_ViewBinding.java:34) at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22) at android.view.View.performClick(View.java:4508) at android.view.View$PerformClick.run(View.java:18675) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5584) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method) Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:969) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:913) at android.content.res.Resources.loadDrawable(Resources.java:3447) at android.content.res.Resources.getDrawable(Resources.java:1894)  at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388)  at com.shehabic.droppy.DroppyMenuPopup$Builder.fromMenu(DroppyMenuPopup.java:381)  at com.test.office.features.home.appointment.AppointmentListFragment.toggleView(AppointmentListFragment.java:177)  at com.test.office.features.home.appointment.AppointmentListFragment_ViewBinding$1.doClick(AppointmentListFragment_ViewBinding.java:34)  at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)  at android.view.View.performClick(View.java:4508)  at android.view.View$PerformClick.run(View.java:18675)  at android.os.Handler.handleCallback(Handler.java:733)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5584)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)  at dalvik.system.NativeStart.main(Native Method) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.