마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

tablelayout화면 배치 문제 때문에 질문드립니다.

0 추천

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:padding="5dp"
        android:gravity="center_horizontal">

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="number" />

    </LinearLayout>

    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_gravity="center"

        android:padding="@dimen/activity_horizontal_margin"

        android:shrinkColumns="0,1"

        android:stretchColumns="0,1,2">

        <TableRow>

            <Button android:text="Job" />

            <Button android:text="편집" />

            <Button android:text="설정" />

        </TableRow>

        <TableRow>

            <Button android:text="측정" />

            <Button android:text="업로드" />

            <Button android:text="메신저" />

        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </TableRow>

    </TableLayout>
</LinearLayout>

현재 상태

레이아웃

-----------------------------------------------------------

수정하고 싶은 상태

레이아웃 구성

버튼 크기만 조절하고 싶은데요 어떻게 조절해야될지 잘 모를겠습니다 ...도와주시면 감사하겠습니다

리스타트 (1,790 포인트) 님이 2016년 8월 2일 질문

1개의 답변

0 추천
 
채택된 답변

테이블안에 있는 설정 버튼대신에 이렇게 넣으심면 크기 변화가 되긴합니다.ㅎ

다른의도이신가여..?

 

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Button android:text="설정"
        android:layout_centerInParent="true"
        android:layout_height="50dp"
        android:layout_width="50dp"/>
</RelativeLayout>
은평구멍멍이 (2,630 포인트) 님이 2016년 8월 2일 답변
리스타트님이 2016년 8월 3일 채택됨
...