Last active
January 29, 2018 22:14
-
-
Save vontell/104d1d014a4a152f8540613585160cd8 to your computer and use it in GitHub Desktop.
002 Chip View Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="horizontal" | |
android:background="@drawable/chip_background" | |
android:layout_width="wrap_content" | |
android:layout_height="32dp"> | |
<!-- | |
The circular image on the left of the chip | |
--> | |
<de.hdodenhof.circleimageview.CircleImageView | |
android:id="@+id/chip_image" | |
android:layout_width="32dp" | |
android:layout_height="32dp" /> | |
<!-- | |
The text to be displayed within the chip | |
Notes: 87% black = #DE000000 | |
--> | |
<TextView | |
android:id="@+id/chip_text" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:gravity="center_vertical" | |
android:layout_marginLeft="8dp" | |
android:layout_marginRight="4dp" | |
android:layout_marginTop="7dp" | |
android:text="Custom ChipView" | |
android:textColor="#DE000000" | |
android:textSize="13sp" /> | |
<!-- | |
The close icon if this chip is removable | |
--> | |
<ImageView | |
android:id="@+id/chip_close" | |
android:src="@drawable/ic_close" | |
android:layout_margin="4dp" | |
android:layout_marginTop="4dp" | |
android:layout_width="24dp" | |
android:layout_height="24dp" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment