1

https://drive.google.com/file/d/0B0alJDsAgypmSElpZUZ1U05zcGM/view?usp=sharing I want something like this i have check arc menu but in that we have click on button that is different than pintrest menu.

2 Answers2

2

1.Dispatch touch event to Pinterest menu when you click item

2.Let Pinterest menu display over all views

3.Need a arcLayout according to the position you click on the screen

More details in PinterestView or see that Customise context menu like pinterest menu

Community
  • 1
  • 1
Bruce too
  • 21
  • 7
-1

You can check out this library which I created:

https://github.com/reyanshmishra/PinMenu

You can clone it and import it as a module to your app and do something like this:

In your XML layout:

<?xml version="1.0" encoding="utf-8"?>
<com.reyanshmishra.pinmenu.PinMenuHolder xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:pin_holder_draw_over_view="true"
    app:pin_holder_overlay_color="#90ffffff">



    <com.reyanshmishra.pinmenu.PinMenu
        android:id="@+id/one"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:elevation="5dp"
        android:padding="5dp"
        android:scaleType="centerInside"
        android:src="@drawable/ic_close_black_24dp"
        app:pin_background_color="@color/white"
        app:pin_name="Cancel"
        app:pin_selected_color="#BD081C" />



    <com.reyanshmishra.pinmenu.PinMenu
        android:id="@+id/three"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:elevation="5dp"
        android:padding="5dp"
        android:scaleType="centerInside"
        android:src="@drawable/share_variant"
        app:pin_background_color="@color/white"
        app:pin_name="Share"
        app:pin_selected_color="#BD081C" />


    <com.reyanshmishra.pinmenu.PinMenu
        android:id="@+id/four"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:elevation="5dp"
        android:padding="5dp"
        android:scaleType="centerInside"
        android:src="@drawable/dots_horizontal"
        app:pin_background_color="@color/white"
        app:pin_name="More"
        app:pin_selected_color="#BD081C" />


</com.reyanshmishra.pinmenu.PinMenuHolder>

Now in Java:

PinDialog mPinDialog = new PinDialog(this);
        mPinDialog.setContentView(R.layout.layout_pin_menu);
           mPinDialog.setPinSelectListener(new PinSelectListener() {
                    @Override
                    public void pinSelected(PinMenu pinMenu) {
                        Toast.makeText(mContext, "" + pinMenu.getPinName(), Toast.LENGTH_SHORT).show();
                    }
                });

        mPinDialog.addToRecyclerView(mRecyclerView);

It's still under development so it just supports recyclerview. For depth of the implementation, you can just skim through the classes of the library. I don't think I can put all the code here.

The result it something like this:

enter image description here

Jamal
  • 763
  • 7
  • 22
  • 32
Reyansh Mishra
  • 1,879
  • 1
  • 14
  • 26