안드로이드 개발 질문/답변
(글 수 45,052)
체크박스가 리스트 뷰에있어 체크만 on/off 될떄는 android:focusable="false" 를 입력하여 리스트가 클릭 되도록 했었습니다
근데 이미지 버튼을 3개 넣어둔상태에서도 리스트뷰가 클릭이 안되길래..
android:focusable="false"를 넣어 보았더니 xml 소스 자체에선 오류가 안나는데
리스트 뷰가 클릭이 되질 않네요..
방법 좀 알려주세요..
근데 이미지 버튼을 3개 넣어둔상태에서도 리스트뷰가 클릭이 안되길래..
android:focusable="false"를 넣어 보았더니 xml 소스 자체에선 오류가 안나는데
리스트 뷰가 클릭이 되질 않네요..
방법 좀 알려주세요..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:text=" "
android:id="@+id/left"
android:layout_width="wrap_content"
android:layout_height="90px"
android:layout_alignParentLeft="true"
/>
<ImageButton
android:id="@+id/directory_pictureimg"
android:layout_width="80px"
android:layout_height="80px"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/left"
android:focusable="false"
/>
<TextView
android:text=" "
android:id="@+id/left1"
android:layout_width="wrap_content"
android:layout_height="90px"
android:layout_toRightOf="@+id/directory_pictureimg"
/>
<TextView
android:id="@+id/directory_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9pt"
android:textStyle="bold"
android:layout_toRightOf="@+id/left1"
/>
<ImageButton
android:id="@+id/directory_balloonimg"
android:layout_width="185px"
android:layout_height="45px"
android:layout_toRightOf="@+id/directory_name"
android:focusable="false"
/>
<TextView
android:text=" "
android:id="@+id/up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/directory_balloonimg"
/>
<TextView
android:text="@string/Invitation"
android:id="@+id/directory_balloontext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="7pt"
android:layout_toRightOf="@+id/up"
/>
<TextView
android:id="@+id/directory_phonenumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9pt"
android:layout_below="@id/directory_name"
android:layout_toRightOf="@+id/left1"
/>
<TextView
android:text=" "
android:id="@+id/right"
android:layout_width="wrap_content"
android:layout_height="90px"
android:layout_alignParentRight="true"
/>
<ImageButton
android:id="@+id/directory_letterimg"
android:layout_width="72px"
android:layout_height="48px"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/right"
android:focusable="false"
/>
</RelativeLayout>




저 Xml파일 말고 ListView가 들어있는 Xml파일에서 ListView안에
android:focusableInTouchMode="true"
이 메소드 한줄만 추가하면 됩니다 ^^