ContactsAutoCompleteTextView


Source link: https://github.com/lolobosse/ContactsAutoCompleteTextView

ContactAutoCompleteTextView

ContactAutoCompleteTextView is a view which allows the user to search across all his contacts to get email or phone number.

The thread to get the data is asynchronous, which allow the view to load very fast (without this, you can need 1 to 2 seconds for 1500 contacts).

[Javadoc] ( http://lolobosse.github.io/ContactsAutoCompleteTextView/)

Demo

Play store demo available

Roadmap

  1. Test the stability of the lib and improve the lifecycles of it (cache data)
  2. Add the ability to have postal addresses
  3. Add the photo from all contact providers (not only from the local storage --> we want to have as many photos as in the native contact app).
  4. Test on other resolutions: XHDPI, XXHDPI, XXXHDPI (Please open issue, even if it works, to allow me to update the readme...)
  5. Write/Improve wiki
  6. Test the possibility of changing the adapter.
  7. Make a maven version.
  8. Write a demo app.

How does it work?

Lib available for Gradle:

compile 'com.github.lolobosse.contactsautocompletetextview:library:0.1.2'

And for Maven:

<dependency>
<groupId>com.github.lolobosse.contactsautocompletetextview</groupId>
<artifactId>library</artifactId>
<version>0.1.2</version>
<type>aar</type> </dependency>

Create a subfolder in your project folder, navigate to it with terminal and then type:

git clone https://github.com/lolobosse/ContactsAutoCompleteTextView.git

Import it in Android studio as a module. (or make it directly from VCS Github menu of Android Studio).

Then create a view, for example like this:

<com.meyerlaurent.cactv.AutoCompleteContactTextView

 android:id="@+id/fragment_send_auto_text_view"

 android:layout_width="match_parent"

 android:layout_height="wrap_content"

 auto:typedLettersHaveDifferentStyle="true"

 auto:styleOfTypedLetters="bold"

 auto:displayPhotoIfAvailable="true"

 auto:typeOfData="email"/>

DO NOT FORGET TO SET: xmlns:auto="http://schemas.android.com/apk/res-auto" on your parent layout.

Enjoy 😄

Attributes

  • colorOfData : (color) color of the data which will be displayed
  • colorOfNames : (color) color of the name of concerned people
  • typedLettersHaveDifferentStyle : (boolean) if you set it to true the letter you type will be highlighted in the name of the person.
  • styleOfTypedLetters : (enum) (only available if typedLettersHaveDifferentStyle true), the highlight of letters will be underlined or bold.
  • getTextPattern: (String) return pattern of the name selected, make your combinations with:
    1. [N] : Name of people in upper case.
    2. [n] : Name of people in lower case.
    3. [Nn] : Name in normal style. For Example: Laurent.
    4. [d]: The data
  • displayPhotoIfAvailable : (boolean) Should the view include the photo of the contact.
  • typeOfData : (enum) What you want for data
    1. phone : Phone numbers
    2. email : Emails

###ChangeMap###

  • 0.1.1

    • Fixed issue #3
    • Fixed issue #4
  • 0.1

    • Initial release

The software is under MIT License.

The MIT License (MIT)

Copyright (c) Laurent Meyer, 2015

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources

Library that allows you to scale, rotate, crop, alter aspect ratios, change brightness and contrast.

CacheManage for Android.

Beautiful Fancy Button on endorphins.

Icons, Borders, Radius for Android buttons with selectable 16 Icon Fonts precompiled! No need to manually using &#xf087; for icon font character anymore!

An Android Library that help you to customize views (Button, EditText, ImageView), by adding border with the size and color that you want, and give it the corner radius that you seems cool, and you can also make an imageview looks like a circle.

Kotlinify is a suite of extension and classes for easier daily android development in Kotlin.

Rx binding of stock Android Activities & Fragment Lifecycle, avoiding memory leak.

You can dispose an Rx operation when the activity state changes.

Or pause an Rx chain until it's not on an event, for example wait for activity to be resumed to perform an animation.

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