The first challenge mentions that the margin no longer shows up; however, I’m not seeing any difference between the margins in Chapter 10 and Chapter 11 – anyone else seeing that as well?
Chapter 10 Screenshot
Chapter 11 Screenshot
The first challenge mentions that the margin no longer shows up; however, I’m not seeing any difference between the margins in Chapter 10 and Chapter 11 – anyone else seeing that as well?
You should see the missing margins on the CrimeFragment screen when you click a crime. I found that simply adding the layout_margin of 16dp to the ViewPager element in activity_crime_pager.xml did the trick to make them come back. Essentially the idea is that the children of ViewPager does not support layout_margin but the ViewPager itself can have layout_margins.
I found that this method can also be solved:adding the padding of 16dp to the LinearLayout element in fragment_crime.xml
I think you should look the fragment_crime.xml, before using ViewPager, and after using ViewPager.
you can solve the problem by add margin to activity_crime_pager.xml.
<android.support.v4.view.ViewPager
xmlns:android=“http://schemas.android.com/apk/res/android"
android:id=”@+id/crime_view_pager"