<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/relativeLayout0"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- 이미지가 들어갈 부분 -->
</RelativeLayout>
<!-- 이미지 의 끝 -->
<!-- 첫 번째 버튼들 -->
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
>
<ImageButton
android:id="@+id/introductionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/introductionButton"
android:text="학교소개" />
<ImageButton
android:id="@+id/call"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/introductionButton"
android:src="@drawable/ic_launcher"
/>
<TextView
android:id="@+id/callText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/call"
android:layout_below="@+id/call"
android:text="학교전화" />
<ImageButton
android:id="@+id/Correspondence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/call"
android:src="@drawable/ic_launcher"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_alignLeft="@+id/Location"
android:text="학교위치" />
<ImageButton
android:id="@+id/Location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/Correspondence"
android:src="@drawable/ic_launcher"
/>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/Correspondence"
android:layout_below="@+id/Correspondence"
android:text="가정통신문" />
</RelativeLayout>
<!-- 첫번째 버튼들의 끝 -->
</RelativeLayout>
위 는 소스 이고...
구현 할려는건
화면 가운데에 버튼 4개 만들고
그 밑으로 일정하게 또 4개
그 밑으로 또 일정하게 4개
이런게 4개씩 3줄 만들려고 하는데
마지막 버튼 부분들이 작은 기기에서는 화면 밖으로..나가고
큰 기기에서는 버튼이 너무 작은 현상이 일어납니다.. 어떻게 해야하나요?
fill_parent로 가로 설정하시고 크기에 맞추어 weight를 주어 레이아웃을 배치해 보세요
비율대로 크기가 정해지기 때문에 해상도 상관없이 배치하기엔 빠르고 쉽습니다.