PopupList

简介:A horizontal popup menu in Android(气泡式弹出菜单)
更多:作者   提 Bug   
标签:

It can pop a horizontal popup menu when you press a View by a long-press gesture. This utility class can bind a horizontal popup-menu for ListView, GridView, or other View easily.

长按 ListView, GridView 或普通 View, 弹出横向气泡式菜单。 只需要一个 Java 文件和几行代码, 该工具类可以很方便的为 ListView, GridView, 甚至普通 View 绑定长按弹出横向气泡式菜单。

Welcome star, fork 欢迎右上角 star,fork

效果图(Screenshot)

ScreenShotScreenShot
ScreenShotScreenShot

使用方式(How do I use PopupList?)

Just need a .javafile and a little code.
只需要一个 Java 文件和几行代码即可。

    PopupList popupList = new PopupList(context);
    popupList.bind(anchorView, popupMenuItemList, PopupListListener);

例子(Sample):

    PopupList popupList = new PopupList(this);
    popupList.bind(lv_main, popupMenuItemList, new PopupList.PopupListListener() {
        @Override
        public boolean showPopupList(View adapterView, View contextView, int contextPosition) {
            return true;
        }
        @Override
        public void onPopupListClick(View contextView, int contextPosition, int position) {
            Toast.makeText(MainActivity.this, contextPosition + "," + position, Toast.LENGTH_SHORT).show();
        }
    });

配置(Configuration):

You can get more information from the Wiki page.
可以在Wiki页了解更多

Android 开发经验分享
C 轮融资近 30 亿元理财推荐
Android 开发经验分享
C 轮融资近 30 亿元理财推荐