An AutoCompleteTextView with builtin Adapter with the emails in the device.

Overview

EmailAutoCompleteTextView

Android Arsenal Build Status License

An AutoCompleteTextView with builtin Adapter with the emails in the device.

The library automatically adds GET_ACCOUNTS permission into your Manifest. For Android Marshmallow, the library also handles runtime permissions automagically.

  • If the permission is already given by the user, or if the device is below Android M, it setups itself and auto completion of email addresses works right away.
  • If the permission is not given, there will be a checkbox shown below the view to indicate that we require the permission.
  • If the user chooses "never", the checkbox will be hidden.

Usage

The library is heavily influced by TextInputLayout from the design support library.

Just like the TextInputLayout you need to add AutoCompleteTextView inside in the xml as a child.

  <com.tasomaniac.widget.EmailAutoCompleteLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:permissionText="@string/permission_text">

    <AutoCompleteTextView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"/>
  </com.tasomaniac.widget.EmailAutoCompleteLayout>

Usage with Design Support Lib

You may want to use TextInputLayout to have beautiful label animation you find the GIF above. In that case, you can use the alternative dependency with -design postfix and you will be good to go. It will automatically use the design library version and it will have all the features of TextInputLayout

Download

Dependency to just use EmailAutoCompleteLayout

compile 'com.tasomaniac:emailautocompletetextview:0.2'

Dependency to use with TextInputLayout

compile 'com.tasomaniac:emailautocompletetextview-design:0.2'

Snapshots of the development version are available in Sonatype's snapshots repository.

License

Copyright (C) 2015 Said Tahsin Dane

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.
You might also like...
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...

FastAdapter The FastAdapter is here to simplify creating adapters for RecyclerViews. Don't worry about the adapter anymore. Just write the logic for h

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.

⚠️ Archived: this repository is no longer going to be maintained. SectionedRecyclerViewAdapter An Adapter that allows a RecyclerView to be split into

Android - A ListView adapter with support for multiple choice modal selection
Android - A ListView adapter with support for multiple choice modal selection

MultiChoiceAdapter MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmai

A slim & clean & typeable Adapter without# VIEWHOLDER
A slim & clean & typeable Adapter without# VIEWHOLDER

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED First At A Glance :) Intro A slim & clean & typeable Adapter without# VIEWHOLDER Features No V

Create a new adapter for a RecyclerView or ViewPager is now much easier.

Efficient Adapter for Android Create a new adapter for a RecyclerView or ViewPager is now much easier. Overview Create a list of elements into a Recyc

Adapter Kit is a set of useful adapters for Android.
Adapter Kit is a set of useful adapters for Android.

Adapter Kit Adapter Kit is a set of useful adapters for Android. The kit currently includes, Instant Adapter Instant Cursor Adapter Simple Section Ada

Simplify Adapter creation for your Android ListViews.

FunDapter takes the pain and hassle out of creating a new Adapter class for each ListView you have in your Android app. It is a new approach to custom

Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.
Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.

smart-recycler-adapter Never code any boilerplate RecyclerAdapter again! This library will make it easy and painless to map your data item with a targ

Rx based RecyclerView Adapter
Rx based RecyclerView Adapter

RxRecyclerAdapter Rx based generic RecyclerView Adapter Library. How to use it? Example! Enable Databinding by adding these lines to your build.gradle

This Repository simplifies working with RecyclerView Adapter

AutoAdapter This Repository simplifies working with RecyclerView Adapter Gradle: Add it in your root build.gradle at the end of repositories: allproj

Generic RecyclerView adapter

Generic RecyclerView Adapter. Lightweight library which simplifies creating RecyclerView adapters and illuminates writing boilerplate code. Creating a

RecyclerView Adapter Library with different models and different layouts as convenient as possible.
RecyclerView Adapter Library with different models and different layouts as convenient as possible.

RecyclerView Presenter Convenience library to handle different view types with different presenters in a single RecyclerView. How to install repositor

A simple and easy adapter for RecyclerView. You don't have to make adapters and view holders anymore. Slush will help you.
A simple and easy adapter for RecyclerView. You don't have to make adapters and view holders anymore. Slush will help you.

한국어 No more boilerplate adapters and view holders. Slush will make using RecyclerView easy and fast. The goal of this project is to make RecyclerView,

Android RecyclerView Adapter with nested items & expand/contract functionality
Android RecyclerView Adapter with nested items & expand/contract functionality

AccordionRecycler Android RecyclerView Adapter with nested items & expand/contract functionality With AccordionRecycler you can easily create awesome

An adapter to create Android RecyclerViews with sections, providing headers and footers.
An adapter to create Android RecyclerViews with sections, providing headers and footers.

⚠ This library is no longer maintained ⚠️ SectionedRecyclerView An adapter to create Android RecyclerViews with sections, providing headers and footer

Don't write a RecyclerView adapter again. Not even a ViewHolder!

