S
S
Stanislav Korolevskiy2017-10-20 22:45:04
Android
Stanislav Korolevskiy, 2017-10-20 22:45:04

How to set auto-height of textView?

Can't adjust auto height. Registered android:singleLine="false", but there is no effect.

<TextView
            android:id="@+id/descriptionLabel"
            android:layout_width="wrap_content"
            android:layout_height="35dp"
            android:layout_alignEnd="@+id/titleLabel"
            android:layout_alignLeft="@+id/titleLabel"
            android:layout_alignRight="@+id/titleLabel"
            android:layout_alignStart="@+id/titleLabel"
            android:layout_below="@+id/titleLabel"
            android:layout_marginBottom="10dp"
            android:layout_marginTop="10dp"
            android:singleLine="false"
            android:text="TextView"
            android:textColor="@color/White_232"
            android:textSize="14dp" />

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Korolevskiy, 2017-10-21
@korolevsky_s

Found the problem. The RelativeLayout had a fixed height. The following helped:

<RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

D
Denis Zagaevsky, 2017-10-21
@zagayevskiy

android:layout_height="wrap_content"
+
minHeight set.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question