/

SlidingMenu 和 StatusBarUtil 兼容处理


StatusBarUtil正常设置,只需要修改SlidingMenu的attachToActivity方法源码即可

switch (slideStyle) {
    case SLIDING_WINDOW:
           mActionbarOverlay = false;
           ViewGroup decorChild = (ViewGroup) decor.getChildAt(0);
           // save ActionBar themes that have transparent assets
           decorChild.setBackgroundResource(background);
           decor.removeView(decorChild);
           //decor.addView(this); //注释
           
           //增加
           RelativeLayout relativeLayout = new RelativeLayout(activity);
           TextView textView = new TextView(activity);
           textView.setFitsSystemWindows(true);
           relativeLayout.addView(textView);
           relativeLayout.addView(this);
           decor.addView(relativeLayout);
           setContent(decorChild);
           
           -----~~~~----


发布评论

热门评论区: