An Arc view for the android Toolbar.
Clone or download
Latest commit 9b1a59b Mar 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea/copyright Fixe copyright #14. Mar 4, 2018
arctoolbarview Fixe copyright #14. Mar 4, 2018
art Add art. Jan 17, 2018
deploy Fixe copyright #14. Mar 4, 2018
gradle/wrapper Fixe copyright #14. Mar 4, 2018
sample Fixe copyright #14. Mar 4, 2018
.gitignore Fixe copyright #14. Mar 4, 2018
LICENSE.md Add license and readme. Oct 30, 2017
README.md Fixed svg url. Feb 18, 2018
build.gradle Fixe copyright #14. Mar 4, 2018
gradle.properties Fixe copyright #14. Mar 4, 2018
gradlew Initial state of library and sample. Oct 24, 2017
gradlew.bat Initial state of library and sample. Oct 24, 2017
settings.gradle Fixe copyright #14. Mar 4, 2018

README.md

ArcToolbarView

API Download Android Arsenal

An Arc view for the android Toolbar or anywhere.

Download

Gradle:

dependencies {
  implementation 'com.massivedisaster.widget:arctoolbarview:0.0.1'
}

Usage

  1. Declare your Toolbar with ArcToolbarView.
<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"
    android:fitsSystemWindows="true"
    tools:context="com.massivedisaster.sample.ArcToolbarViewActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="180dp">

        <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"
            app:expandedTitleTextAppearance="@style/TextAppearance.AppCompat.Headline"
            app:expandedTitleMarginBottom="50dp"
            app:toolbarId="@+id/toolbar">

            <com.massivedisaster.widget.ArcToolbarView
                android:id="@+id/arcToolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@android:color/transparent" />

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin" >
            </android.support.v7.widget.Toolbar>

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

    <include layout="@layout/content_arc_toolbar_view" />    

</android.support.design.widget.CoordinatorLayout>
  1. Set the AppBarLayout to ArcToolbarView.
class ArcToolbarViewActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_arc_toolbar_view)
        setSupportActionBar(toolbar)
        arcToolbar.setAppBarLayout(appbar)
    }
}

License

MIT LICENSE