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


Java BottomSheetLayout类代码示例

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


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

示例1: findBottomSheetLayout

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Nullable
private BottomSheetLayout findBottomSheetLayout() {
    Fragment parentFragment = fragment.getParentFragment();
    if (parentFragment != null) {
        View view = parentFragment.getView();
        if (view != null) {
            return (BottomSheetLayout) view.findViewById(bottomSheetLayoutId);
        } else {
            return null;
        }
    }
    Activity parentActivity = fragment.getActivity();
    if (parentActivity != null) {
        return (BottomSheetLayout) parentActivity.findViewById(bottomSheetLayoutId);
    }
    return null;
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:18,代码来源:BottomSheetFragmentDelegate.java

示例2: onCreate

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_picker);
    bottomSheetLayout = (BottomSheetLayout) findViewById(R.id.bottomsheet);
    bottomSheetLayout.setPeekOnDismiss(false);
    selectedImage = (ImageView) findViewById(R.id.image_picker_selected);
    findViewById(R.id.image_picker_button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (checkNeedsPermission()) {
                requestStoragePermission();
            } else {
                showSheetView();
            }
        }
    });
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:19,代码来源:ImagePickerActivity.java

示例3: onCreate

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_image_picker);
    bottomSheetLayout = (BottomSheetLayout) findViewById(R.id.bottomsheet);
    bottomSheetLayout.setPeekOnDismiss(true);
    selectedImage = (ImageView) findViewById(R.id.image_picker_selected);
    findViewById(R.id.image_picker_button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (checkNeedsPermission()) {
                requestStoragePermission();
            } else {
                showSheetView();
            }
        }
    });
}
 
开发者ID:Flipboard,项目名称:bottomsheet,代码行数:19,代码来源:ImagePickerActivity.java

示例4: pickTags

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的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

示例5: pickTags

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的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

示例6: showImagePicker

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
public void showImagePicker(PickerType pickerType, Activity activity, BottomSheetLayout bottomSheet, Listener listener) {
    this.pickerType = pickerType;
    this.activity = activity;
    this.bottomSheet = bottomSheet;
    this.listener = listener;
    this.selectedImageUri = null;
    if (checkStoragePermission()) {
        requestStoragePermission();
    } else showSheetView();
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:11,代码来源:BottomSheetImagePicker.java

示例7: initView

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
private void initView() {
    recyclerView = (RecyclerView) findViewById(R.id.rv_tiyan_list);
    imageView = (ImageView) findViewById(R.id.shopping_cars);
    bottomSheetLayout = (BottomSheetLayout) findViewById(R.id.bottomSheetLayout);
    anim_mask_layout = (RelativeLayout) findViewById(R.id.activity_main);

    imageView.setOnClickListener(this);
}
 
开发者ID:markchylshow,项目名称:Shopping_car_Demo,代码行数:9,代码来源:MainActivity.java

示例8: testClickOnSameSortType

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
public void testClickOnSameSortType() {
    solo.waitForActivity(ACTIVITY_NAME, 1000);
    View fabMenu = solo.getView(R.id.fab_menu);
    View menuSort = solo.getView(R.id.btn_menu_sort);
    BottomSheetLayout bottomSheetSort = (BottomSheetLayout) solo.getView(R.id.bsl_menu);
    assertEquals(false, bottomSheetSort.isSheetShowing());
    solo.clickOnView(fabMenu);
    solo.sleep(500);
    solo.clickOnView(menuSort);
    solo.sleep(500);
    assertEquals(true, bottomSheetSort.isSheetShowing());
    solo.clickOnMenuItem("Published Date");
    solo.sleep(500);
    assertEquals(false, bottomSheetSort.isSheetShowing());
}
 
开发者ID:akexorcist,项目名称:Android-SleepingForLess,代码行数:16,代码来源:FeedActivityTest.java

示例9: testClickOnDifferentSortType

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
public void testClickOnDifferentSortType() {
    solo.waitForActivity(ACTIVITY_NAME, 1000);
    RecyclerView feedList = (RecyclerView) solo.getView(R.id.rv_feed_list);
    View fabMenu = solo.getView(R.id.fab_menu);
    View menuSort = solo.getView(R.id.btn_menu_sort);
    final BottomSheetLayout bottomSheetSort = (BottomSheetLayout) solo.getView(R.id.bsl_menu);
    assertEquals(false, bottomSheetSort.isSheetShowing());
    solo.clickOnView(fabMenu);
    solo.sleep(500);
    solo.clickOnView(menuSort);
    solo.sleep(500);
    assertEquals(true, bottomSheetSort.isSheetShowing());
    solo.clickOnMenuItem("Updated Date");
    solo.sleep(500);
    solo.waitForCondition(new Condition() {
        @Override
        public boolean isSatisfied() {
            return !bottomSheetSort.isSheetShowing();
        }
    }, 1000);
    solo.waitForCondition(new Condition() {
        @Override
        public boolean isSatisfied() {
            return !bottomSheetSort.isSheetShowing();
        }
    }, 1000);
    solo.waitForView(feedList);
    assertEquals(31, feedList.getAdapter().getItemCount());
}
 
开发者ID:akexorcist,项目名称:Android-SleepingForLess,代码行数:30,代码来源:FeedActivityTest.java

示例10: getBottomSheetLayout

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
/**
 * @return this fragment sheet's {@link BottomSheetLayout}.
 */
public BottomSheetLayout getBottomSheetLayout() {
    if (bottomSheetLayout == null) {
        bottomSheetLayout = findBottomSheetLayout();
    }

    return bottomSheetLayout;
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:11,代码来源:BottomSheetFragmentDelegate.java

示例11: onDismissed

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
@CallSuper
public void onDismissed(BottomSheetLayout bottomSheetLayout) {
    if (!viewDestroyed) {
        dismissInternal(true);
    }
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:8,代码来源:BottomSheetFragmentDelegate.java

示例12: onCreate

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bottom_sheet_fragment);
    bottomSheetLayout = (BottomSheetLayout) findViewById(R.id.bottomsheet);
    bottomSheetLayout.setInterceptContentTouch(true);
    findViewById(R.id.bottomsheet_fragment_button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            new MyFragment().show(getSupportFragmentManager(), R.id.bottomsheet);
        }
    });
}
 
