Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <android.support.design.widget.CollapsingToolbarLayout
- android:id="@+id/toolbar_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fitsSystemWindows="true"
- app:layout_scrollFlags="scroll|exitUntilCollapsed">
- <android.support.v7.widget.Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- app:layout_collapseMode="pin"
- app:popupTheme="@style/AppTheme.PopupOverlay" />
- <ImageView
- android:id="@+id/header_logo"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="center"
- android:layout_gravity="center"
- app:layout_collapseMode="parallax"
- />
- </android.support.design.widget.CollapsingToolbarLayout>
- ImageView im = (ImageView)findViewById(R.id.toolbar_layout);
- im.setBitmap(image_here);
- ImageView im = (ImageView)findViewById(R.id.toolbar_layout);
- im.setBitmap(image_here);
- ImageView im = (ImageView)findViewById(R.id.header_logo);
- im.setBitmap(image_here);
- ImageView ivHeader;
- ivHeader = (ImageView)findViewById(R.id.header);
- Picasso.with(this).load(data.getString("img_url")).into(ivHeader);
- <android.support.design.widget.AppBarLayout
- android:id="@+id/flexible.appbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
- >
- <android.support.design.widget.CollapsingToolbarLayout
- android:id="@+id/flexible.collapsing"
- android:layout_width="match_parent"
- android:layout_height="300dp"
- app:title="@string/loading"
- app:expandedTitleMarginBottom="94dp"
- app:layout_scrollFlags="scroll|exitUntilCollapsed"
- app:expandedTitleTextAppearance="@style/CollapsingTextAppearance.Inverse"
- app:contentScrim="?colorPrimary">
- <ImageView
- android:id="@+id/header"
- android:layout_width="fill_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop"
- android:src="@drawable/bg_navigation"
- android:tint="#BB3E50B4"
- tools:ignore="ContentDescription" />
- //.....
- </android.support.design.widget.CollapsingToolbarLayout>
- </android.support.design.widget.AppBarLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement