本文整理匯總了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();
}