Skip to main content


Showing posts with the label Card List

Cards : Material Design Tips

From Google material design documentation A card is a piece of paper with unique related data that serves as an entry point to more detailed information. For example, a card could contain a photo, text, and a link about a single subject. How to add? I. In your build.gradle include the cardview library: dependencies { compile ''// where X.X.X version} II. Declare your card inside any layout.xml file and insert views inside it. <"match_parent"android:layout_height="200dp"><TextViewandroid:text="Hello World!"android:layout_width="wrap_content"android:layout_height="wrap_content"/></> Use android:clipToPadding="false" on the card parent allows you to prevent posible clips in the outer shadows of the card. How to style? I. Declare your custom style in your styles.xml file. <st…

How to Make an Android Card List

Ever since the launch of Google Now more than six months ago the Card View that it made famous has been kind of a big deal.  It makes sense, we Android users spent many years overlooking the lack of style on Android, and arguing over whether that was even important.  Now Android is finally getting a sense of style with the Holo theme, the the Card View plays into that amazingly. Google Now’s cards have a lot of functionality, including stacking, swipe to remove, and much more.  If you’re looking for that kind of functionality check out Nadav Fima’s excellent CardsUI library. Adding a card look to your ListViews can really make them pop, and its much easier than you might think.
Show Me the Code!All you need to do is add a background drawable to your list items. Create a file called bg_card.xml in your /res/drawable folder with the following content:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="…