开发者ID:NandagopalR,项目名称:Bottom-sheet-Listview,代码行数:14,代码来源:BottomSheetFragmentActivity.java

示例13: onCreateViewHolder

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
public StarredDataViewHolder onCreateViewHolder(final ViewGroup viewGroup, int i) {
    View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item_starred, viewGroup, false);
    StarredDataViewHolder pvh = new StarredDataViewHolder(v, new StarredDataViewHolder.ISunlightDataViewHolderClicks() {
        public void onClickItem(View caller) {
            BottomSheetLayout bottomSheetLayout = (BottomSheetLayout) view.findViewById(R.id.bottomsheet);
            bottomSheetLayout.showWithSheetView(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.fragment_starred_details, bottomSheetLayout, false));
        }
    });
    return pvh;
}
 
开发者ID:alexdao,项目名称:Lumivote,代码行数:12,代码来源:StarredFragment.java

示例14: onCreate

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bottom_sheet_fragment);
    bottomSheetLayout = (BottomSheetLayout) findViewById(R.id.bottomsheet);
    findViewById(R.id.bottomsheet_fragment_button).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            new MyFragment().show(getSupportFragmentManager(), R.id.bottomsheet);
        }
    });
}
 
开发者ID:Flipboard,项目名称:bottomsheet,代码行数:13,代码来源:BottomSheetFragmentActivity.java

示例15: setUpElements

import com.flipboard.bottomsheet.BottomSheetLayout; //导入依赖的package包/类
/**
 * SetUp the UI elements importing them
 */
private void setUpElements() {
    if (shortcutIncognitoComing != null && shortcutIncognitoComing.equals("yes")) {
        isIncognito = true;
    }

    coordinatorLayout = (CoordinatorLayout) findViewById(R.id.coordinatorLayout);
    appbar = (AppBarLayout) findViewById(R.id.appbar);
    toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("");
    setSupportActionBar(toolbar);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_search_toolbar));
    }

    title = (TextView) findViewById(R.id.toolbar_title); // SearchBar Title
    appTitle = (TextView) findViewById(R.id.app_title); // Big Colombo TextView
    titleFrame = (RelativeLayout) findViewById(R.id.big_title); // FrameLayout with Big Colombo TextView

    progressBar = (ProgressBar) findViewById(R.id.progress);
    progressBar.setInterpolator(new FastOutSlowInInterpolator());
    progressBar.setProgress(0);

    progressBarFrame = (RelativeLayout) findViewById(R.id.progress_container);
    progressBarFrame.setVisibility(View.GONE);
    ExpandAnimationUtil.expand(progressBarFrame);

    cardSearch = (CardView) findViewById(R.id.card_search); // CardView with SearchView
    search = findViewById(R.id.search); // FrameLayout of cardSearch

    whiteSearch = findViewById(R.id.white_search);
    whiteSearch.setVisibility(View.GONE);

    materialSearchView = (MaterialSearchView) findViewById(R.id.search_view);
    materialSearchView.setAnimationDuration(400);
    materialSearchView.setSuggestions(getResources().getStringArray(R.array.query_suggestions));

    webviewContainer = (FrameLayout) findViewById(R.id.webviewContainer);

    backround_bookmark_text = (RelativeLayout) findViewById(R.id.backround_bookmarks);
    bookmark_text = (TextView) findViewById(R.id.text_bookmark);
    bottomSheet = (BottomSheetLayout) findViewById(R.id.bottomsheet);
    settings = (ImageView) findViewById(R.id.settings);

    rv = (RecyclerView) findViewById(R.id.recyclerViewer);

    containerNoBookmarks = (RelativeLayout) findViewById(R.id.containerNoBookmarks);
    containerNoBookmarks.setVisibility(View.GONE);
    no_bookmark_text = (TextView) findViewById(R.id.text_no_bookmarks);
    no_bookmark_text_2 = (TextView) findViewById(R.id.text_2_no_bookmarks);

    webView = (ObservableWebView) findViewById(R.id.webview);
    if (urlIntent == null) {
        if (prefs.getBoolean("home_bookmarks", true)) {
            webView.setVisibility(View.GONE);
        } else {
            webView.setVisibility(View.VISIBLE);
            titleFrame.setVisibility(View.GONE);
        }
    }

    if (isTablet(this)) {
        back = (ImageView) findViewById(R.id.back);
        forward = (ImageView) findViewById(R.id.forward);
        bookmark = (ImageView) findViewById(R.id.bookmark);
    }
}
 
开发者ID:RiccardoBusetti,项目名称:Colombo,代码行数:70,代码来源:MainActivity.java


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