내가 ListView를 배경 색상을 설정할 수 있다는 것을 알고 통해리스트 뷰의 배경 색상을 설정 대신 XML을 통해. 나는 운이없는 다음 코드는 (은 변경하지 않습니다) 시도 :동적으로 다음 코드의 일부 변화를 통해 XML
이사람이 XML을 통해 ListView에의 배경색을 변경하는 간단한 방법을 알고 있나요
<RelativeLayout 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">
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
**android:background="#FFFFFF"**
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
</ListView>
</RelativeLayout>
?
나는 당신이'listView'에 대한 costum 행 레이아웃을 팽창시키고 있다고 생각합니까? 그러면'listitem'의 배경 설정이 도움이 될 것입니다. –