I added a linear layout to the carousel view so it became..
<android.support.v4.view.ViewPager
android:id="@+id/vp_pages"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout android:id="@+id/content_frame_inside"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/pager_background"
android:orientation="vertical" >
</LinearLayout>
On startup I make linearLayout invisible.
When a user clicks a normal item in the navigation drawer (not home) I make the pager invisible. and linearlayout visible
ShowLinearLayout();
pager.setVisibility(View.GONE);
Fragment newFragment = new DeveloperFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.content_frame_inside, newFragment);
transaction.commit();
All other fragments in app can be done like this.
When user clicks back to home i set linearlayout View.GONE and pager View.VISIBLE.
There should be more item implemented in navigation drawer so we can easily get it working with the needs of ours customer.
Oh, I didn't spend much time looking for grammar issues I'm not that good in English..