Giter Club home page Giter Club logo

undobar's Introduction

UndoBar

This is a implementation for Android advanced UI pattern undo-bar, used in Gmail app, create by roman nurik

UndoBar was modified from Roman(@romannurik)'s undobar concept (https://code.google.com/p/romannurik-code/), and backport it to Android 2.x and make it easier to use

UndoBar Sample UndoBar Sample UndoBar Sample UndoBar Sample

How to use this library

  • Download this library, import to your IDE (eclipse...) as a library project.
  • Using Gradle(from 0.5), ps:if this not work, try to add "@aar" at the end.
compile 'com.cocosw:undobar:1.+' 

API

  • You can use UndoBar by just one line code
    UndoBarController.show(getActivity(), "Undo-bar title" , listener, undoToken);
  • Or you can also use UndoBar with builder style.
    new UndoBar(getActivity()).message("Undo-bar title").listener(listener).show();
  • UndoBar support customize style with background/icon/duration/animation attribution.
  • UndoBar provides 3 default styles. You can use them for different purpose like undo,refresh, or just use it as replacement of Toasts.
  • UndoBar will switch to KitKat look and feel in API-19 target.
  • UndoBar will determine if tranlucent mode(4.4) is using and adjust its position.
  • You can overwrite style in your project to change the look and feel. For example, you can use following lines in your style.xml to always use KitKat style UndoBar.
    <style name="UndoBar" parent="UndoBarKitKat"/>
    <style name="UndoBarMessage" parent="UndoBarMessageKitKat"/>
    <style name="UndoBarButton" parent="UndoBarButtonKitKat"/>

Contribute

  • Feel free to fork it

Other

  • Works perfectly with Crouton/Menudrawer/ABS

License

Copyright 2011, 2014 Liao Kai

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.

undobar's People

Contributors

dahlia avatar soarcn avatar

Watchers

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