I'm trying to create an birthday reminder app and I have on MainActivity one RecyclerView with grid view of items. And it looks like this:
And I have maximized TextView inside to 5 characters for reducing it and not exceed this note. How could I do this without maximizing characters of TextView to 5 characters and make this to look better?
This is my layout of grid_row_item
:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardBackgroundColor="#00000000"
card_view:cardElevation="0.01dp">
<RelativeLayout
android:background="@android:color/transparent"
android:id="@+id/top_layout"
android:layout_width="match_parent"
android:layout_height="140dp">
<ImageView
android:background="@drawable/note3"
android:id="@+id/img_thumbnail"
android:layout_width="320dp"
android:layout_height="180dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<helper.CustomTextView
android:id="@+id/first_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
android:textColor="#000000"
android:textSize="18sp"
android:maxLength="7"
android:ellipsize="end"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="48dp" />
<helper.CustomTextView
android:id="@+id/last_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
android:textSize="18sp"
android:maxLength="6"
android:ellipsize="end"
android:textColor="#000000"
android:layout_below="@+id/first_name"
android:layout_alignLeft="@+id/first_name"
android:layout_alignStart="@+id/first_name" />
<TextView
android:id="@+id/date_of_birthday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
<TextView
android:id="@+id/gender"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>