2012-08-13 6 views
1

xml을 사용하여 아래 표시된 것처럼 회 전자를 어떻게 스타일링하거나 사용자 정의 할 수 있습니까? 테두리가있는 흰색 배경을 만들 수 있지만 왼쪽의 아이콘과 오른쪽의 화살표를 설정할 수 없습니다. 문제는 오른쪽으로 왼쪽에있는 아이콘을 설정하고 화살표 레이아웃과 경우맞춤 회 전자 스타일

enter image description here

+0

이와 비슷한 xml 레이아웃을 만듭니다. 그리고 View Holder Adapter 접근법을 사용하십시오. 간단 해. –

+0

왼쪽의 아이콘은 각 회 전자 항목에 해당합니까? 아니면 고정 된 회 전자입니까? –

+0

정적 스핀 어 – user1582087

답변

0

는 다음과 같은 작업을해야.

<RelativeLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" /> 

    <ImageView 
     android:id="@+id/icon" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" /> 

    <TextView 
     android:id="@+id/name" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_toRightOf="@id/icon" /> 

    <ImageView 
     android:id="@+id/arrow" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" /> 

</RelativeLayout> 

저는 직장에있어 테스트 할 수 없지만 정상적으로 작동한다고 생각합니다.