-1

enter image description hereI have an image-view and text-view in my application page. When i am trying to set text to the text-view it is resulting into multi-lines but i want whole text into one single line. how can i do that? I want that text-view on 90 degree angle

<ImageView
    android:layout_height="match_parent"
    android:id="@+id/frames"
    android:layout_width="280dp"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true" />

<FrameLayout
    android:layout_height="match_parent"
    android:layout_width="80dp"
    android:layout_alignParentEnd="true">

    <TextView
        android:text="TextViewhsfsjchsbcdbbbbbbbbbbbbbbbbbbbbbbbbbbbb"

        android:layout_width="wrap_content"
        android:textAlignment="center"
        android:layout_alignParentBottom="false"
        android:rotation="-90"
        android:id="@+id/textforscenes"
        android:layout_marginLeft="15dp"
        android:gravity="center"
        android:layout_height="match_parent" />
</FrameLayout>

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Aakash MEHTA
  • 75
  • 1
  • 5

2 Answers2

1

SingleLine is deprecated. Use maxLines instead.

<TextView
    android:maxLines="1"
    android:text="TextViewhsfsjchsbcdbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
    android:layout_width="wrap_content"
    android:textAlignment="center"
    android:layout_alignParentBottom="false"
    android:rotation="-90"
    android:id="@+id/textforscenes"
    android:layout_marginLeft="15dp"
    android:gravity="center"
    android:layout_height="match_parent" />
kws
  • 926
  • 7
  • 11
0

Try android:maxLines="1" or android:singleLine="true"

Mufad
  • 191
  • 1
  • 15