Pinterest like awesome menu control for Android

Related tags

UI/UX PinterestView
Overview

Android Arsenal

Pinterest like awesome menu control for Android

DEMO

MINE

NOTE

Any pull request is available.

HOW TO USE

       /**
              * PinterestView'layoutParams must match_parent or fill_parent,
              * just for cover the whole screen
              */
             pinterestView = (PinterestView) findViewById(R.id.item_layout);
     
             /**
              * add item view into pinterestView
              */
             pinterestView.addMenuItem(createChildView(R.drawable.googleplus,"")
             , createChildView(R.drawable.linkedin,"linkedin"), createChildView(R.drawable.twitter,"twitter")
             , createChildView(R.drawable.pinterest,"pinterest"));
             /**
              * add pinterestview menu and Pre click view click
              */
             pinterestView.setPinClickListener(new PinterestView.PinMenuClickListener() {
     
                 @Override
                 public void onMenuItemClick(View view) {
                     Toast.makeText(MainActivity.this, view.getTag() + " clicked!", Toast.LENGTH_SHORT).show();
                 }
     
                 @Override
                 public void onAnchorViewClick() {
                     Toast.makeText(MainActivity.this, "button clicked!", Toast.LENGTH_SHORT).show();
                 }
             });
 <com.brucetoo.pinterestview.PinterestView
         xmlns:custom="http://schemas.android.com/apk/res-auto"
         android:id="@+id/item_layout"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="#50000000"
         custom:child_size="44dp"
         custom:child_radius="80dp"
         custom:child_max_scale="1.2"
         custom:tips_color="@android:color/white"
         custom:tips_size="15sp"
         custom:tips_background="@drawable/shape_child_item"
         android:visibility="gone"/>

License

Copyright 2015 Bruce too

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

See LICENSE file for details.

Comments
  • Problem with view

    Problem with view

    if i use with a specific height, like 300dp because i have to use this menu only in a part of screen, i have some rendering problem because the point where i touch and the centerview isn't the same, the centerview is lower than touch point.

    opened by ghost 2
  • ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled

    ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled

    I tried to create and setPintClickListener in imageView.onTouchListener everytime onBindViewHolder so that listener know which item to share.

        @Override
        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
            ...
            // some checking to make listener only set once
            ((ItemViewHolder) holder).imageView.setOnTouchListener(new PinterestView.PinMenuClickListener() {
                            @Override
                            public void onMenuItemClick(int childAt) {
                                Log.d("test", "pos: "+position);
                            }
    
                            @Override
                            public void onPreViewClick() {
    
                            }
                        });
        }
    

    Since ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled:

    1. open the recyclerView, long click on an item, onTouch trigger.
    2. long click on another item, onTouch not trigger
    3. scroll the recyclerView, long click, onTouch trigger

    Can you advise a way to know item position in onMenuItemClick? thanks.

    opened by lihoyin 1
  • How can the view cover the whole screen?

    How can the view cover the whole screen?

    I'm using the PinterestView inside a listView row and the row height gets expanded, users can still scroll and in general it doesn't really work. Is there some specific creation parameter where the PinterestView will create the popup shield in a parent view, like the whole list?

    opened by gradha 1
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled.

    ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled.

    I tried to create and setPintClickListener in imageView.onTouchListener everytime onBindViewHolder so that listener know which item to share.

        @Override
        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
            ...
            // some checking to make listener only set once
            ((ItemViewHolder) holder).imageView.setOnTouchListener(new PinterestView.PinMenuClickListener() {
                            @Override
                            public void onMenuItemClick(int childAt) {
                                Log.d("test", "pos: "+position);
                            }
    
                            @Override
                            public void onPreViewClick() {
    
                            }
                        });
        }
    

    Since ItemViewHolder.imageView onTouch event is only triggered once unless recyclerView scrolled:

    1. open the recyclerView, long click on an item, onTouch trigger.
    2. long click on another item, onTouch not trigger
    3. scroll the recyclerView, long click, onTouch trigger

    Can you advise a way to know item position in onMenuItemClick? thanks.

    opened by joeli-wweco 0
  • Item on recycler not call long click after....

    Item on recycler not call long click after....

    Item on recyclerView not call long click after call this: binding.recyclerView.setOnTouchListener { v, event -> return@setOnTouchListener binding.itemLayout.dispatchTouchEvent(event) }

    RecyclerView always get long click. RecyclerView's items close clickable. Please help.

    opened by lien2761 0
  • how to add ?

    how to add ?

    hi, tnx for this great project. but i can't add this project to Android Studio :( please add build.gradle code, for example : compile 'com.android.support:appcompat-v7:22.2.1'

    tnx dear friend

    opened by tellfa 5
