{"id":13613727,"url":"https://github.com/hanggrian/collapsingtoolbarlayout-subtitle","last_synced_at":"2026-03-04T07:12:52.679Z","repository":{"id":37335611,"uuid":"78655968","full_name":"hanggrian/collapsingtoolbarlayout-subtitle","owner":"hanggrian","description":"Standard CollapsingToolbarLayout with subtitle support","archived":false,"fork":false,"pushed_at":"2023-11-18T11:48:55.000Z","size":34000,"stargazers_count":287,"open_issues_count":3,"forks_count":53,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-08-07T00:24:34.951Z","etag":null,"topics":["android","material-components","material-design"],"latest_commit_sha":null,"homepage":"http://hanggrian.com/collapsingtoolbarlayout-subtitle/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanggrian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-11T16:12:45.000Z","updated_at":"2024-08-07T00:24:34.951Z","dependencies_parsed_at":"2023-11-18T11:26:56.738Z","dependency_job_id":"5600f799-4a4a-4793-8f35-56942178249f","html_url":"https://github.com/hanggrian/collapsingtoolbarlayout-subtitle","commit_stats":null,"previous_names":["hanggrian/collapsingtoolbarlayout-subtitle","hendraanggrian/collapsingtoolbarlayout-subtitle"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanggrian%2Fcollapsingtoolbarlayout-subtitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanggrian%2Fcollapsingtoolbarlayout-subtitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanggrian%2Fcollapsingtoolbarlayout-subtitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanggrian%2Fcollapsingtoolbarlayout-subtitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanggrian","download_url":"https://codeload.github.com/hanggrian/collapsingtoolbarlayout-subtitle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223592713,"owners_count":17170548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","material-components","material-design"],"created_at":"2024-08-01T20:00:53.032Z","updated_at":"2026-03-04T07:12:52.613Z","avatar_url":"https://github.com/hanggrian.png","language":"Java","funding_links":[],"categories":["Android","Java"],"sub_categories":[],"readme":"[![Travis CI](https://img.shields.io/travis/com/hendraanggrian/collapsingtoolbarlayout-subtitle)](https://travis-ci.com/github/hendraanggrian/collapsingtoolbarlayout-subtitle/)\n[![Codecov](https://img.shields.io/codecov/c/github/hendraanggrian/collapsingtoolbarlayout-subtitle)](https://codecov.io/gh/hendraanggrian/collapsingtoolbarlayout-subtitle/)\n[![Maven Central](https://img.shields.io/maven-central/v/com.hendraanggrian.material/collapsingtoolbarlayout-subtitle)](https://repo1.maven.org/maven2/com/hendraanggrian/material/collapsingtoolbarlayout-subtitle/)\n[![Nexus Snapshot](https://img.shields.io/nexus/s/com.hendraanggrian.material/collapsingtoolbarlayout-subtitle?server=https%3A%2F%2Fs01.oss.sonatype.org)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/hendraanggrian/material/collapsingtoolbarlayout-subtitle/)\n[![Android SDK](https://img.shields.io/badge/sdk-14%2B-informational)](https://developer.android.com/studio/releases/platforms/#4.0)\n\n# SubtitleCollapsingToolbarLayout\n\n![Material preview.](https://github.com/hendraanggrian/collapsingtoolbarlayout-subtitle/raw/assets/preview_material.gif)\n![Material You preview.](https://github.com/hendraanggrian/collapsingtoolbarlayout-subtitle/raw/assets/preview_material3.gif)\n\nA carbon copy of [CollapsingToolbarLayout](https://developer.android.com/reference/com/google/android/material/appbar/CollapsingToolbarLayout/)\nwith subtitle support. During collapsed state, the subtitle would still appear\nas Toolbar's. There should be no learning curve because it works just like\n`CollapsingToolbarLayout`. Supports Material Design 3 styling.\n\nBut because this library uses restricted APIs and private resources from [Material Components](https://github.com/material-components/material-components-android/),\nthere are a few caveats:\n\n- Only safe to use with the same version of material components.\n- Deceptive package name.\n\n### Also...\n\nIt is detabable if we even need this library. If the material guidelines says\nit's ok to have a subtitle in toolbar layout, then they surely would've already\nimplemented such feature. If it doesn't say anything about subtitle (which is\nodds because Toolbar has it), then we probably shouldn't use it out of respect\nto the guidelines.\n\n## Download\n\nThis library's versioning follows [Material Components releases](https://github.com/material-components/material-components-android/releases/).\nWhich in turn, follows [AndroidX releases](https://developer.android.com/jetpack/androidx/versions/).\n\n```gradle\nrepositories {\n    mavenCentral()\n    google()\n}\ndependencies {\n    implementation \"com.hendraanggrian.material:collapsingtoolbarlayout-subtitle:$version\"\n}\n```\n\n## Usage\n\nTreat `SubtitleCollapsingToolbarLayout` just like a regular\n`CollapsingToolbarLayout`.\n\n```xml\n\u003candroidx.coordinatorlayout.widget.CoordinatorLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.google.android.material.appbar.AppBarLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\u003e\n\n        \u003ccom.google.android.material.appbar.SubtitleCollapsingToolbarLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            app:contentScrim=\"?colorPrimary\"\n            app:layout_scrollFlags=\"scroll|exitUntilCollapsed\"\n            app:subtitle=\"Papua, Indonesia\"\n            app:title=\"Raja Ampat\"\u003e\n\n            \u003c!-- collapsing toolbar content goes here --\u003e\n\n            \u003candroidx.appcompat.widget.Toolbar\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"?actionBarSize\"\n                app:layout_collapseMode=\"pin\"/\u003e\n        \u003c/android.support.design.widget.SubtitleCollapsingToolbarLayout\u003e\n    \u003c/com.google.android.material.appbar.AppBarLayout\u003e\n\n    \u003c!-- content goes here --\u003e\n\n\u003c/androidx.coordinatorlayout.widget.CoordinatorLayout\u003e\n```\n\n### Material Design 3\n\n![Material3 medium style.](https://github.com/hendraanggrian/collapsingtoolbarlayout-subtitle/raw/assets/material3_style_medium.png)\n![Material3 large style.](https://github.com/hendraanggrian/collapsingtoolbarlayout-subtitle/raw/assets/material3_style_large.png)\n\n`SubtitleCollapsingToolbarLayout` will automatically switch to Material Design 3\nstyle by using `Theme.Material3.*` in your app, no configuration needed.\n\nBy default, medium style is applied. To use large style, reference an attribute\n`subtitleCollapsingToolbarLayoutLargeStyle` in your XML.\n\n```xml\n\u003ccom.google.android.material.appbar.SubtitleCollapsingToolbarLayout\n    style=\"?attr/subtitleCollapsingToolbarLayoutLargeStyle\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"/\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanggrian%2Fcollapsingtoolbarlayout-subtitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanggrian%2Fcollapsingtoolbarlayout-subtitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanggrian%2Fcollapsingtoolbarlayout-subtitle/lists"}