base-adapter-helper


Source link: https://github.com/JoanZapata/base-adapter-helper

BaseAdapterHelper aims to make BaseAdapter's getView() method much more readable, getting rid of the ViewHolder pattern boilerplate code.

QuickAdapter allows you to shorten the code of most usual BaseAdapter, taking care of implementing everything for you based on your data list. You only need to focus on the mapping between your view and your model.

Get it

BaseAdapter Helper is now available on Maven Central.

<dependency>
<groupId>com.joanzapata.android</groupId>
<artifactId>base-adapter-helper</artifactId>
<version>1.1.11</version> </dependency>

or

compile 'com.joanzapata.android:base-adapter-helper:1.1.11'

Features

BaseAdapterHelper

  • setText() Calls setText(String) on any TextView.
  • setAlpha() Calls setAlpha(float) on any View.
  • setVisible() Calls setVisibility(int) on any View.
  • linkify() Calls Linkify.addLinks(view, ALL) on any TextView.
  • setTypeface() Calls setTypeface(Typeface) on any TextView.
  • setProgress() Calls setProgress(int) on any ProgressBar.
  • setMax() Calls setMax(int) on any ProgressBar.
  • setRating() Calls setRating(int) on any RatingBar.
  • setImageResource() Calls setImageResource(int) on any ImageView.
  • setImageDrawable() Calls setImageDrawable(Drawable) on any ImageView.
  • setImageBitmap() Calls setImageBitmap(Bitmap) on any ImageView.
  • setImageUrl() Uses Square's Picasso to download the image and put it in an ImageView.
  • setImageBuilder() Associates a Square's Picasso RequestBuilder to an ImageView.
  • setOnClickListener()
  • setOnTouchListener()
  • setOnLongClickListener()
  • setTag()
  • setChecked()
  • setAdapter()
  • If you need something else, please report an issue. Any contribution is welcome! In the meanwhile, you can still use getView(id)on the adapter to do custom operations.

QuickAdapter

  • showIndeterminateProgress(boolean) Shows/hides an indeterminate progress at the end of the list.

Performance

The performances using the BaseAdapter Helper are equivalent to the ones of the ViewHolder pattern. It has been tested on thousands items list of complex item structure with more than 30 views to be adapted on each item, and the getView() method has shown similar execution times.

License

Copyright 2013 Joan Zapata  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.  This project uses Picasso from Square, which is licensed under the same license as this project. You can find the project page at

http://square.github.io/picasso/

The sample application uses Twitter4j by Yusuke Yamamoto,  ActionBarSherlock by Jake Wharton, and AndroidAnnotations by Pierre-Yves Ricau,  all of them being licensed under the Apache license version 2.0. 

Resources

MultiActionTextView allows to create Spannable TextView with and without under line.

PagerSlidingTabStrip is an interactive indicator to navigate between the different pages of a ViewPager. Inspired by astuetz/PagerSlidingTabStrip.

jraf-android-util is a collection of general purpose utilities for Android.

Why it exists

There is currently no way for an android application to catch and report ANR errors. If your application is not in the play store (either because you are still developing it or because you are distributing it differently), the only way to investigate an ANR is to pull the file /data/anr/traces.txt.

What it does

It sets up a watchdog timer that will detect when the UI thread stops responding. When it does, it raises an error with the main thread's stack trace.

XStream is a simple library to serialize objects to XML and back again.

Features:

  • Ease of use
  • No mappings required
  • Performance
  • Clean XML
  • Requires no modifications to objects
  • Full object graph support
  • Integrates with other XML APIs
  • Customizable conversion strategies
  • Security framework
  • Error messages
  • Alternative output format

droid-fu is a utility library for your daily Android needs.

NOTICE: This project has been discontinued. Developers are putting all efforts into ignition now, which is basically a rewritten but API breaking version of Droid-Fu that aims to have better project structure, better and less intrusive APIs, better documentation (we have samples now!) and proper release and issue management.

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