Owner
Bruce too
Read the f*cking source code...
Bruce too
Awesome RunnerBe design system and more!

Honeycomb Awesome RunnerBe design system and more! Core Preview 아직 모든 요소가 구현되지 않았으며 단순히 미리보기 입니다 class MainActivity : AppCompatActivity() { overri

RunnerBe 2 Apr 21, 2022
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

GSPD 354 Nov 10, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
Created a Tinder like Card Deck & Captain Train like Toolbar

TinderView Created A Simple and Beautiful Tinder like card deck & Captain Train like toolbar. This is heavily based on AndroidSwipeableCardStack, wenc

Aradh Pillai 328 Jun 18, 2022
An elegant way to show your menu or messages.

Android View Hover In my opinion, jumping to a new activity to show your menu is a kind of wasting time and life. So, I think, we need a hover view, t

代码家 3.2k Jan 2, 2023
An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.

ShortcutBadger: The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut! Supported launchers: Sony

Leo Lin 7.2k Dec 30, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Dec 29, 2022
Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp

Android Visualizer A View subclass that Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp The Visuali

null 798 Dec 22, 2022
Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0

Path 2.0 like ScrollBarPanel for Android Android-ScrollBarPanel allows to attach a View to a scroll indicator like it's done in Path 2.0. Features Sup

Arnaud Vallat 551 Dec 22, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022
A realtime blurring overlay for Android (like iOS UIVisualEffectView)

RealtimeBlurView It's just a realtime blurring overlay like iOS UIVisualEffectView. Just put the view in the layout xml, no Java code is required. //

Tu Yimin 3k Jan 9, 2023
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

Mark Roberts 48 Apr 21, 2022
Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.

DrawView Android view that allows the user to create drawings. Draw anything you like in your Android device from simple view. Customize draw settings

Oscar Gilberto Medina Cruz 839 Dec 28, 2022
:balloon: A lightweight popup like tooltips, fully customizable with an arrow and animations.

Balloon ?? A lightweight popup like tooltips, fully customizable with arrow and animations. Including in your project Gradle Add below codes to your r

Jaewoong Eum 2.8k Jan 5, 2023
ScratchView 7.0 0.0 L4 Java repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Harish Sridharan 1.1k Dec 24, 2022
A tinder like swipeable card stack component

AndroidSwipeableCardStack Change log: provide option to infinitly swipe in a loop card rotation setting card gravity setting undo animation Thanks for

wenchao jiang 824 Nov 10, 2022
A simple implementation of swipe card like StreetView

A simple implementation of swipe card like StreetView!! DONATIONS This project needs you! If you would like to support this project's further developm

Michele Lacorte 831 Jan 4, 2023
Code Guide: How to create Snapchat-like image stickers and text stickers.

MotionViews-Android Code Guide : How to create Snapchat-like image stickers and text stickers After spending 2000+ hours and releasing 4+ successful a

Uptech 474 Dec 9, 2022
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. ?? EasyFlipView Built with ❤︎ by Wajahat Karim and

Wajahat Karim 1.3k Dec 14, 2022