2012-12-26 1 views
0

항목 목록을 표시하고 특정 항목에 마커를 넣으려고합니다. 그러나 마커가 표시되지는 않지만 나머지 뷰는 Eclipse에서 레이아웃 편집기가 표시합니다.ImageView가 사라지고 표시 할 수 없습니다.

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

<ImageView 
    android:layout_width="match_parent" 
    android:layout_height="100dp" 
    android:scaleType="centerCrop" 
    android:src="#322" 
    android:id="@+id/image" /> 

<TextView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:singleLine="true" 
    android:layout_alignParentBottom="true" 
    android:padding="5dp" 
    android:background="@android:color/holo_blue_dark" 
    android:text="Hello world" 
    android:textColor="@android:color/primary_text_dark" 
    android:id="@+id/title" /> 

<ImageView 
    android:id="@+id/icon" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:layout_above="@+id/title" 
    android:layout_alignParentRight="true" 
    android:paddingRight="10dp" 
    android:src="@drawable/ic_tick" /> 

</RelativeLayout> 

그리고 내 ListAdapter에서 나는 그렇게처럼 보여 만들려고 :

레이아웃은 여기에 그것을 제외하고

iv = (ImageView)convertView.findViewById(R.id.icon); 
    Log.d("trakt", ti.glyph + ""); 
    if(ti.glyph == 0){ 
     iv.setVisibility(View.GONE); 
    } else{ 
     Log.d("trakt", "showing glyph"); 
     iv.setVisibility(View.VISIBLE); 
     // iv.setImageResource(ti.glyph); - this is disabled for now 
    } 

로깅 정확한 수를 표시하고 "그래프를 보여주는" 화면에 나타나지 않습니다.

답변

0

텍스트보기 뒤에 표시가 있다고 생각되면 iv.bringToFront()를 사용하여 앞쪽으로 이동하십시오.

+0

아니요. 작동하지 않습니다. –

관련 문제