All Projects → Commit451 → Quickactionview

Commit451 / Quickactionview

Licence: apache-2.0
View that shows quick actions when long pressed, inspired by Pinterest

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Quickactionview

Materialfabspeeddial
Android UI library of FAB speed dial
Stars: ✭ 193 (+4.32%)
Mutual labels:  material-design, fab
Android Material Design For Pre Lollipop
Various UI implementations, animations & effects based on Material Design compatible with pre Lollipop devices as well. (Work in progess)
Stars: ✭ 585 (+216.22%)
Mutual labels:  material-design, fab
Jjfloatingactionbutton
Floating Action Button for iOS
Stars: ✭ 243 (+31.35%)
Mutual labels:  material-design, fab
React Fab Fan
Floating action button fan built with react and react-motion
Stars: ✭ 14 (-92.43%)
Mutual labels:  material-design, fab
Toolbar Button
FAB to Toolbar Button library for Android Material Collapsing Toolbar
Stars: ✭ 299 (+61.62%)
Mutual labels:  material-design, fab
Material Sheet Fab
Android library that provides the floating action button to sheet transition from Google's Material Design.
Stars: ✭ 1,584 (+756.22%)
Mutual labels:  material-design, fab
Admin Template
JSF responsive admin template based on Bootstrap and AdminLTE
Stars: ✭ 170 (-8.11%)
Mutual labels:  material-design
Colorsheet
A color picker bottom sheet 🌈
Stars: ✭ 179 (-3.24%)
Mutual labels:  material-design
Materialdesign2
A beautiful app designed with Material Design 2 using Android X.
Stars: ✭ 170 (-8.11%)
Mutual labels:  material-design
Materialdesign Svg
@mdi/svg Dist for Material Design Icons.
Stars: ✭ 166 (-10.27%)
Mutual labels:  material-design
Whatsappbetaupdater
An app to update WhatsApp to the latest beta version available on Android. Based on Material Design.
Stars: ✭ 183 (-1.08%)
Mutual labels:  material-design
Dotsindicator
Three material Dots Indicators for view pagers in Android !
Stars: ✭ 2,447 (+1222.7%)
Mutual labels:  material-design
Ripplejs
vanilla Material Design ripples
Stars: ✭ 177 (-4.32%)
Mutual labels:  material-design
Material Components Android
Modular and customizable Material Design UI components for Android
Stars: ✭ 13,128 (+6996.22%)
Mutual labels:  material-design
Preact Mdl
💥 A collection of Preact Components that encapsulate Google's Material Design Lite.
Stars: ✭ 179 (-3.24%)
Mutual labels:  material-design
Material Design Guideline
A library for Android developers who want to create layout which follows Google material design principle.
Stars: ✭ 170 (-8.11%)
Mutual labels:  material-design
React Material Components Web
React wrapper of Google's Material Components Web
Stars: ✭ 184 (-0.54%)
Mutual labels:  material-design
Minimal Todo
Material To-Do App
Stars: ✭ 2,051 (+1008.65%)
Mutual labels:  material-design
Morpheus
A Flutter package for easily implementing Material Design navigation transitions.
Stars: ✭ 177 (-4.32%)
Mutual labels:  material-design
Materialprogressbar
Material Design ProgressBar with consistent appearance
Stars: ✭ 2,145 (+1059.46%)
Mutual labels:  material-design

QuickActionView

View that shows quick actions when long pressed, inspired by Pinterest

Build Status

Sample Gif

Gradle Dependency

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Then, add the library to your project build.gradle

dependencies {
    compile 'com.github.Commit451:QuickActionView:latest.release.here'
}

Basic Usage

See the sample app for usage within a normal layout, as well as within a list using RecyclerView. In the most basic usage:

View view = findViewById(R.id.your_view);
QuickActionView.make(this)
      .addActions(R.menu.actions)
      .register(view);

You can also create Actions at runtime:

Drawable icon = ContextCompat.getDrawable(this, R.drawable.ic_favorite_24dp);
String title = getString(R.string.action_favorite);
Action action = new Action(1337, icon, title);
QuickActionView.make(this)
        .addAction(action)
        //more configuring
        .register(view);

Configuring the QuickActionView

QuickActionView can be customized globally, or on a per Action basis.

QuickActionView.make(this)
                .addActions(R.menu.actions)
                .setOnActionSelectedListener(mQuickActionListener)
                .setBackgroundColor(Color.RED)
                .setTextColor(Color.BLUE)
                .setTextSize(30)
                .setScrimColor(Color.parseColor("#99FFFFFF"))
                //etc
                .register(view);

Configuring Action Items

Use the QuickActionConfig builder to create custom configurations for each action item you create.

//Give one of the quick actions custom colors
Action.Config actionConfig = new Action.Config()
        .setBackgroundColor(Color.BLUE)
        .setTextColor(Color.MAGENTA);

QuickActionView.make(this)
        .addActions(R.menu.actions)
        //the custom Action.Cofig will only apply to the addToCart action
        .setActionConfig(actionConfig, R.id.action_add_to_cart)
        .register(findViewById(R.id.custom_parent));

Customizing Animations

You can even customize the animation performed when the actions come into view and go out of view. FadeAnimator PopAnimator and SlideFromCenterAnimator are three pre-built animators, and all you need to do to create your own is implement ActionsInAnimator, ActionsOutAnimator and call setActionsInAnimator and setActionsOutAnimator respectively.

Listening for Events

You can hook into the interesting events a QuickActionView has:

QuickActionView.make(this)
      .addActions(R.menu.actions)
      .setOnActionSelectedListener(mQuickActionListener)
      .setOnShowListener(mQuickActionShowListener)
      .setOnDismissListener(mQuickActionDismissListener)
      .setOnActionHoverChangedListener(mOnActionHoverChangedListener)
      .register(view);

See the sample for more detail.

License

Copyright 2020 Commit 451

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].