So zeigen Sie ausgeblendete Elemente in CoordinatorLayout programmgesteuert?

Habe ich CoordinatorLayout wie beschrieben im blog: http://android-developers.blogspot.ru/2015/05/android-design-support-library.html

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

  <android.support.v7.widget.RecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

  <android.support.design.widget.AppBarLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content">
     <android.support.v7.widget.Toolbar
              ...
              app:layout_scrollFlags="scroll|enterAlways">

     <TextView
              ...
              app:layout_scrollFlags="scroll|enterAlways">
   </android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>

Innen AppBarLayout ich habe Toolbar und TextView mit zusätzlichen status-info. AppBarLayout können zusammengeklappt werden (nach dem scrollen). Manchmal brauche ich, um zu zeigen AppBarLayout um zu zeigen geänderten status.

Wie es programmatisch?

InformationsquelleAutor tse | 2015-06-10
Schreibe einen Kommentar