
위와 같이 퍼즐로 이루어진 앱입니다.
제가 의도한 것은 모든 아이템들이 다닥다닥 붙어있는 것을 원했는데,
막상 구현하니까 저렇게 간격이 생깁니다.
GridView를 구현할때는 Bitmap을 사용해 원본 이미지를 9등분하여 잘라왔으며
Adapter에서 아이템을 표현할때는 Layout Inflater를 사용하지 않고 ImageView를 바로 사용하였습니다.
<?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" >
<ImageView
android:id="@+id/t_img"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
<GridView
android:id="@+id/img_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0sp"
android:numColumns="3"
android:horizontalSpacing="0sp"
android:verticalSpacing="0sp">
</GridView>
</LinearLayout>
위는 XML에서 쓰여진 코드입니다. 어떤 부분을 수정해야 저 간격이 없어질까요?
알려주시면 감사합니다...