In XML there is a Toolbar wrapped in many different material of Goodies:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="parent" android:layout_height="parent" android:fitssystemwindows="true">
<android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="parent" android:layout_height="256dp" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:fitssystemwindows="true">
<android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapsing_toolbar" android:layout_width="parent" android:layout_height="parent" app:layout_scrollflags="scroll|exitUntilCollapsed" android:fitssystemwindows="true" app:contentscrim="?attr/colorPrimary" app:expandedtitlemarginstart="48dp" app:expandedtitlemarginend="64dp">
<imageview android:id="@+id/friend_image" android:src="@drawable/monkey" android:layout_width="parent" android:layout_height="parent" android:scaletype="centerCrop" android:fitssystemwindows="true" app:layout_collapsemode="parallax">
<android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="parent" android:layout_height="?attr/actionBarSize" app:popuptheme="@style/ThemeOverlay.AppCompat.Light" app:layout_collapsemode="pin">
</android.support.v7.widget.toolbar></imageview></android.support.design.widget.collapsingtoolbarlayout>
</android.support.design.widget.appbarlayout>
<android.support.v4.widget.nestedscrollview android:layout_width="parent" android:layout_height="parent" app:layout_behavior="@string/appbar_scrolling_view_behavior">
<linearlayout android:layout_width="parent" android:layout_height="parent" android:orientation="vertical" android:paddingtop="24dp">
<android.support.v7.widget.cardview android:layout_width="parent" android:layout_height="wrap content" android:parent="@dimen/card_margin">
<linearlayout style="@style/Widget.CardContent" android:layout_width="parent" android:layout_height="wrap content">
<textview android:layout_width="parent" android:layout_height="wrap content" android:text="About" android:textappearance="@style/TextAppearance.AppCompat.Title">
<textview android:layout_width="parent" android:layout_height="wrap content" android:id="@+id/details">
</textview></textview></linearlayout>
</android.support.v7.widget.cardview>
<android.support.v7.widget.cardview android:layout_width="parent" android:layout_height="wrap content" android:layout_marginbottom="@dimen/card_margin" android:layout_marginleft="@dimen/card_margin" android:layout_marginright="@dimen/card_margin">
<linearlayout style="@style/Widget.CardContent" android:layout_width="parent" android:layout_height="wrap content">
<textview android:layout_width="parent" android:layout_height="wrap content" android:text="Friends" android:textappearance="@style/TextAppearance.AppCompat.Title">
<textview android:layout_width="parent" android:layout_height="wrap content" android:text="@string/monkey_ipsum">
</textview></textview></linearlayout>
</android.support.v7.widget.cardview>
</linearlayout>
</android.support.v4.widget.nestedscrollview>
</android.support.design.widget.coordinatorlayout>
Usually, in activiti (more AppCompatActivity) we do so, and it works:
Toolbar = FindViewById<v7toolbar>(Resource.Id.toolbar);
SetSupportActionBar(Toolbar);
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
SupportActionBar.SetHomeButtonEnabled(true);</v7toolbar>
In the fragment the same SetSupportActionBar and SupportActionBar not exist, and without this toolbar cannot be linked to the fragment, which he incorrectly positioned.
How to initialize to perform SetSupportActionBar(Toolbar) in the fragment? The toolbar is not common to all fragments, it is only necessary to specific piece.