当前位置: 首页>>代码示例>>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;未经允许,请勿转载。