Rana.M Rana.M - 4 months ago 7
Android Question

TextView doesn't appear the whole text

what can i do to make the whole text in textView appear?

<TextView
android:text="رَضيـتُ بِاللهِ رَبَّـاً وَبِالإسْلامِ ديـناً وَبِمُحَـمَّدٍ صلى الله عليه وسلم نَبِيّـاً."
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="76.0dp"
android:id="@+id/textVieww48"
android:textColor="@color/black"
android:paddingTop="30px"
android:maxLines="2"
android:lines="2"
android:minEms="2"
android:ellipsize="end"
android:singleLine="false" />

Answer

You're setting the max number of lines to 2, also forcing the textview to have 2 lines, a fixed height and you're enabling the ellipsize...

Try without those options:

<TextView
            android:text="رَضيـتُ بِاللهِ رَبَّـاً وَبِالإسْلامِ ديـناً وَبِمُحَـمَّدٍ صلى الله عليه وسلم نَبِيّـاً."
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/textVieww48"
            android:textColor="@color/black"
            android:paddingTop="30px"/>
Comments