개발자/Android

[Accessibility] Missing contentDescription attribute on image 경고

지구빵집 2012. 12. 10. 11:30
반응형



 [Accessibility] Missing contentDescription attribute on image 경고가 의미하는것~


이미지뷰에 대해 android:contentDescription="StringValue" 를 선언함으로써 해결됩니다.

이것으로 워닝 waring 문구가 많이 나오는데 위와같이 항목을 넣어주면 깔끔해질 겁니다.


컨텐츠를 읽어오기 실패시에 대해 이미지를 묘사할수 있는 스트링을 받아두는거 같습니다.

anyString은 stringvalue값에 미리 입력해두고 이미지뷰에는 아래처럼 적어 주세요.


<string name="StringValue">이미지가 열리지 않습니다.</string>


<ImageView 

    android:id="@+id/soundimage01_02"

    android:layout_width="fill_parent"

    android:layout_height="wrap_content"

    android:src="@drawable/imgbase00_002"

    android:layout_marginTop="20dp"

    android:contentDescription="@string/StringValue"

    />


반응형