當前位置: 首頁>>代碼示例>>Java>>正文


Java SlidingUpPanelLayout.PanelState方法代碼示例

本文整理匯總了Java中com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState方法的典型用法代碼示例。如果您正苦於以下問題:Java SlidingUpPanelLayout.PanelState方法的具體用法?Java SlidingUpPanelLayout.PanelState怎麽用?Java SlidingUpPanelLayout.PanelState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sothree.slidinguppanel.SlidingUpPanelLayout的用法示例。


在下文中一共展示了SlidingUpPanelLayout.PanelState方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState,
                                SlidingUpPanelLayout.PanelState newState) {
    File file = ImageLoader.getInstance().getDiskCache().get(mWallpaper.getUrl());
    if (newState == SlidingUpPanelLayout.PanelState.COLLAPSED &&
            mTooltip == null
            && Preferences.get(this).isShowWallpaperTooltip() &&
            !file.exists() &&
            !Preferences.get(this).isTimeToShowWallpaperPreviewIntro() &&
            !Preferences.get(this).isHighQualityPreviewEnabled()) {
        mTooltip = Tooltip.Builder(this)
                .to(mMenuPreview)
                .content(R.string.wallpaper_tooltip_preview)
                .desc(R.string.wallpaper_tooltip_preview_icon_tap)
                .descIcon(R.drawable.ic_toolbar_preview_full)
                .visibleDontShowAgain(true)
                .cancelable(false)
                .buttonCallback(tooltip -> {
                    Preferences.get(this).setShowWallpaperTooltip(!tooltip.getCheckboxState());
                    tooltip.dismiss();
                })
                .build();
        mTooltip.show();
    }
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:26,代碼來源:WallpaperBoardPreviewActivity.java

示例2: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    switch(newState){
        case COLLAPSED:
        case HIDDEN:
            resetActionDrawerBottomMargin();
            break;

        case EXPANDED:
            //Update the bottom margin for the action drawer
            ViewGroup slidingPanel = (ViewGroup) ((ViewGroup)panel).getChildAt(1);
            final View flightActionBar = slidingPanel.getChildAt(0);
            final int[] viewLocs = new int[2];
            flightActionBar.getLocationInWindow(viewLocs);
            updateActionDrawerBottomMargin(viewLocs[0] + flightActionBar.getWidth(), slidingPanel.getHeight());
            break;
    }
}
 
開發者ID:mxiao6,項目名稱:Tower-develop,代碼行數:19,代碼來源:FlightActivity.java

示例3: onGlobalLayout

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onGlobalLayout() {
    SlidingUpPanelLayout.PanelState state = mPanelLayout.getPanelState();
    if (state == SlidingUpPanelLayout.PanelState.COLLAPSED) {
        for (int i = 1; i < mTabs.length; i++) {
            mTabs[i].setAlpha(0.f);
        }
        mTabs[0].setTextColor(mColorTabSelected);
        mTabs[0].setTranslationX(TIMELINE_TRANSLATION_X);
        ViewCompat.setTranslationZ(mTabLayout, 0);
        mTabLayout.setEnabled(false);
        mTabLayout.setTabIndicatorColor(Color.TRANSPARENT);
    } else if (state == SlidingUpPanelLayout.PanelState.EXPANDED) {
        for (int i = 1; i < mTabs.length; i++) {
            mTabs[i].setAlpha(1.f);
        }
        mTabs[0].setTranslationX(0.f);
        ViewCompat.setTranslationZ(mTabLayout, mToolbarElevation);
        mTabLayout.setEnabled(true);
        mTabLayout.setTabIndicatorColor(mColorTabIndicator);
    }
    mTabLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
 
開發者ID:googlesamples,項目名稱:attendee-checkin,代碼行數:24,代碼來源:ScannerActivity.java

示例4: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    switch (newState) {
        case COLLAPSED:
            onPanelCollapsed(panel);
            break;
        case ANCHORED:
            //noinspection ConstantConditions
            slidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); // this fixes a bug where the panel would get stuck for some reason
            break;
    }
}
 