LastAdapter Don't write a RecyclerView adapter again. Not even a ViewHolder! Based on Android Data Binding Written in Kotlin No need to write the adap

Android library defining adapter classes of RecyclerView to manage multiple view types
Android library defining adapter classes of RecyclerView to manage multiple view types

RecyclerView-MultipleViewTypeAdapter RecyclerView adapter classes for managing multiple view types Release Note [Release Note] (https://github.com/yqr

A Common RecyclerView.Adapter  implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc.
A Common RecyclerView.Adapter implementation which supports all kind of items and has useful data operating APIs such as remove,add,etc.

##PowerfulRecyclerViewAdapter A Common RecyclerView.Adapter implementation which supports any kind of items and has useful data operating APIs such as

kotlin dsl for kids to simplify RecyclerView.Adapter logic

KidAdapter RecyclerView adapter for kids. A kotlin dsl mechanism to simplify and reduce boilerplate logic of a RecyclerView.Adapter. With KidAdapter y

Comments
  • Rendering issue in preview

    Rendering issue in preview

    I can't preview the layout in Android Studio. Maybe you should use View.isInEditMode() to avoid getting the accounts while in preview mode.

    java.lang.UnsupportedOperationException: Unsupported Service: account
        at com.android.layoutlib.bridge.android.BridgeContext.getSystemService(BridgeContext.java:563)
        at android.accounts.AccountManager.get(AccountManager.java:311)
        at com.tasomaniac.widget.EmailAutoCompleteLayout.createEmailAddressAdapter(EmailAutoCompleteLayout.java:134)
        at com.tasomaniac.widget.EmailAutoCompleteLayout.setupAccountAutocomplete(EmailAutoCompleteLayout.java:111)
        at com.tasomaniac.widget.EmailAutoCompleteLayout.setAutoCompleteTextView(EmailAutoCompleteLayout.java:90)
        at com.tasomaniac.widget.EmailAutoCompleteLayout.addView(EmailAutoCompleteLayout.java:72)
        at android.view.ViewGroup.addView(ViewGroup.java:4117)
        at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:839)
        at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
        at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
        at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
        at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
        at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
        at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:223)
        at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
        at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
        at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:510)
        at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:498)
        at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:888)
        at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:498)
        at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:72)
        at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:610)
        at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:607)
        at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:362)
        at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:607)
        at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:629)
        at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:652)
        at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1700(AndroidLayoutPreviewToolWindowManager.java:80)
        at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:594)
        at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
        at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:589)
        at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
        at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
        at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
        at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
        at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
        at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
        at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
        at com.intellij.util.Alarm$Request$1.run(Alarm.java:351)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    opened by rubensousa 2
Owner
Said Tahsin Dane
Engineering Manager @deliveryhero
Said Tahsin Dane
Maildroid is a small robust android library for sending emails using SMTP server

Maildroid ?? Maildroid is a small robust android library for sending emails using SMTP server ?? Key Features • Add to your project • Documentation •

Nedim 174 Dec 22, 2022
Provides Ktor Server libs for building awesome Kotlin plugins which needs to provide builtin HTTP servers

Ktor Plugin Provides Ktor Server libs for building awesome Kotlin plugins which needs to provide builtin HTTP servers. Requires: https://github.com/Po

null 0 Nov 13, 2021
Native Device security checks, Rooted/Jailbroken, Not real device, Developer mode is on, On external drive.

palestine_trusted_device Native Device security checks, Rooted/Jailbroken, Not real device, Developer mode is on, On external drive. Part of Palestine

Palestine Developers 3 Apr 19, 2022
Mirai-device-generator - Mirai Device Generator with kotlin

Mirai Device Generator Mirai DeviceInfo 生成器 作为插件运行时会提供 BotConfigurationAlterer 服

cssxsh 46 Jan 1, 2023
HyperUPnP is Android Application that lets you to Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device.

Hyper UPnP Android UPnP/DLNA client Stream Media from PC, NAS or any other device running UPnP/DLNA compliant media server to your Android Device. Int

Var Bhat 8 Jul 17, 2022
An adapter which could be used to achieve a parallax effect on RecyclerView.

android-parallax-recycleview Integration Step 1. Add the JitPack repository to your build file repositories { maven { url "https://jitpack

Pedro Oliveira 1.6k Nov 17, 2022
Android library defining adapter classes of RecyclerView to manage multiple view types

RecyclerView-MultipleViewTypeAdapter RecyclerView adapter classes for managing multiple view types Release Note [Release Note] (https://github.com/yqr

Yoshihito Ikeda 414 Nov 21, 2022
Kotlin way of building RecyclerView Adapter 🧩. You do not have to write RecyclerView Adapters again and again and suffer from handling of different view types. Kiel will help you.

Kiel Kiel is a RecyclerView.Adapter with a minimalistic and convenient Kotlin DSL which provides utility on top of Android's normal RecyclerView.Adapt

ibrahim yilmaz 370 Jan 2, 2023