안녕하세요, 어떻게 안드로이드 화면 하단에 상자를 정렬해야합니까 알고 싶습니다? 나는 9patch png 이미지로 상자를 만들었지 만 실제 이미지와 테두리 사이에는 약간의 차이가 있습니다. 아무도 나를 도울 수 있습니까? 이미지의 크기와 실제 이미지를 제어하는 그래픽 레이아웃 화면의 파란색 테두리 사이에 실제 간격이 있음을 의미합니다. 내 영어 실례. 그래픽 레이아웃의 이미지 정렬
이
완전히 질문을 이해하지만 ImageViews에android:adjustViewBounds="true"
를 추가하지 마십시오 파란색 상자
<RelativeLayout 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" >
<ImageView
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/background" />
<ImageView
android:id="@+id/topbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:src="@drawable/top_bar" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/topbar"
android:layout_centerHorizontal="true"
android:layout_marginTop="95dp"
android:src="@drawable/icon_green" />
<ImageView
android:id="@+id/box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="23dp"
android:src="@drawable/box" />
</RelativeLayout>
전체 레이아웃 XML을 추가하십시오 –
여기에 전체 XML이 있습니다. 희망을 드릴 수 있습니다 희망 : – akemalFirdaus
현재 레이아웃의 이미지 링크를 추가 할 수 있습니까? 마지막'ImageView'에는'android : layout_marginBottom = "23dp"'가 있습니다. –