내 프로젝트에서 서랍 레이아웃을 사용합니다. 서랍을 Google+ Android App처럼 맞춤 설정하고 싶습니다. "기본"ListView를 통해 ImageView를 추가했습니다. 그게 잘된거야. 코드는 다음과 같습니다 맞춤 서랍 레이아웃 - 투명도 클릭
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/drawer_layout_relative"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_gravity="start" >
<ImageView
android:id="@+id/drawer_header_image"
android:layout_width="wrap_content"
android:layout_height="85dp"
android:src="@drawable/ic_logo_blue" />
<ProgressBar
android:id="@+id/drawer_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/drawer_header_image"
android:background="#ffffffff" />
<ListView
android:id="@+id/drawer_listview"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_below="@id/drawer_progress"
android:background="#ffffffff"
android:choiceMode="singleChoice" />
</RelativeLayout>
리스트 뷰-항목 중 하나 FrameLayout이에 조각로드를 클릭
. 그게 완벽하게 작동합니다. 하지만 한 가지 문제가 있습니다. ImageView도 "클릭 가능"합니다. 그래서 Drawer가 열리면 ImageView를 클릭 할 것입니다. 뒤에있는 ListView가 클릭됩니다 !! 나는 그것을 원하지 않는다. 그래서 저는 clickable로 시도했습니다 : ImageView에서 false. 여기에 약간의 데모를 들어 ...를 작동하지 마십시오 비디오입니다 : http://www.vidup.de/v/Ao71r/
어떻게 내가 이미지 뷰를 클릭하지 만들 수 있습니다!
을 참조하십시오. 완벽하게 작동합니다. 그러나 "클릭 할 수 없음"을 원할 때보기를 클릭 할 수있게 만드는 작은 쿠로스 :) – StefMa
전체 서랍을 클릭 할 수있게하면 서랍 아래의보기가 클릭을 볼 수 없게됩니다. 내가 더 많은 설명과 함께 내 대답을 업데이 트, 잘하면 그것이 일을 좀 더 명확하게 도와줍니다 :) – anthonycr