RememberEditText


Source link: https://github.com/markzhai/RememberEditText

RememberEditText

An EditText which can remember last input, free developer from managing cache everywhere themselves.

???

Introduction

Have you been annoyed with entering the same stuff once and once like username, thread-reply? RememberEditText can remember the last several input automatically and offers a dropdown list to let user choose.

How

View: RememberEditText is an EditText view, but not a viewgroup extends linearlayout like some project. I made it so in order to decrease view layers.

Cache: RememberEditText simply puts its cache in SharedPreference, and keeps a local hashmap version to free from visiting SharedPreference everytime, thus speeds up its looks up and update.

Usage

dependencies {

  compile 'cn.zhaiyifan:rememberedittext:0.9.0' 
}
<cn.zhaiyifan.rememberedittext.RememberEditText
  android:id="@+id/username"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_centerHorizontal="true"
  android:layout_marginLeft="@dimen/activity_horizontal_margin"
  android:layout_marginRight="@dimen/activity_horizontal_margin"
  android:layout_marginTop="150dp"
  android:hint="Username/PhoneNumber"
  android:inputType="text"
  app:rememberCount="3"
  app:rememberId="username" />

styles:

<declare-styleable name="RememberEditText">
  <!-- auto fill in cache, by default true -->
  <attr name="autoFill" format="boolean" />
  <!-- auto save to cache, by default true -->
  <attr name="autoSave" format="boolean" />
  <!-- dropdown icon to choose between cache values, by default use abc_spinner_mtrl_am_alpha -->
  <attr name="dropDownIcon" format="reference" />
  <!-- delete icon to delete cache value, by default use abc_ic_clear_mtrl_alpha -->
  <attr name="deleteIcon" format="reference" />
  <!-- id of cache, will use view id if not set -->
  <attr name="rememberId" format="string" />
  <!-- count of cache to keep, by default 3 -->
  <attr name="rememberCount" format="integer" /> </declare-styleable>

TODO

  • Make cache loading async.
  • Add more hint mode.
  • Enable pair mode, like username/password.
  • Center gravity is not supported yet, need help (icon is missing when set center gravity).
  • Add encrpytion mode to save stuff like password (low priority).
  • Support RTL (Right to Left).

Screenshots

Resources

This plugin adds support for writing Android applications using the Groovy language.

Plugin has been successfully tested with Android Studio. It is recommended, for performance, memory and battery life, that you use @CompileStatic wherever possible.

Lint Cleaner Plugin removes unused resources reported by Android lint including strings, colors and dimensions.

This plugin allows you to upload your Proguard mapping files to BugSense as part of the build process.

Reactive Extension (Rx) Adaptor for Netty.

ResideLayout is an Android Layout which has a same function like RESideMenu.

Based on SlidePanelLayout in support v4 library. Can be used on Android 1.6

Android Floating Label Widgets is a set of input widgets with a hint label that floats when input is not empty.

This library has lots of interfaces and helper classes to help you either extend it and/or change the existing behavior:

  • LabelAnimator
  • ItemPrinter
  • ItemPicker

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