Giter VIP home page Giter VIP logo

swipe-action-layout's Introduction

Swipe Action Layout Android Arsenal

A nice swipe layout that provides new actions with a material design look and feel.

Demo Screen Capture

Demo Screen Capture

Usage

  1. Add compile 'com.prolificinteractive:swipe-action-layout:0.0.1' to your dependencies.
  2. Wrap your list around SwipeActionLayout in your layouts or view hierarchy.
  3. Add a list of ActionItem using SwipeActionLayout#populateActionItems() method.
  4. Set a OnActionSelectedListener to listen for selected action and update the view accordingly.

Or

  1. Add compile 'com.prolificinteractive:swipe-action-layout:0.0.1' to your dependencies.
  2. Wrap your list around SwipeActionLayout in your layouts or view hierarchy.
  3. Create Objects that extend ActionItem and add them using SwipeActionLayout#populateActionItems() method.
  4. Override ActionItem#Execute() method to execute the action when selected.

Example:

  <com.prolificinteractive.swipeactionlayout.widget.SwipeActionLayout
      android:id="@+id/swipe_action_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:al_background="?attr/colorPrimary"
      >
      
      <!-- Insert your list here -->
      <include layout="@layout/example_recycler_view" />
  
  </com.prolificinteractive.swipeactionlayout.widget.SwipeActionLayout>

Customization

XML attributes:

  • al_background Set background color

  • al_elevation Set elevation

  • al_selector Set background selector

  • al_animate_to_start_duration Set the duration that the layout takes to get into its original position. Default is 300 Millisecond.

  • ai_margin Set action item margin

Mare sure to check sample for more examples.

Contributing

Would you like to contribute? Fork us and send a pull request! Be sure to checkout our issues first.

License

Swipe Action Layout is Copyright (c) 2016 Prolific Interactive. It may be redistributed under the terms specified in the LICENSE file.

Maintainers

prolific

Swipe Action Layout is maintained and funded by Prolific Interactive. The names and logos are trademarks of Prolific Interactive.

swipe-action-layout's People

Contributors

ekchang avatar quentin41500 avatar

Watchers

Michael jentsch avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.