本文整理了Java中com.mikepenz.materialdrawer.Drawer.getStickyFooterShadow()
方法的一些代码示例,展示了Drawer.getStickyFooterShadow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawer.getStickyFooterShadow()
方法的具体详情如下:
包路径:com.mikepenz.materialdrawer.Drawer
类名称:Drawer
方法名:getStickyFooterShadow
[英]get the StickyFooter Shadow View if set else NULL
[中]如果设置为NULL,则获取StickyFooter阴影视图
代码示例来源:origin: mikepenz/MaterialDrawer
/**
* helper method to reset to the original drawerContent
*/
public void resetDrawerContent() {
if (switchedDrawerContent()) {
//set the new items
setOnDrawerItemClickListener(originalOnDrawerItemClickListener);
setOnDrawerItemLongClickListener(originalOnDrawerItemLongClickListener);
setItems(originalDrawerItems, true);
getAdapter().withSavedInstanceState(originalDrawerState);
//remove the references
originalOnDrawerItemClickListener = null;
originalOnDrawerItemLongClickListener = null;
originalDrawerItems = null;
originalDrawerState = null;
//if we switch back scroll back to the top
mDrawerBuilder.mRecyclerView.smoothScrollToPosition(0);
//show the stickyFooter and it's shadow again
if (getStickyFooter() != null) {
getStickyFooter().setVisibility(View.VISIBLE);
}
if (getStickyFooterShadow() != null) {
getStickyFooterShadow().setVisibility(View.VISIBLE);
}
//if we currently show the accountHeader selection list make sure to reset this attr
if (mDrawerBuilder.mAccountHeader != null && mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder != null) {
mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder.mSelectionListShown = false;
}
}
}
代码示例来源:origin: mikepenz/MaterialDrawer
getStickyFooter().setVisibility(View.GONE);
if (getStickyFooterShadow() != null) {
getStickyFooterShadow().setVisibility(View.GONE);
代码示例来源:origin: FreedomZZQ/YouJoin-Android
/**
* helper method to reset to the original drawerContent
*/
public void resetDrawerContent() {
if (switchedDrawerContent()) {
//set the new items
setOnDrawerItemClickListener(originalOnDrawerItemClickListener);
setOnDrawerItemLongClickListener(originalOnDrawerItemLongClickListener);
setItems(originalDrawerItems, true);
setSelectionAtPosition(originalDrawerSelection, false);
//remove the references
originalOnDrawerItemClickListener = null;
originalOnDrawerItemLongClickListener = null;
originalDrawerItems = null;
originalDrawerSelection = -1;
//if we switch back scroll back to the top
mDrawerBuilder.mRecyclerView.smoothScrollToPosition(0);
//show the stickyFooter and it's shadow again
if (getStickyFooter() != null) {
getStickyFooter().setVisibility(View.VISIBLE);
}
if (getStickyFooterShadow() != null) {
getStickyFooterShadow().setVisibility(View.VISIBLE);
}
//if we currently show the accountHeader selection list make sure to reset this attr
if (mDrawerBuilder.mAccountHeader != null && mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder != null) {
mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder.mSelectionListShown = false;
}
}
}
代码示例来源:origin: FreedomZZQ/YouJoin-Android
/**
* method to switch the drawer content to new elements
*
* @param onDrawerItemClickListener
* @param drawerItems
* @param drawerSelection
*/
public void switchDrawerContent(@NonNull OnDrawerItemClickListener onDrawerItemClickListener, OnDrawerItemLongClickListener onDrawerItemLongClickListener, @NonNull ArrayList<IDrawerItem> drawerItems, int drawerSelection) {
//just allow a single switched drawer
if (!switchedDrawerContent()) {
//save out previous values
originalOnDrawerItemClickListener = getOnDrawerItemClickListener();
originalOnDrawerItemLongClickListener = getOnDrawerItemLongClickListener();
originalDrawerItems = getDrawerItems();
originalDrawerSelection = getCurrentSelectedPosition();
}
//set the new items
setOnDrawerItemClickListener(onDrawerItemClickListener);
setOnDrawerItemLongClickListener(onDrawerItemLongClickListener);
setItems(drawerItems, true);
setSelectionAtPosition(drawerSelection, false);
//hide stickyFooter and it's shadow
if (getStickyFooter() != null) {
getStickyFooter().setVisibility(View.GONE);
}
if (getStickyFooterShadow() != null) {
getStickyFooterShadow().setVisibility(View.GONE);
}
}
内容来源于网络,如有侵权,请联系作者删除!