開發者ID:aliumujib,項目名稱:Orin,代碼行數:13,代碼來源:FlatPlayerFragment.java

示例5: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    switch (newState) {
        case COLLAPSED:
            onPanelCollapsed(panel);
            break;
        case ANCHORED:
            slidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); // this fixes a bug where the panel would get stuck for some reason
            break;
    }
}
 
開發者ID:aliumujib,項目名稱:Orin,代碼行數:12,代碼來源:CardPlayerFragment.java

示例6: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    switch (newState) {
        case COLLAPSED:
            onPanelCollapsed(panel);
            break;
        case EXPANDED:
            onPanelExpanded(panel);
            break;
        case ANCHORED:
            collapsePanel(); // this fixes a bug where the panel would get stuck for some reason
            break;
    }
}
 
開發者ID:aliumujib,項目名稱:Orin,代碼行數:15,代碼來源:AbsSlidingMusicPanelActivity.java

示例7: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState,
                                SlidingUpPanelLayout.PanelState newState) {
    switch (newState) {
        case COLLAPSED:
            onPanelCollapsed(panel);
            break;
        case EXPANDED:
            onPanelExpanded(panel);
            break;
        case ANCHORED:
            collapsePanel(); // this fixes a bug where the panel would get stuck for some reason
            break;
    }
}
 
開發者ID:h4h13,項目名稱:RetroMusicPlayer,代碼行數:16,代碼來源:AbsSlidingMusicPanelActivity.java

示例8: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    switch(newState){
        case COLLAPSED:
            mSlidingPanel.setEnabled(false);
            mSlidingPanelCollapsing.set(false);

            //Remove the panel slide listener
            slidingPanelListenerMgr.removePanelSlideListener(disablePanelSlidingLabel);
            break;
    }
}
 
開發者ID:mxiao6,項目名稱:Tower-develop,代碼行數:13,代碼來源:FlightDataFragment.java

示例9: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
    if (newState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
        getAdapterState().setState(AdapterState.CLOSE);
    } else if (newState == SlidingUpPanelLayout.PanelState.EXPANDED) {
        getAdapterState().setState(AdapterState.OPEN);
    }
    stopTransition();
    mListener.onPanelStateChanged(panel, previousState, newState);
}
 
開發者ID:kaichunlin,項目名稱:android-transition,代碼行數:11,代碼來源:SlidingUpPanelLayoutAdapter.java

示例10: getPanelState

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
public SlidingUpPanelLayout.PanelState getPanelState() {
    return slidingUpPanelLayout == null ? null : slidingUpPanelLayout.getPanelState();
}
 
開發者ID:aliumujib,項目名稱:Orin,代碼行數:4,代碼來源:AbsSlidingMusicPanelActivity.java

示例11: onPanelStateChanged

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState,
                                SlidingUpPanelLayout.PanelState newState) {
}
 
開發者ID:OhMyLob,項目名稱:Paper-Launcher,代碼行數:5,代碼來源:LauncherActivity.java

示例12: getPanelState

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
public SlidingUpPanelLayout.PanelState getPanelState() {
    return mSlidingUpPanelLayout == null ? null : mSlidingUpPanelLayout.getPanelState();
}
 
開發者ID:h4h13,項目名稱:RetroMusicPlayer,代碼行數:4,代碼來源:AbsSlidingMusicPanelActivity.java

示例13: getPanelState

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
    return ((SlidingUpPanelActivity) getActivity()).getPanelState();
}
 
開發者ID:Redgram,項目名稱:redgram-for-reddit,代碼行數:5,代碼來源:HomeFragment.java

示例14: getPanelState

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
    return ((MainActivity)getActivity()).getPanelState();
}
 
開發者ID:Redgram,項目名稱:redgram-for-reddit,代碼行數:5,代碼來源:SearchFragment.java

示例15: getPanelState

import com.sothree.slidinguppanel.SlidingUpPanelLayout; //導入方法依賴的package包/類
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
    return getSlidingUpPanelLayout().getPanelState();
}
 
開發者ID:Redgram,項目名稱:redgram-for-reddit,代碼行數:5,代碼來源:MainActivity.java


注:本文中的com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。