탐색 서랍이있는 프로젝트에서 작업하고 있습니다. 탐색 서랍에서 listivew 위에 이미지 뷰를 배치하려고합니다. xml 레이아웃은 다음과 같습니다.안드로이드의 탐색 서랍 안에 이미지 뷰가 있음
<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" >
<!-- The main content view -->
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<!-- The navigation drawer -->
<RelativeLayout
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:orientation="vertical"
android:clickable="true"
>
<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_logo" />
<ListView
android:id="@+id/slider_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#CC000000"
android:choiceMode="singleChoice"
android:divider="#808080"
android:layout_below="@id/image_view"
android:dividerHeight="0.5dp"
/>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
문제는 이미지 뷰가 기기에서 실행 중 스 퀴드/압축으로 표시된다는 것입니다. 압축 된 것으로 보이는 이유는 무엇입니까? 제발 도와주세요 !!
장치에서 보이는 모습을 게시하여 문제를보다 명확하게 이해할 수있게하십시오. –
당신의'Imageview'의 높이가'wrap_content'이고 당신이 당신의 앱을 실행하고있는 장치의 높이를 지정하지 않았습니다. 이 문제는 화면 해상도가 다르기 때문에 발생합니다. 큰 장치 이미지에서 부숴 질 것입니다. 그래서 당신은'ImageView'에 고정 된 높이를 적용해야합니다. – Piyush
이미지보기의 높이를 지정하거나 압축 된 이미지를 사용하여 원하는대로 이미지의 높이와 너비를 고정 – Prabhakar