gpt4 book ai didi

android - 使用slidingmenu(jfeinstein10),如何知道是否显示了slidingmenu(有些方法不生效)

转载 作者:行者123 更新时间:2023-11-30 03:35:20 25 4
gpt4 key购买 nike

使用slidingmenu(jfeinstein10),如何知道是否显示了slidingmenu(有些方法不生效)。我想知道滑动菜单的状态,我已经试过了:

        Log.d("slidingMenu.isShown()", slidingMenu.isShown()+"");
Log.d("slidingMenu.isShown()", slidingMenu.getVisibility()+"");
Log.d("slidingMenu.isShown()", slidingMenu.isActivated()+"");
Log.d("slidingMenu.hasFocus()", slidingMenu.hasFocus()+"");
Log.d("slidingMenu.hasFocusable()", slidingMenu.hasFocusable()+"");
Log.d("slidingMenu.hasWindowFocus()", slidingMenu.hasWindowFocus()+"");
Log.d("slidingMenu.isActivated()", slidingMenu.isActivated()+"");
Log.d("slidingMenu.isClickable()", slidingMenu.isClickable()+"");
Log.d("slidingMenu.isEnabled();", slidingMenu.isEnabled()+"");
Log.d("slidingMenu.isFocusable()", slidingMenu.isFocusable()+"");
Log.d("slidingMenu.isFocused()", slidingMenu.isFocused()+"");
Log.d("slidingMenu.isSlidingEnabled()", slidingMenu.isSlidingEnabled()+"");
Log.d("slidingMenu.isSelected()", slidingMenu.isSelected()+"");

但是无论menufragment是显示还是消失,这些方法返回相同的值。

最佳答案

Line 550 in SlidingMenu.java :

/**
* Checks if is the behind view showing.
*
* @return Whether or not the behind view is showing
*/
public boolean isMenuShowing() {
return mViewAbove.getCurrentItem() == 0 || mViewAbove.getCurrentItem() == 2;
}

关于android - 使用slidingmenu(jfeinstein10),如何知道是否显示了slidingmenu(有些方法不生效),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16707668/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com