2014-09-06 4 views
0

두 개의 열이있는 TableLayout이 있습니다. TextView의 텍스트가 화면 크기보다 약간 길거나 - 6 또는 7 기호 인 경우이 6 또는 7 기호는 표시되지 않습니다. 텍스트가 더 많은 기호로 더 길면 볼 수 있습니다. 그것은 ListView의 일부이며 ImageView에 텍스트 내용과 이미지를 동적으로로드합니다. TextView의 텍스트를 얼마나 오랫동안 보든 항상 표시되도록하고 싶습니다. 내가 무엇을 할 수 있을지?안드로이드 테이블 : 긴 텍스트가 보이지 않는 ImageView와 TextView

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:orientation="horizontal" 
    > 

<TableLayout 
    android:id="@+id/message_table_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:stretchColumns="1" 
    > 
<TableRow> 
<ImageView 
    android:id="@+id/message_image" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="center_vertical" 
/> 
<TextView 
    android:id="@+id/message_title" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Technical Support Representative" 
    android:layout_below="@+id/message_image" 
    android:layout_gravity="center_vertical" 
/> 
</TableRow> 
</TableLayout> 
</RelativeLayout> 

이 내 텍스트입니다 :

String messageTitleText = "<b> Xxxxxxx xxx xxx xx<br/> Xxxxxxxxxx<br/> Xxxxxxxxxxx<br/> xxxxxxxxxxxxxxxx<br/> xxx xxxxxxxxx x xxxxxxxx xx 1234567890<br/> xxxxxxx xxxx<br/> xxxxxxx xxxx xxxx"; 
    messageTitle.setText(Html.fromHtml(messageTitleText)); 

내 HTC가 "1234"다음에 문자를 표시하지 않는다 "567890"가 숨겨져 있습니다

여기 내 레이아웃 XML 내용입니다.

감사

답변

0

<TextView 
    android:id="@+id/message_title" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:maxLines="4" 
    android:lines="4" 
    android:text="Technical Support Representative" 
    android:layout_below="@+id/message_image" 
    android:layout_gravity="center_vertical" 
/> 
+0

감사합니다, 그것은 적용되지 않습니다. TextView의 텍스트는 다중 선이며 ​​가시 선 번호 만 변경됩니다. – user3054412

+0

'android : text = "기술 지원 담당자, 기술 지원 담당자, 기술 지원 담당자, 기술 지원 담당자, 기술 지원 담당자와 같은 결과를 볼 수 있습니다. ... " ' –

+0

게시물에 내 테스트 텍스트가 추가되었습니다. 당신은 그것을 볼 않았다? – user3054412

0

지금 내가 이것을 사용 시도하고 괜찮아요 :

<?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" > 

<ImageView 
    android:id="@+id/message_image" 
    android:layout_gravity="center" 
    android:layout_width="120px" 
    android:layout_height="48dp" 
    android:src="@drawable/ic_launcher" /> 

<TextView 
    android:id="@+id/message_title" 
    android:layout_gravity="center" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="TextView" /> 

</LinearLayout> 
관련 문제