Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cutting content in TextView

Tags:

java

android

xml

when write content in arabic inside TextView first word in each line will cutting!!

this problem happen only when i set typeface to TextView!

cuttig

here my xml code

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:scrollbars="vertical"
    android:id="@+id/articleTEXT"

    />

note: content will retrieve from SQLite Database.

like image 793
alsadqy Avatar asked Aug 23 '13 03:08

alsadqy


2 Answers

It will work,add padding in linear layout and take width of textview match parent.

  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:padding="4dp">

            <TextView
                android:id="@+id/articleTEXT"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scrollbars="vertical"
            />

        </LinearLayout>
like image 84
RKM Avatar answered Sep 20 '22 15:09

RKM


You could try placing this in your LinearLayout or TextView:

    android:layout_marginRight="20dp"
like image 27
Tana Avatar answered Sep 18 '22 15:09

Tana