Posts

Showing posts with the label Card

A Card Library

Image
In the last weeks I tried to collect my code and build a Card library. I wanted something that could realize many types of Card (not all, of course), with some built-in features without having to rewrite each time a lot of code. I am still developing but a first version is presentable Card Library provides a custom tag CardView to display a UI Card. It provides different parts as a Header, a Thumbnail, a Shadow, a MainContentArea where you can inflate your custom layout You can customize the global layout as you like You can have some built-in features as OnClickListener, OnSwipeListener , OnLongClickListener CardHeader` provides an overflow button with a PopupMenuListener, a button to expand/collapse an area, or a customizable button with its listener. CardThumbnail` load a Bitmap with a resource ID or with a URL using `LRUCache` and an `AsyncTask` Create a `Card` is is pretty simple. First, you need an XML layout that will display the `Card`. Th...