CommonsWare Android Components (CWAC)
The CommonsWare Android Components, or CWAC, are open source libraries to help solve various tactical problems with Android development. Most CWAC components are packaged as a tiny JAR file that you can add to your project (e.g., drop it in libs/), requiring at most other CWAC JARs as dependencies.
The current supported CWAC components, and their GitHub repositories, are:
- cwac-adapter: Provides an AdapterWrapper, a simple wrapper class that, by default, delegates all ListAdapter methods to a wrapped ListAdapter. The idea is that you can extend AdapterWrapper and only override certain ListAdapter methods, with the rest handled via the wrapped adapter.
- cwac-camera: Provides a `CameraView` and `CameraFragment` to simplify access to the native camera API.
- cwac-colormixer: Provides a simple color mixer widget, dialog, activity, and preference.
- cwac-endless: Provides the EndlessAdapter, a wrapper for an existing ListAdapter that adds "endless list" capability. When the user scrolls to the bottom of the list, if there is more data for this list to be retrieved, your code gets invoked in a background thread to fetch the new rows, which then get seamlessly attached to the bottom of the list.
- cwac-layouts: Provides some Android container classes for specialized situations.
- cwac-loaderex: Provides an implementation of the Loader framework for SQLite databases, SQLCipher for Android databases, and SharedPreferences.
- cwac-locpoll: Provides a service that will find the current location and feed it back to you, designed to be triggered by an alarm, where the service will keep the device awake.
- cwac-masterdetail: Provides a canned implementation of the master-detail pattern, to blend together a few Android design patterns into a resuable library
- cwac-merge: Provides the MergeAdapter, a ListAdapter that blends multiple Views or ListAdapters into a single ListAdapter. Use this for section headings, blending multiple sources of data together, etc.
Provides classes in support of
ViewPager, such as the
Provides classes in support of the
Presentationengine in Android, for driving separate content to an external display (compared to what you shown on the device's own display)
StreamProvider, an extended version of Google's
FileProvider, for making files, resources, and assets available to other apps via a
- cwac-sacklist: Provides SackOfViewsAdapter, which accepts a list of View objects and presents them in a ListAdapter.
- cwac-wakeful: Provides the WakefulIntentService, a refinement of the IntentService that keeps the device awake while background tasks are being processed. This is useful for work to be scheduled via the AlarmManager.
And, in case you were wondering, CWAC is pronounced like "quack".