Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. <android.support.design.widget.CollapsingToolbarLayout
  2. android:id="@+id/toolbar_layout"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:fitsSystemWindows="true"
  6. app:layout_scrollFlags="scroll|exitUntilCollapsed">
  7.  
  8. <android.support.v7.widget.Toolbar
  9. android:id="@+id/toolbar"
  10. android:layout_width="match_parent"
  11. android:layout_height="?attr/actionBarSize"
  12. app:layout_collapseMode="pin"
  13. app:popupTheme="@style/AppTheme.PopupOverlay" />
  14.  
  15. <ImageView
  16. android:id="@+id/header_logo"
  17. android:layout_width="match_parent"
  18. android:layout_height="match_parent"
  19. android:scaleType="center"
  20. android:layout_gravity="center"
  21. app:layout_collapseMode="parallax"
  22. />
  23.  
  24. </android.support.design.widget.CollapsingToolbarLayout>
  25.  
  26. ImageView im = (ImageView)findViewById(R.id.toolbar_layout);
  27. im.setBitmap(image_here);
  28.  
  29. ImageView im = (ImageView)findViewById(R.id.toolbar_layout);
  30. im.setBitmap(image_here);
  31.  
  32. ImageView im = (ImageView)findViewById(R.id.header_logo);
  33. im.setBitmap(image_here);
  34.  
  35. ImageView ivHeader;
  36. ivHeader = (ImageView)findViewById(R.id.header);
  37.  
  38. Picasso.with(this).load(data.getString("img_url")).into(ivHeader);
  39.  
  40. <android.support.design.widget.AppBarLayout
  41. android:id="@+id/flexible.appbar"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  45. >
  46.  
  47. <android.support.design.widget.CollapsingToolbarLayout
  48. android:id="@+id/flexible.collapsing"
  49. android:layout_width="match_parent"
  50. android:layout_height="300dp"
  51. app:title="@string/loading"
  52. app:expandedTitleMarginBottom="94dp"
  53. app:layout_scrollFlags="scroll|exitUntilCollapsed"
  54. app:expandedTitleTextAppearance="@style/CollapsingTextAppearance.Inverse"
  55. app:contentScrim="?colorPrimary">
  56.  
  57. <ImageView
  58. android:id="@+id/header"
  59. android:layout_width="fill_parent"
  60. android:layout_height="match_parent"
  61. android:scaleType="centerCrop"
  62. android:src="@drawable/bg_navigation"
  63. android:tint="#BB3E50B4"
  64. tools:ignore="ContentDescription" />
  65.  
  66. //.....
  67.  
  68. </android.support.design.widget.CollapsingToolbarLayout>
  69. </android.support.design.widget.AppBarLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement