An open API service indexing awesome lists of open source software.

https://github.com/nikartx/android-widget

Example how to create custom layout for 2 titles into CollapsingToolbarLayout and how to add CollapsingViewBehavior for views
https://github.com/nikartx/android-widget

android android-ui animate-title appbar-behavior appbarlayout avatar avatarview behavior collapsingtoolbar collapsingtoolbarlayout custom-view subtitle titles view viewbehavior

Last synced: 8 days ago
JSON representation

Example how to create custom layout for 2 titles into CollapsingToolbarLayout and how to add CollapsingViewBehavior for views

Awesome Lists containing this project

README

          

# CollapsingTitleLayout
In CollapsingToolbarLayout we can create only one animated title, but this solution eliminates this drawback.
Example custom layout for 2 animated titles into CollapsingToolbarLayout.

## Screenshots
![screenshot](https://raw.githubusercontent.com/nikartm/Android-Widget/master/screenshots/screenshot.gif)

## How to use?
Adjust the xml view [Example](https://github.com/nikartm/Android-Widget/blob/master/app/src/main/res/layout/fragment_collapsing_title.xml):
```




```
Or programmatically:
```
titleLayout.setTitle(getString(R.string.title))
.setSubTitle(getString(R.string.subtitle))
.setTitleColor(getResources().getColor(R.color.colorAccent))
.setSubTitleColor(getResources().getColor(R.color.colorAccent))
.setTitleSize(40)
.setSubTitleSize(16);
```

# CollapsingViewBehavior
CollapsingViewBehavior to expand or collapse view to target place. You can use this behavior with ImageView, TextView, Switch e.t.c. Or your anyone custom view.

## Screenshots
![screenshot](https://raw.githubusercontent.com/nikartm/Android-Widget/master/screenshots/screenshot2.gif)

## How to use?
Adjust the xml view [Example](https://github.com/nikartm/Android-Widget/blob/master/app/src/main/res/layout/fragment_collapsing_avatar.xml):
```












```
Add to /values/attr.xml [Example](https://github.com/nikartm/Android-Widget/blob/master/app/src/main/res/values/attr.xml)
```



```