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

버튼 레이아웃꾸미기(붙이기)

0 추천

안녕하세요 ^^

버튼을 다닥다닥 붙일려고 하는데 패딩과 마진을 0으로 해도 안되네요;

-로 하면 되긴 되는데 이러면 안드로이드 기종마다 다 다르게 보이지 않나요?(화면비율이 다르니;)

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="72dp"
    android:layout_below="@+id/appbar"
    android:layout_centerHorizontal="true"
    android:layout_above="@+id/tableRow"
    android:padding="0dp">

    <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/imageButton"
        android:layout_weight="1"
        android:layout_margin="0dp"/>

    <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/imageButton2"
        android:layout_weight="1" />

    <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/imageButton3"
        android:layout_weight="1" />

    <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/imageButton4"
        android:layout_weight="1" />
</LinearLayout>
껄껄앱 (1,910 포인트) 님이 2016년 3월 11일 질문

1개의 답변

0 추천
버튼의 background 이미지를 변경하세요.
익명사용자 님이 2016년 3월 11일 답변
추가로 백그라운드 지정하고 싶지 않다면 background:@null 주세요
...