All Projects → hendraanggrian → Collapsingtoolbarlayout Subtitle

hendraanggrian / Collapsingtoolbarlayout Subtitle

Licence: apache-2.0
Standard CollapsingToolbarLayout with subtitle support

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Collapsingtoolbarlayout Subtitle

Android Observablescrollview
Android library to observe scroll events on scrollable views.
Stars: ✭ 9,625 (+3844.67%)
Mutual labels:  material-design, android-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-43.85%)
Mutual labels:  material-design, android-ui
Teammate Android
A Team Management app for creating tournaments and games for various sports
Stars: ✭ 116 (-52.46%)
Mutual labels:  material-design, android-ui
Feedbackdialog
An Interactive Feedback Dialog for Android inspired from Google Maps Review section
Stars: ✭ 99 (-59.43%)
Mutual labels:  material-design, android-ui
Awesomedialog
A Beautiful Dialog Library for Kotlin Android
Stars: ✭ 163 (-33.2%)
Mutual labels:  material-design, android-ui
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-56.97%)
Mutual labels:  material-design, android-ui
Shotang App
The New Home Screen is designed in a modular way with the core focus on product discovery. Search, Deals, Products everything has been brought upfront. The hamburger menu has been replaced with a bottom navigation bar for easy reachability. On the tech side too, this design allows us to run new deals and other experiments in an agile manner which wasn't possible in the previous version.
Stars: ✭ 132 (-45.9%)
Mutual labels:  material-design, android-ui
Uxtooltime Axure
The best Axure Widget Libraries.
Stars: ✭ 81 (-66.8%)
Mutual labels:  material-design, android-ui
Notzz App
📝 A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (-35.25%)
Mutual labels:  material-design, android-ui
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+4612.3%)
Mutual labels:  material-design, android-ui
Datingapp
Dating UI kit is used for online meet up with girls and boys . The screen contains more than 30 icons and most of all required elements required to design an application like this. The XML and JAVA files contains comments at each and every point for easy understanding. Everything was made with a detail oriented style and followed by today's web trends. Clean coded & Layers are well-organized, carefully named, and grouped.
Stars: ✭ 97 (-60.25%)
Mutual labels:  material-design, android-ui
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (-10.25%)
Mutual labels:  material-design, android-ui
Android Art
🎄 Android™ 设计相关的在线工具: 图标制作、配色方案、尺寸修改、截图加壳等,持续更新...
Stars: ✭ 95 (-61.07%)
Mutual labels:  material-design, android-ui
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+529.92%)
Mutual labels:  material-design, android-ui
Android Vertical Stepper View
A vertical stepper implementation of the material design specification
Stars: ✭ 87 (-64.34%)
Mutual labels:  material-design, android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+581.15%)
Mutual labels:  material-design, android-ui
Battery Meter View
🔋 Material design battery meter (i.e. level, state) view for Android
Stars: ✭ 57 (-76.64%)
Mutual labels:  material-design, android-ui
Floatingactionbuttonspeeddial
A Floating Action Button Speed Dial implementation for Android that follows the Material Design specification (https://material.io/components/buttons-floating-action-button#types-of-transitions)
Stars: ✭ 1,164 (+377.05%)
Mutual labels:  material-design, android-ui
Android Multi Theme Ui
Android multi theme UI implementation with day night mode. This repository cover theme changes at runtime, user can select theme from pre-defined multiple themes and changes reflect dynamically on the go.
Stars: ✭ 142 (-41.8%)
Mutual labels:  material-design, android-ui
Elegantdialog
A beautiful, customizable and interactive dialog for Android written in Kotlin/Java 😍
Stars: ✭ 189 (-22.54%)
Mutual labels:  material-design, android-ui

download build license

SubtitleCollapsingToolbarLayout

example_light example_dark

Standard CollapsingToolbarLayout with subtitle support.

  • Just like the title, subtitle text will have to be 1 line.
  • When collapsed, a subtitle would still appear as Toolbar's.
  • Separate configuration for title and subtitle: text color, gravity, etc.

Caveats

Since it uses a lot of CollapsingToolbarLayout resources and API, there are a few:

  • Only safe to use with the same version of material components.
  • Deceptive package name.

Also...

It is detabable if we even need this library. If the material guidelines says it's ok to have a multiline text in toolbar layout, then they surely would've already implemented such feature. If it doesn't say anything about subtitle (which is odds because Toolbar has it), then we probably shouldn't use it out of respect to the guidelines.

Download

This library follows AndroidX's revisions.

repositories {
    google()
    jcenter()
}

dependencies {
    implementation "com.google.android.material:material:$version"
    implementation "com.hendraanggrian.material:collapsingtoolbarlayout-subtitle:$version"
}

For older support library, use legacy artifacts.

implementation "com.android.support:design:$version"
implementation "com.hendraanggrian:collapsingtoolbarlayout-subtitle:$version"

Usage

Treat SubtitleCollapsingToolbarLayout just like a regular CollapsingToolbarLayout.

<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.appbar.SubtitleCollapsingToolbarLayout
            android:id="@+id/subtitlecollapsingtoolbarlayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:contentScrim="?colorPrimary"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:subtitle="Papua, Indonesia"
            app:title="Raja Ampat">

            <!-- collapsing toolbar content goes here -->

            <androidx.appcompat.widget.Toolbar
                android:layout_width="match_parent"
                android:layout_height="?actionBarSize"
                app:layout_collapseMode="pin"/>
        </android.support.design.widget.SubtitleCollapsingToolbarLayout>
    </com.google.android.material.appbar.AppBarLayout>

    <!-- content goes here -->

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Attributes

SubtitleCollapsingToolbarLayout has all the attributes of CollapsingToolbarLayout, and a few extras.

Attribute Description Default value/behavior
subtitle subtitle text disabled
collapsedSubtitleTextAppearance text appearance of subtitle when collapsed TextAppearance.AppCompat.Widget.ActionBar.Subtitle
expandedSubtitleTextAppearance text appearance of subtitle when expanded TextAppearance.AppCompat.Headline
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].