안드로이드 개발 질문/답변
(글 수 45,052)

ImageView url 을 이용하여 아래쪽 하늘색 파일을 불러왔는데요
밑에파일이 쭉있으나 좀 길어서 짤랐습니다.
그런데 어떤 파일이든 불러오면 위아래로 여백이 생갑니다.
꼭 센터정렬되는것 처럼
=================================================== xml ======================================================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/backbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title" />
</LinearLayout>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/information_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" ></ImageView>
</ScrollView>
</LinearLayout>
====================================================== java =====================================================
ImageView information_view = (ImageView)findViewById(R.id.information_view);
try {
URL url = new URL("http://127.0.0.1/information.png);
URLConnection conn = url.openConnection();
conn.connect();
BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
Bitmap bm = BitmapFactory.decodeStream(bis);
bis.close();
information_view.setImageBitmap(bm);
} catch (Exception e) {
}
===============================================================================================================
그림파일이 W:720px, H:1400px 입니다
그런데 왜 위 아래도 여백이 생기는 거죠???
ㅠㅠ
이래 저래 만져봐도 변화가 없습니다.
gravity 이것저것 만져 화도 변화가 없네요




android:scaleType-"??"