All Projects → tslamic → Fancybackground

tslamic / Fancybackground

FancyBackground is a tiny Android library designed to animate a set of resource Drawables.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Fancybackground

Yii2 Console Runner Extension
An extension for running console commands on background in Yii framework.
Stars: ✭ 83 (-45.75%)
Mutual labels:  background
Fancy Flutter Alert Dialog
flutter package to show well designed alert dialog
Stars: ✭ 103 (-32.68%)
Mutual labels:  fancy
Vidage
Your solution to full-screen background video & image combined.
Stars: ✭ 1,579 (+932.03%)
Mutual labels:  background
Httptransfertasks
Cross Platform HTTP Transfers for downloading and uploading (supports background operations)
Stars: ✭ 87 (-43.14%)
Mutual labels:  background
Xselectorutil
一个可以用代码处理控件的阴影效果,及用代码在TextView、EditText、Button等控件设置selector背景(触摸反馈,样式变化、文字颜色变化、hint文字颜色变化等效果)的组件
Stars: ✭ 98 (-35.95%)
Mutual labels:  background
Materialfancybuttons
Beautiful Fancy Button on endorphins.
Stars: ✭ 111 (-27.45%)
Mutual labels:  fancy
Prompt So Fancy
Fancy terminal
Stars: ✭ 79 (-48.37%)
Mutual labels:  fancy
Azote
Wallpaper and colour manager for Sway, i3 and some other WMs
Stars: ✭ 138 (-9.8%)
Mutual labels:  background
React Background Slideshow
Sexy tiled background slideshow for React 🔥
Stars: ✭ 98 (-35.95%)
Mutual labels:  background
Remove Bg
Programmatically remove backgrounds from your images using the remove.bg api
Stars: ✭ 124 (-18.95%)
Mutual labels:  background
Cordova Plugin Background Mode
Keep app running in background
Stars: ✭ 1,306 (+753.59%)
Mutual labels:  background
Gradient Screens
🌈 Gradients applied to buttons, texts and backgrounds in Flutter
Stars: ✭ 97 (-36.6%)
Mutual labels:  background
Docat
Host your docs. Simple. Versioned. Fancy.
Stars: ✭ 115 (-24.84%)
Mutual labels:  fancy
Lowpoly
Lowpoly image generator
Stars: ✭ 83 (-45.75%)
Mutual labels:  background
React Native Background Actions
React Native background service library for running background tasks forever in Android & iOS.
Stars: ✭ 132 (-13.73%)
Mutual labels:  background
Himawari Bg
🌏 Set the latest image from Himawari 8 as your desktop background.
Stars: ✭ 81 (-47.06%)
Mutual labels:  background
Zsnavigationbar
ZSNavigationBar uses category to allow you change UINavigationBar appearance dynamically.(supported iOS 11+ and iPhone X)
Stars: ✭ 109 (-28.76%)
Mutual labels:  background
Berkanansdk
Bluetooth mesh messaging SDK for apps
Stars: ✭ 150 (-1.96%)
Mutual labels:  background
Hydrapaper
A Gtk utility to set two different backgrounds for each monitor on GNOME (which lacks this feature)
Stars: ✭ 134 (-12.42%)
Mutual labels:  background
Fancy Git
That's a simple prompt changer to show a few cool git informations about your repository on terminal. You can choose among 13 styles and enjoy all the aliases it provides you. Feel free for contributing, pull requests and issues are always welcome! ;)
Stars: ✭ 123 (-19.61%)
Mutual labels:  fancy

FancyBackground

FancyBackground is a tiny Android library designed to animate a set of resource Drawables. It ensures the drawables are subsampled and cached, if necessary, with heavy lifting done in the background.

Before After
plain fancybg

Achieving the above is easy:

FancyBackground.on(view)
               .set(R.drawable.fst, R.drawable.snd, R.drawable.trd)
               .inAnimation(R.anim.fade_in)
               .outAnimation(R.anim.fade_out)
               .interval(2500)
               .start(); 

Don't forget to add the following in your build.gradle:

dependencies {
	compile 'com.github.tslamic.fancybackground:library:1.0'
}

Builder options

Method name Description
set sets the Drawable resources we wish to show/animate
inAnimation specifies the animation used to animate a View entering the screen.
outAnimation specifies the animation used to animate a View exiting the screen.
loop continuously loop through the Drawables or stop after the first cycle is complete.
interval the millisecond interval a Drawable instance will be displayed for.
scale determines how the Drawables should be resized or moved to match the size of the view we're animating on.
listener receives the FancyBackground events (described below)
cache caches loaded bitmaps so we don't have to do it again

FancyListener can receive four events:

  • onStarted when the FancyBackground is started
  • onNew when a new image is set
  • onLoopDone if looping is set to false and the first cycle is complete
  • onStopped when the FancyBackground stops.

FancyCache enables you to create your own bitmap cache. FancyLruCache is the default, targeting ~25% of the available heap and evicting the least recently used bitmap if over capacity. Use null to avoid caching.

An example?

See app for a hands-on example.

How to get it?

Gradle

dependencies {
	compile 'com.github.tslamic.fancybackground:library:1.0'
}

Maven

<dependency>
    <groupId>com.github.tslamic.fancybackground</groupId>
    <artifactId>library</artifactId>
    <version>1.0</version>
</dependency>

or download the aar by clicking here.

License

The MIT License (MIT)

Copyright (c) 2015 Tadej Slamic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].