当前位置: 首页>>代码示例>>Java>>正文


Java MenuSheetView类代码示例

本文整理汇总了Java中com.flipboard.bottomsheet.commons.MenuSheetView的典型用法代码示例。如果您正苦于以下问题:Java MenuSheetView类的具体用法?Java MenuSheetView怎么用?Java MenuSheetView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MenuSheetView类属于com.flipboard.bottomsheet.commons包,在下文中一共展示了MenuSheetView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showSortBottomDialog

import com.flipboard.bottomsheet.commons.MenuSheetView; //导入依赖的package包/类
private void showSortBottomDialog() {
    MenuSheetView menuSheetView = new MenuSheetView(this, MenuSheetView.MenuType.LIST, R.string.title_sort_by, new MenuSheetView.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem item) {
            if (bslMenu.isSheetShowing()) {
                bslMenu.dismissSheet();
            }
            if (item.getItemId() == R.id.action_sort_by_published_date &&
                    !sortType.equalsIgnoreCase(BloggerManager.SORT_PUBLISHED_DATE)) {
                changeFeedSortType(BloggerManager.SORT_PUBLISHED_DATE);
            } else if (item.getItemId() == R.id.action_sort_by_updated_date &&
                    !sortType.equalsIgnoreCase(BloggerManager.SORT_UPDATED_DATE)) {
                changeFeedSortType(BloggerManager.SORT_UPDATED_DATE);
            }
            return true;
        }
    });
    menuSheetView.inflateMenu(R.menu.menu_post_list);
    bslMenu.showWithSheetView(menuSheetView);
}
 
开发者ID:akexorcist,项目名称:Android-SleepingForLess,代码行数:21,代码来源:FeedActivity.java

示例2: showMenuSheet

import com.flipboard.bottomsheet.commons.MenuSheetView; //导入依赖的package包/类
private void showMenuSheet(final MenuSheetView.MenuType menuType) {
    MenuSheetView menuSheetView =
            new MenuSheetView(MenuActivity.this, menuType, "Create...", new MenuSheetView.OnMenuItemClickListener() {
                @Override
                public boolean onMenuItemClick(MenuItem item) {
                    Toast.makeText(MenuActivity.this, item.getTitle(), Toast.LENGTH_SHORT).show();
                    if (bottomSheetLayout.isSheetShowing()) {
                        bottomSheetLayout.dismissSheet();
                    }
                    if (item.getItemId() == R.id.reopen) {
                        showMenuSheet(menuType == MenuSheetView.MenuType.LIST ? MenuSheetView.MenuType.GRID : MenuSheetView.MenuType.LIST);
                    }
                    return true;
                }
            });
    menuSheetView.inflateMenu(R.menu.create);
    bottomSheetLayout.showWithSheetView(menuSheetView);
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:19,代码来源:MenuActivity.java

示例3: pickTags

import com.flipboard.bottomsheet.commons.MenuSheetView; //导入依赖的package包/类
public static void pickTags (final BottomSheetLayout layout
        , final OnTagSelectedListener listener
        , final List<Tag> tags) {
    MenuSheetView view = new MenuSheetView(layout.getContext()
            , MenuSheetView.MenuType.GRID
            , R.string.title_tags
            , new MenuSheetView.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem item) {
            if (item.getItemId() == ID_ALL) {
                listener.onSpecialSelected(item.getItemId());
                layout.dismissSheet();
                return true;
            }
            listener.onSelected(tags.get(item.getItemId()));
            layout.dismissSheet();
            return true;
        }
    });
    view.getMenu().add(0, ID_ALL, 0, R.string.filter_all)
    .setIcon(R.drawable.ic_apps_black_24dp);
    for (int i = 0; i < tags.size(); i ++) {
        Tag tag = tags.get(i);
        // TODO: Icon load
        view.getMenu().add(0, i, 0, tag.getName())
                .setIcon(new IconBuilder(layout.getContext(), tag.getColor()).build());
    }
    view.updateMenu();
    layout.showWithSheetView(view);
}
 
开发者ID:ProjectFishpond,项目名称:TPondof,代码行数:31,代码来源:Utils.java

示例4: pickTags

import com.flipboard.bottomsheet.commons.MenuSheetView; //导入依赖的package包/类
public static void pickTags (final BottomSheetLayout layout
        , final OnTagSelectedListener listener
        , final List<ForumNav.Forum> forumList) {
    MenuSheetView view = new MenuSheetView(layout.getContext()
            , MenuSheetView.MenuType.GRID
            , R.string.title_forums
            , new MenuSheetView.OnMenuItemClickListener() {
        @Override
        public boolean onMenuItemClick(MenuItem item) {
            if (item.getItemId() == ID_ALL) {
                listener.onSpecialSelected(item.getItemId());
                layout.dismissSheet();
                return true;
            }
            listener.onSelected(forumList.get(item.getItemId()));
            layout.dismissSheet();
            return true;
        }
    });
    // DZ BBS Not support "All" tag.
    /*
    view.getMenu().add(0, ID_ALL, 0, R.string.filter_all)
            .setIcon(R.drawable.ic_apps_black_24dp);
            */
    for (int i = 0; i < forumList.size(); i ++) {
        ForumNav.Forum forum = forumList.get(i);
        // TODO: Icon load
        view.getMenu().add(0, i, 0, forum.getName());
    }
    view.updateMenu();
    layout.showWithSheetView(view);
}
 
开发者ID:Trumeet,项目名称:MAT-BBS_Discuz_Android,代码行数:33,代码来源:ForumSwitchUtils.java


注:本文中的com.flipboard.bottomsheet.commons.MenuSheetView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。