Created
April 6, 2020 12:15
-
-
Save avipars/a6557ae9b16aabee99a3cb3884a985ba to your computer and use it in GitHub Desktop.
Badge for my app
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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/relative" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?android:attr/selectableItemBackgroundBorderless" | |
android:clickable="true" | |
android:focusable="true" | |
android:orientation="vertical" | |
tools:targetApi="m"> | |
<!-- grid items for RecyclerView --> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="55dp" | |
android:layout_height="60dp" | |
android:adjustViewBounds="true" | |
android:layout_centerHorizontal="true" | |
android:layout_centerInParent="true" | |
android:layout_gravity="center" | |
android:scaleType="fitXY" | |
android:paddingBottom="@dimen/image" | |
android:layout_marginBottom="@dimen/text_padding" | |
app:srcCompat="@drawable/programmer" | |
tools:ignore="ContentDescription" /> | |
<TextView | |
android:id="@+id/name" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_below="@id/image" | |
android:textColor="?attr/textColor" | |
android:layout_centerHorizontal="true" | |
android:layout_alignParentBottom="true" | |
android:layout_gravity="bottom|center" | |
android:layout_marginTop="@dimen/text_padding" | |
android:paddingBottom="@dimen/text_padding" | |
android:text="@string/programmer_activity" /> | |
</RelativeLayout> |
AmosKorir
commented
Apr 6, 2020
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/image"
android:textColor="?attr/textColor"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|center"
android:layout_marginTop="@dimen/text_padding"
android:paddingBottom="@dimen/text_padding"
android:text="@string/programmer_activity" />
<TextView
android:rotation="25"
android:id="@+id/badge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:padding="10dp"
android:text=""
android:textSize="12dp"
android:textColor="?attr/textColor" />
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment