When using fragments it is not always obvious to the user that there are multiple fragments on the back stack. By implementing this widget you provide a clear indicator that there exists additional content which they can go back to through the back button or by pressing one of the titles.
There are two styles included by default in the library, one dark and one light. You can easily provide your own styling, however.
<android.support.v4.app.FragmentBreadCrumbs android:id="@+id/breadcrumbs" android:layout_width="fill_parent" android:layout_height="40dp" />
onCreatemethod, bind the widget to the activity.
FragmentBreadCrumbs crumbs = (FragmentBreadCrumbs)findViewById(R.id.breadcrumbs); crumbs.setActivity(this);
<item name="hagDividerVertical">@drawable/hag__divider_dark</item> <item name="hagSelectableItemBackground">@drawable/hag__background_dark</item>or
<item name="hagDividerVertical">@drawable/hag__divider_light</item> <item name="hagSelectableItemBackground">@drawable/hag__background_light</item>or specify your own drawables for the divider and background.
//continued from above crumbs.setTitle("Settings", null);
For more examples please take a look at the source code to the samples.