Skip to content

Instantly share code, notes, and snippets.

@numa08
Created July 19, 2016 07:09
Show Gist options
  • Save numa08/87fec0bcd53e460d9a909800591906f1 to your computer and use it in GitHub Desktop.
Save numa08/87fec0bcd53e460d9a909800591906f1 to your computer and use it in GitHub Desktop.
かっこいいcoordinatoryalut
<activity
android:name=".ui.activities.ProfileDetailActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/DefaultApplicationTheme.NoActionBar.NoStatusBar" />
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.ProfileDetailActivity"
>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/profile_image_height"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed|enterAlways"
app:titleEnabled="false">
<ImageView
android:id="@+id/profile_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/profile_banner_background"
android:fitsSystemWindows="true"
app:layout_collapseMode="parallax"
tools:ignore="ContentDescription"
tools:src="@mipmap/ic_launcher"/>
<android.support.v7.widget.Toolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="top"
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleMarginTop="13dp"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
<style name="DefaultApplicationTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="windowActionModeOverlay">false</item>
<item name="android:windowActionBarOverlay">false</item>
</style>
<style name="DefaultApplicationTheme.NoActionBar.NoStatusBar" parent="DefaultApplicationTheme.NoActionBar"/>
<style name="DefaultApplicationTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="windowActionModeOverlay">false</item>
<item name="android:windowActionBarOverlay">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
</style>
<style name="DefaultApplicationTheme.NoActionBar.NoStatusBar" parent="DefaultApplicationTheme.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment