Message : ImageView 에서 selector 가 안되는 현상


Solution : Clickable 설정을 추가한다.


android:clickable="true"



※ 이하 clickable 적용된 참고소스

1. layout 폴더에서 imageview가 적용된 xml 파일 중 일부입니다.

...

<ImageView

android:id="@+id/sample_img"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:background="@drawable/sample_selector"

android:contentDescription="@string/sample_img"

android:clickable="true"

/>

...


2. drawable 폴더에서 sample_selector.xml 소스입니다.


<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android" >

    

    <item android:state_pressed="true" android:drawable="@drawable/green" />

    <item android:state_selected="true" android:drawable="@drawable/red" />

    <item android:drawable="@drawable/yellow" />


</selector>



참조 링크 : http://shinluckyarchive.tistory.com/473

Message : 

An error occurred while automatically activating bundle com.android.ide.eclipse.adt (793)

......

Plug-in com.android.ide.eclipse.adt was unable to load class

com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.


Solution :

1) Start Eclipse, then select Help > Install New Software.

2) Click Add, in the top-right corner.

3) In the Add Repository dialog that appears, 

- enter "ADT Plugin" for the Name 

- and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/

4) Click OK.


※ If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).



by Android ( http://developer.android.com/sdk/installing/installing-adt.html#Troubleshooting )

+ Recent posts