i´m trying to include the SlidingMenu to my application. It combines the 3 libraries ActionBarSherlock / ViewPagerIndicator / SlidingMenu. Well the problem is if i´m sliding to the right to expand the SlidingMenu it has no Offset. That means the hole screen will be filled by the menu. If i´m pressing the toggle button it looks really strange. It seems that he got the offset but look on the picture... If i´m pressing the toggle button twice it looks like it should -.-'
Any idea what i have done wrong?
Thats my layout.xml
<LinearLayout
android:id="@+id/id_Main_output"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1.0"
android:orientation="vertical" >
<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/id_Main_titlepageindicator"
android:textColor="#FF808080"
app:selectedColor="#FF33B5E5"
app:selectedBold="true"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
/>
<android.support.v4.view.ViewPager
android:id="@+id/id_Main_pager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
And this is my onCreate
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_mensaplanhsulm);
setBehindContentView(R.layout.layout_settings);
mPager = (ViewPager)findViewById(R.id.id_Main_pager);
mIndicator = (TitlePageIndicator)findViewById(R.id.id_Main_titlepageindicator);
mAdapter = new DayTitleFragmentAdapter(getSupportFragmentManager());
mPager.setAdapter(mAdapter);
mPager.setCurrentItem(0);
mIndicator.setViewPager(mPager);
SlidingMenu menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setShadowDrawable(R.drawable.shadow);
menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.setAboveOffset(R.dimen.slidingmenu_offset);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
menu.setMenu(R.layout.layout_settings);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setSlidingActionBarEnabled(true);