我在我的项目中使用 jfeinstein10 滑动菜单库,一切正常,只是当我在某些设备上运行我的应用程序时,保存列表视图的片段顶部有一个空白,这是一张图片:
这是我设置滑动菜单的代码:
setBehindContentView(R.layout.menu_frame);
FragmentTransaction fragTransaction = mFragmentManager.beginTransaction();
fragMenu = new FragmentMenu();
fragTransaction.replace(R.id.menu_frame, fragMenu);
fragTransaction.commit();
SlidingMenu sm = getSlidingMenu();
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setBehindOffsetRes(R.dimen.actionbar_home_width);
setSlidingActionBarEnabled(true);
final ActionBar mActionBar = getSupportActionBar();
mActionBar.setHomeButtonEnabled(true);
mActionBar.setDisplayHomeAsUpEnabled(true);
这将是我的片段布局的 XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fondoRowsMenuIzquierdo" >
<ExpandableListView
android:id="@+id/expListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="@color/fondoRowsMenuIzquierdo"
android:childDivider="@color/fondoRowsChildMenuIzquierdo"
android:choiceMode="singleChoice"
android:divider="@color/separadoresMenuIzquierdo"
android:dividerHeight="1dp"
android:drawSelectorOnTop="true"
android:groupIndicator="@null" />
</LinearLayout>
有谁知道如何删除那个空白?