2012-12-02 3 views
5

어댑터를 통해 맞춤 listview를 사용하고 있으며 Nexus 7의 모든 기능이 훌륭하게 보이지만 HTC Incredible 2에서 문제가 발생합니다. 배경색이 바뀝니다. 다음은 cacheColorHint가 설정된 XML 파일입니다. 나는 또한 AA00000으로 시도했다. 어떤 제안? 나 또한 setCacheColorHint를 통해 액티비티에 설정을 시도했지만 아무 것도 작동하지 않습니다.안드로이드 ListView 배경색 변경 사항 스크롤 - colorCacheHint 고정 문제 없음

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="horizontal"  
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:padding="10dp" 
android:background="#AA000000" 
android:cacheColorHint="#00000000"> 

<ImageView android:id="@+id/ExhibitListIcon" 
android:contentDescription="Exhibit List Icon" 
android:layout_width="wrap_content" 
android:layout_height="fill_parent" 
android:gravity="center_vertical" 
android:layout_marginRight="15dp" 
android:layout_marginTop="5dp" 
android:layout_marginBottom="5dp" /> 

<TextView android:id="@+id/ExhibitListTitle" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:gravity="center" 
android:textStyle="bold" 
android:textSize="22dp" 
android:textColor="#FFFFFF" 
android:layout_marginTop="5dp" 
android:layout_marginBottom="5dp" /> 

</LinearLayout> 

답변

21

는 대신있는 LinearLayout의, 목록보기가 선언 된 XML의 cachecolorhint 설정을 시도 할 수 : 레이아웃 파일에서

, 사용 :

android:cacheColorHint="#0000" 

또는 자바 코드에서

사용

listView.setCacheColorHint(Color.TRANSPARENT); 

희망이 있습니다.

+0

! 고맙습니다. –

+0

다행이라면 도움이 될 것입니다. 작동한다면 답변으로 받아 들일 수 있습니다. :) –

+0

완료. 다시 한번 감사드립니다. –

2
listView.setCacheColorHint(Color.TRANSPARENT); 
6

귀하의 목록보기에 선 아래 추가

안드로이드 : cacheColorHint = "@ 안드로이드 : 컬러/투명"이라고했다

관련 문제