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


Java SlidingUpPanelLayout.setPanelState方法代码示例

本文整理汇总了Java中com.sothree.slidinguppanel.SlidingUpPanelLayout.setPanelState方法的典型用法代码示例。如果您正苦于以下问题:Java SlidingUpPanelLayout.setPanelState方法的具体用法?Java SlidingUpPanelLayout.setPanelState怎么用?Java SlidingUpPanelLayout.setPanelState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sothree.slidinguppanel.SlidingUpPanelLayout的用法示例。


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

示例1: onCreateView

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View root = super
            .onCreateView(inflater, container, savedInstanceState, R.layout.map_info_bottom);
    mLayout = (SlidingUpPanelLayout) root.findViewById(R.id.map_bottomsheet);
    mSlideableView = mLayout.findViewById(R.id.map_bottomsheet_slideable);

    mLayout.setPanelSlideListener(mPanelSlideListener);
    mLayout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
    mLayout.setEnableDragViewTouchEvents(false);

    // Collapse the panel when the dummy content view is touched
    mPanelContent = root.findViewById(R.id.map_bottomsheet_dummycontent);
    mPanelContent.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
        }
    });
    mPanelContent.setClickable(false);

    return root;
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:26,代码来源:SlideableInfoFragment.java

示例2: onBackPressed

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
/**
 * Collapses the sliding panel when the user clicks the back button.
 */
@Override
public void onBackPressed() {
    if (isZoomedIn) {
        SlidingUpPanelLayout layout = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout);
        layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
    } else {
        super.onBackPressed();
    }
}
 
开发者ID:sarahmaddox,项目名称:techcomm-map-android,代码行数:13,代码来源:MapsActivity.java

示例3: disableSlidingPanel

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
private void disableSlidingPanel() {
    SlidingUpPanelLayout slidingUpLayout = (SlidingUpPanelLayout)findViewById(R.id.sliding_layout);
    slidingUpLayout.setPanelHeight(0);
    slidingUpLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
    slidingUpLayout.setPanelHeight(0);
    isSlidingPanelEnabled = false;
}
 
开发者ID:nogalavi,项目名称:Bikeable,代码行数:8,代码来源:CentralActivity.java

示例4: enableSlidingPanel

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
private void enableSlidingPanel() {
    SlidingUpPanelLayout slidingUpLayout = (SlidingUpPanelLayout)findViewById(R.id.sliding_layout);
    slidingUpLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
    slidingUpLayout.setPanelHeight(78);
    isSlidingPanelEnabled = true;
}
 
开发者ID:nogalavi,项目名称:Bikeable,代码行数:7,代码来源:CentralActivity.java


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