findviewbyid()

Records out of a silly question: At the time of writing project uses the collapsingToolbarLayout

I do not know how it is, how to use it such a thing App: toolbarId (control should be dragged into the time and that they generate), did not pay attention

(CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);

Could not find the control, give yourself up to stay here a lesson
<android.support.design.widget.CollapsingToolbarLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    app:contentScrim="?attr/colorPrimary"
    app:expandedTitleMarginEnd="64dp"
    app:expandedTitleMarginStart="48dp"
    app:toolbarId="@+id/collapsing_toolbar"
    app:layout_scrollFlags="scroll|exitUntilCollapsed">

 

 

App EG android.support.design:toolbarId: toolbarId = "@ id / Toolbar"
of The Primary Toolbar Child The id of that for you use to Wish The Purpose of collapsing.
Toolbar displayed when folded id

Guess you like

Origin blog.csdn.net/Super_Jadroid/article/details/82252554