All Projects → skydoves → Flourish

skydoves / Flourish

Licence: apache-2.0
🎩 Flourish implements dynamic ways to show up and dismiss layouts with animations.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Flourish

Material-Backdrop-Android
Material Backdrop
Stars: ✭ 106 (-29.33%)
Mutual labels:  layout, android-ui
Swipelayout
A library what allows you to execute a swipe for the android platform
Stars: ✭ 150 (+0%)
Mutual labels:  layout, android-ui
Uistatus
一个简单且强大的Ui状态视图控制库!
Stars: ✭ 137 (-8.67%)
Mutual labels:  layout, android-ui
tools-sample
Collection of examples on how to improve preview of your layout
Stars: ✭ 20 (-86.67%)
Mutual labels:  layout, android-ui
Pincodeview
Pretty PinCode view
Stars: ✭ 138 (-8%)
Mutual labels:  android-ui
Framezilla
Elegant library that wraps working with frames with a nice chaining syntax.
Stars: ✭ 134 (-10.67%)
Mutual labels:  layout
Texthighlighter
TextHighlighter for android. Highlights your TextView easily.
Stars: ✭ 133 (-11.33%)
Mutual labels:  android-ui
Arclayout
With Arc Layout explore new styles and approaches on material design
Stars: ✭ 1,662 (+1008%)
Mutual labels:  layout
Filltextview
一个填空题控件
Stars: ✭ 149 (-0.67%)
Mutual labels:  android-ui
Welcome Android
A customizable welcome screen
Stars: ✭ 1,754 (+1069.33%)
Mutual labels:  android-ui
Zimlx
Open Source and free launcher for Android
Stars: ✭ 137 (-8.67%)
Mutual labels:  android-ui
Motionlayoutsamples
A sample to take you to appreciate the charm of MotionLayout.
Stars: ✭ 135 (-10%)
Mutual labels:  layout
Textwriter
Animate your texts like never before
Stars: ✭ 140 (-6.67%)
Mutual labels:  android-ui
Dragmorescrollview
一种浏览相册的交互效果
Stars: ✭ 134 (-10.67%)
Mutual labels:  android-ui
Bsp Layout
Manage layouts in bspwm (tall and wide)
Stars: ✭ 145 (-3.33%)
Mutual labels:  layout
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+1146.67%)
Mutual labels:  layout
Android Multi Theme Ui
Android multi theme UI implementation with day night mode. This repository cover theme changes at runtime, user can select theme from pre-defined multiple themes and changes reflect dynamically on the go.
Stars: ✭ 142 (-5.33%)
Mutual labels:  android-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-8.67%)
Mutual labels:  android-ui
Vlayout
Project vlayout is a powerfull LayoutManager extension for RecyclerView, it provides a group of layouts for RecyclerView. Make it able to handle a complicate situation when grid, list and other layouts in the same recyclerview.
Stars: ✭ 10,818 (+7112%)
Mutual labels:  layout
Xrefreshview
一个万能的android下拉上拉刷新的框架,完美支持recyclerview
Stars: ✭ 1,685 (+1023.33%)
Mutual labels:  android-ui

Flourish

License API Build Status Javadoc

🎩 Flourish implements dynamic ways to show up and dismiss layouts with animations.

Including in your project

Download Jitpack
Add below codes to your root build.gradle file (not your module build.gradle file).

allprojects {
    repositories {
        jcenter()
    }
}

And add a dependency code to your module's build.gradle file.

dependencies {
    implementation "com.github.skydoves:flourish:1.0.1"
}

Usage

Basic Example

Here is a basic example of implementing Flourish using Flourish.Builder class.

Flourish flourish = new Flourish.Builder(parentLayout)
    // sets the flourish layout for showing and dismissing on the parent layout.
    .setFlourishLayout(R.layout.layout_flourish_main)
    // sets the flourishing animation for showing and dismissing.
    .setFlourishAnimation(FlourishAnimation.BOUNCE)
    // sets the orientation of the starting point.
    .setFlourishOrientation(FlourishOrientation.TOP_LEFT)
    // sets a flourishListener for listening changes.
    .setFlourishListener(flourishListener)
    // sets the flourish layout should be showed on start. 
    .setShowOnStart(false)
    // sets the duration of the flourishing.
    .setDuration(800L)
    .build();

Create using kotlin dsl

This is how to create an instance of Flourish using kotlin dsl.

val myFlourish = createFlourish(parentLayout) {
  setFlourishLayout(R.layout.layout_flourish_main)
  setFlourishAnimation(FlourishAnimation.ACCELERATE)
  setFlourishOrientation(FlourishOrientation.TOP_RIGHT)
  setShowOnStart(true)
  setFlourishListener { }
}

Show and dismiss

Here is how to show and dismiss.

flourish.show()
flourish.dismiss()

// we can do something after showing and dismissing using a lambda.
flourish.show { toast("showed") }
flourish.dismiss { toast("dismissed") }

FlourishView

We can get a flourishView from an instance of Flourish.

val flourishView: View = flourish.flourishView

flourish.flourishView.toolbar_title.text = "Profile"
flourish.flourishView.toolbar_more.setOnClickListener {
  flourish.dismiss { toast("dismissed") }
}

FlourishListener

We can listen to the flourish layout is showed or dismissed.

.setFlourishListener(new FlourishListener() {
  @Override
  public void onChanged(boolean isShowing) {
    // do something
  }
})

We can simplify using lambda in kotlin.

.setFlourishListener { 
  toast("isShowing : $it") 
}

FlourishOrientation

We can customize a start point orientation of the showing and dismiss.

.setFlourishOrientation(FlourishOrientation.TOP_LEFT)
.setFlourishOrientation(FlourishOrientation.TOP_RIGHT)
.setFlourishOrientation(FlourishOrientation.BOTTOM_LEFT)
.setFlourishOrientation(FlourishOrientation.BOTTOM_RIGHT)
TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT

FlourishAnimation

We can customize an animation of the showing and dismiss.

NORMAL ACCELERATE BOUNCE

Find this library useful? ❤️

Support it by joining stargazers for this repository. ⭐️
And follow me for my next creations! 🤩

License

Copyright 2019 skydoves (Jaewoong Eum)

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 at

   http://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.
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].