本文整理汇总了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;
}
示例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();
}
}
示例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;
}
示例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;
}