2013-05-29 3 views
1

이미지에 표시된대로 사용자 지정 목록 항목 레이아웃이 있습니다. 텍스트가 너무 길면 ("가격 텍스트 뷰"를 오버레이 할 수 있음) "굵은 텍스트 뷰"가 "가격 텍스트 뷰"에서 흐르고 "작은 글꼴 텍스트 뷰"가 텍스트를 두 번째 줄로 줄 수 있습니까?다른 TextView 주위의 TextView 흐름

덕분에 많은

enter image description here

레이아웃 :

<?xml version="1.0" encoding="utf-8"?> 

<!-- ListRow Left sied Thumbnail image --> 
<LinearLayout android:id="@+id/thumbnail" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:padding="3dip" 
       android:layout_alignParentLeft="true" 
       android:background="@drawable/image_bg" 
       android:layout_marginRight="5dip"> 

    <ImageView 
      android:id="@+id/list_image" 
      android:layout_width="50dip" 
      android:layout_height="50dip" 
      android:src="@drawable/product_dummy" 
      android:contentDescription="@string/list_image_desc"/> 

</LinearLayout> 

<TextView 
     android:id="@+id/product_name" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignTop="@+id/thumbnail" 
     android:layout_toRightOf="@+id/thumbnail" 

     android:text="product name" 
     android:textColor="#040404" 
     android:typeface="sans" 
     android:textSize="15dip" 
     android:textStyle="bold" 
     /> 

<TextView 
     android:id="@+id/product_price" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" 
     android:layout_below="@+id/product_name" 
     android:gravity="bottom|right" 
     android:text="100€" 
     android:layout_marginRight="5dip" 
     android:textSize="25dip" 
     android:textColor="#6bc920" 
     android:textStyle="bold"/> 

<TextView 
     android:id="@+id/product_form" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@id/product_name" 
     android:textColor="#343434" 
     android:textSize="10dip" 
     android:layout_marginTop="1dip" 
     android:layout_toRightOf="@+id/thumbnail" 
     android:layout_toLeftOf="@+id/product_price" 
     android:text="product form" 
     android:layout_alignRight="@+id/product_name" 
     /> 

+0

이미 제안 된 방법이 있는지 확실하지 않습니다. 랩핑을 시도 할 수 있는지 잠시 보았지만 표준 레이아웃 리소스에서 이런 종류의 레이아웃을 처리하도록 설계된 것처럼 보이지 않습니다. –

답변

0

나는이 재치를 수행하는 방법을 알고 아니에요 TextView. 대신 WebView를 사용하고 표준 HTML/CSS 기술을 사용하여 오른쪽에 가격을 띄우는 것이 좋습니다.

+0

조언 해 주셔서 감사합니다. 그리고 webview의 성능과 listview의 textview를 비교하면 (각 디자인마다)? – Cicik