Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26825] Android: Add AppBarLayout support

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, engTriage, titlebar, toolbar
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-02-14T20:01:46.000+0000
Updated2020-08-17T23:25:24.000+0000

Description

*Summary:* Android supports an [AppBarLayout](https://developer.android.com/reference/android/support/design/widget/AppBarLayout) feature which allows the top toolbar/titlebar to hidden when scrolling up and to be stretched to reveal more content when scrolling down. This is part of Google's material design and examples of this can be seen below. https://material.io/design/components/app-bars-top.html#behavior *Implementation Notes:* This is not a trivial feature to implement. It involves putting our Toolbar within an AppBarLayout (that part is simple enough), but the AppBarLayout must be a direct descendent of a CoordinatorLayout in order for the nested scrolling to hide/show/stretch the AppBarLayout. So, this means modifying Titanium's TiCompositeLayout to either inherit from CompositeLayout or replicate its features... and this is the troublesome part. Or perhaps our implementation of this feature should be our Titanium view container for the whole thing (CompositeLayout with a built-in AppBarLayout and Toolbar) and the developer would then add a ScrollView, TableView, or ListView as a child to this container. This way we wouldn't have to muck with our TiCompositeLayout code at all since any change in that class is high-risk and affects everything else. *Hyperloop:* There is currently an example on how to do this via hyperloop below. This can be used until Titanium has official support. https://github.com/m1ga/hyperloop.collapsingToolbarLayout

Comments

No comments

JSON Source