本文整理汇总了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();
}
}
示例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;
}
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例10: getPanelState
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
public SlidingUpPanelLayout.PanelState getPanelState() {
return slidingUpPanelLayout == null ? null : slidingUpPanelLayout.getPanelState();
}
示例11: onPanelStateChanged
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState,
SlidingUpPanelLayout.PanelState newState) {
}
示例12: getPanelState
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
public SlidingUpPanelLayout.PanelState getPanelState() {
return mSlidingUpPanelLayout == null ? null : mSlidingUpPanelLayout.getPanelState();
}
示例13: getPanelState
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
return ((SlidingUpPanelActivity) getActivity()).getPanelState();
}
示例14: getPanelState
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
return ((MainActivity)getActivity()).getPanelState();
}
示例15: getPanelState
import com.sothree.slidinguppanel.SlidingUpPanelLayout; //导入方法依赖的package包/类
@Override
public SlidingUpPanelLayout.PanelState getPanelState() {
return getSlidingUpPanelLayout().getPanelState();
}