-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
I have a layout that has two columns, they are defined as LinearLayout, see code below. I think AutoFixTextView does not take into account the size of the LinearLayout it is contained in, but one level up. This results in the word being truncated, see the attached screen-shot (it should end with PNG).
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:background="@drawable/my_background_border"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:background="@drawable/my_background_border"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center"
android:background="@drawable/my_background_border"
>
<android.support.design.widget.FloatingActionButton
android:id="@+id/previous_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|left"
android:src="@drawable/navigate_previous" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/next_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|left"
android:src="@drawable/navigate_next" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/card_text_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:background="@drawable/my_background_border"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="1"
android:gravity="center"
android:background="@drawable/my_background_border"
>
<com.thedatawise.www.toddlerflip.AutoResizeTextView
android:id="@+id/card_back_text"
android:textColor="#000"
android:textAllCaps="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:textSize="100sp"
android:text="BACK PAGE" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
Metadata
Metadata
Assignees
Labels
No labels