daniel-stoneuk / material-about-library

Makes it easy to create beautiful about screens for your apps
Apache License 2.0
1.12k stars 140 forks source link

Featiure: add layout_behavior to Activty & RecyclerView #35

Closed Scrounger closed 7 years ago

Scrounger commented 7 years ago

@daniel-stoneuk: Could you Please add google layout behaviour for hide the actionbar on scrolling. Just change the https://github.com/daniel-stoneuk/material-about-library/blob/master/library/src/main/res/layout/mal_material_about_activity.xml to:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="vertical"
    tools:context=".MaterialAboutActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/Theme.Mal.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/mal_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/Theme.Mal.PopupOverlay"
            app:layout_collapseMode="pin"
            app:layout_scrollFlags="scroll|enterAlways"/>

    </android.support.design.widget.AppBarLayout>

    <android.support.v7.widget.RecyclerView
        android:id="@+id/mal_recyclerview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:clipToPadding="false"
        android:paddingBottom="@dimen/mal_baseline_half"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        />

</LinearLayout>
daniel-stoneuk commented 7 years ago

Hopefully this is what you're looking for...

Scrounger commented 7 years ago

Perfect, exactly what i want! Works great!