저는 안드로이드 프로그래밍 세계에서 새롭고 일부 레이아웃 디자인 문제에 직면 해 있습니다. 두 이미지가 포함 된 레이아웃의 패딩이있다 는 빨간색 화살표를 참조하십시오레이아웃에 원하지 않는 패딩이 있습니다.
http://www.servimg.com/view/13840630/200
당신은 내가 어이와 폭 모두에 대한 wrap_content 속성을 사용하고, 그래서 정말 안 볼 수 있듯이
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.scimoon.henri.scimoon.Game"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
android:paddingTop="15dp"
android:paddingBottom="5dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/darkBlue"
android:id="@+id/back">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/back"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/back"
android:textColor="@color/white"
android:textSize="35dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:layout_weight="1">
<ImageView
android:id="@+id/bt_bleu"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/bt_bleu"
android:layout_weight="1"/>
<ImageView
android:id="@+id/bt_rouge"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bt_rouge"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:layout_weight="1">
<ImageView
android:id="@+id/bt_jaune"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/bt_jaune"
android:layout_weight="1"/>
<ImageView
android:id="@+id/bt_vert"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bt_vert"
android:layout_margin="0dp"
android:padding="0dp"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
모든 아이디어를 어떻게 없애 : 왜 이런 일
다음내 레이아웃입니다 ... 이해? 당신의 입술 안쪽
죄송하지만 이것이 작동하지 않습니다. 다음은 내 dimens.xml입니다. ' 0dp 0dp ' > 120dp 내가 같은 문제가 있습니다 :/ –
Monstercrunch