當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。