Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flavienlaurent/discrollview
Scroll + discover = DiscrollView
https://github.com/flavienlaurent/discrollview
Last synced: about 15 hours ago
JSON representation
Scroll + discover = DiscrollView
- Host: GitHub
- URL: https://github.com/flavienlaurent/discrollview
- Owner: flavienlaurent
- Created: 2014-01-13T16:17:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-02-06T15:46:15.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T18:07:57.103Z (3 months ago)
- Language: Java
- Size: 7.34 MB
- Stars: 1,451
- Watchers: 79
- Forks: 335
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- -awesome-android-ui - discrollview - 2.0) | <img src="/art/discrollview.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - discrollview - 2.0) | <img src="/art/discrollview.gif" width="49%"> (Index `(light-weight pages)`)
- awesome-android-ui - discrollview - 2.0) | <img src="/art/discrollview.gif" width="49%"> (Index)
- awesome-android-ui - https://github.com/flavienlaurent/discrollview
- awesome-android-ui - https://github.com/flavienlaurent/discrollview
README
Discrollview
==================Regularly, I am pleasantly surprised by websites using a pattern I called the discrollver pattern. I'm sure you already know what I'm talking about but if not, http://vimeo.com/player is a good example. When you scroll, widgets appear from nowhere by fade, translation or scale.
With DiscrollView, I wanted to import this pattern on Android. This is an 0.0.1 alpha version because you have to do all the transformation work (fade, translation, scale etc) yourself base on a ratio value. I'm going to add some transformation presets (translation from left to right + fade in for example) to make the library more ready to use for lazy developers.
![Animated gif][4] ([on youtube][1])
Try out the sample APK [here][2]
Or browse the [source code of the sample application][3] for a complete example of use.
Including in your project
-------------------------Just add the library to your application as a library project.
Compatibilty
------------API 14+
Usage
---------Using the library is simple, just look at the source code of the provided sample [here][3]
### build.gradle
```
compile 'com.github.flavienlaurent.discrollview:library:0.0.2@aar'
```### The main layout
You must use the DiscrollViewContent view.
```xml
```
### Discrollvable views
You can apply some transformation on discroll:
- alpha
- scale
- translation (fromLeft, fromBottom, fromRight, fromTop)
fromLeft+fromRight and fromBottom+fromTop are forbidden couples.
- bgcolor```xml
discrollve:discrollve_alpha="true"
discrollve:discrollve_translation="fromLeft|fromBottom"
discrollve:discrollve_scaleX="true"
discrollve:discrollve_scaleY="true"
discrollve:discrollve_fromBgColor="#88EE66"
discrollve:discrollve_toBgColor="#000000"
discrollve:discrollve_threshold="0.3"
```The threshold attribute is used to trigger the discrollve at a specified ratio. For example, if threshold=0.3, the discrollve starts when the ratio >= 0.3.
### A simple example
```xml
```
License
-----------Copyright 2013 Flavien Laurent
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[1]: http://youtu.be/FGYaweSP3sA
[2]: https://github.com/flavienlaurent/discrollview/raw/master/sample.apk
[3]: https://github.com/flavienlaurent/discrollview/tree/master/sample
[4]: https://raw2.github.com/flavienlaurent/discrollview/master/discrollview.gif