ChipsLibrary


Source link: https://github.com/AndroidDeveloperLB/ChipsLibrary

ChipsLibrary

This is a fork of Google's chips library shown here, and can be downloaded from here

What's different from the original library :

  1. It's easy to import and build on Eclipse. :)

  2. Removed buggy dragging feature and the classes it uses.

  3. fixed setOnItemClickListener (for clicking on chips) so that it will use both the chips library's logic AND your code.

  4. Removed T9 searching for phones, and instead you can search for either phone numbers or names, by exactly what you type. Of course, you can always revert back to what Google has done, if you wish.

  5. Added features :

  6. getRecipients - query all recipients (should usually be done on a background thread)

  7. addRecipient , removeRecipient - adds/removes a recipient. also, ability to control if you wish to be notified about chips added/removed when you are the one who triggered it.

  8. setChipListener - sets a listener that'll notify you when the number of chips has changed.

  9. setFocusBehavior - ability to choose what to do when focus removed/received.

  10. New CTOR for the BaseRecipientAdapter, which allows to choose which recipients to use . Note that this is only for demonstrations

  11. setChosenRecipients - ability to set all chosen recipients.

  12. removeAllRecipients - removes all of the chosen recipients

  13. getChosenRecipients - returns all of the chosen recipients

IMPORTANT: you can only safely call the recipients' operations after the view got its size feagured out. You can use the function "runJustBeforeBeingDrawn" as I've written on some StackOverflow posts (like here), in case you need to use those operations as soon as possible.

In order to make it easy for you to find the code for those added features, I've put them all at the end of "RecipientEditTextView.java" file.

  1. Made the code a bit more readable. Not enough, but still... :)

Notes :

  • on some devices (like Galaxy S2 and Galaxy S3) , pressing backspace after the chip will sometimes show its number instead of removing the chip (and its data) completely. There might be some other weird behaviors on those devices, which are caused due to changes on the default behavior of MultiAutoCompleteTextView

  • It seems the original library has a lot of "TODO"s and even some that say to fix issues. Not sure how important they are though

  • I've tried to balance the changes I've made vs the code that is available, so that I won't create more bugs. If you've noticed a bug, please write about it, especially if you know how to fix it.

  • Like the original library, this one's minimal API is 11 .

  • Be sure to check the sample. It's a bit messy, but it shows what can be done.

  • There is also a "demo" for those who don't wish to use it to show real contacts. It lacks some of the features of the original one (showing contacts images, showing alternative contacts, and maybe others), but you can customize it to your needs and also add the missing features.

Resources

Use one line to apply almost famous libraries of proguard configurations.

RxDownloader is an RxWrapped Download Manager.

Simple JUnit rule for overriding RxJava/RxAndroid schedulers during unit tests.

A MultiScreen-Support-Library for Android.

A raised button that lowers down to 0dp of elevation.

Typer/writer TextView component.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes