제목이 굉장히 기네요.

 

제목을 풀어서 설명합니다.

 

imageView에서 ScaleType을 Matrix로 하고

 

width와 height를 fill_parent로 했습니다. 소스 상에서 이미지 확대 축소 소스를 작성했고요.

 

그런데 이미지가 처음 보이는 위치가 무저건 왼쪽 위로 오는군요.

 

재밌게도 한번 터치를 하고 나면 한가운데로 옵니다.

 

이게 XML상에서의 문제가 있는 것인지... XML에서 수정을 함에 따라서 상태가 좀 바뀌더군요.

 

간단하게 XML만 보자면,

 

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent">
 

 <LinearLayout

     android:id="@+id/imagelie"
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:gravity="center"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">

 

       <ImageView android:id="@+id/grid_detail_imageView"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent" 
                android:background="#00ffffff"
                android:scaleType="matrix" >

       </ImageView>

 </LinearLayout>

</FrameLayout>

 

 

문제는 두꺼운 글짜 부분입니다.

 

wrap_content 옵션의 경우는 처음부터 한가운데로 잘 오는데,

 

문제는 옵션이 wrap_content이어서 그런지  전체 화면을 모두 사용해서 확대를 하지 못합니다.

 

그래서 위와 같이 fill_parent 옵션을 주면 이미지가 처음 보이는 위치가 왼쪽 상단이 되고

 

한번 터치를 하면 가운데로 옵니다.

 

http://www.appting.com/bbs/board.php?bo_table=B46&wr_id=2227&cpage=1

 

첫 화면에 보이는 것 처럼 말이죠.

 

그리고 한번 터치를 하고 나면 FIX_CENTER  옵션을 준 것처럼 위치가 한 가운데로 잘 오는군요.

 

이거 왜 이럴까요?