세 개의 하위 레이아웃이있는 RelativeLayout이 있습니다. 상단 레이아웃의 고객 정보 (상위 상단 정렬), 가운데 레이아웃의 3 개 버튼 및 하단 레이아웃의 배너 (부모 하단 정렬).Android 레이아웃 - 위치 레이아웃
아래쪽 배너가 아래쪽으로 올바르게 정렬되도록 필링 중입니다.
센터 레이아웃이 제대로 표시되지 않는 문제가 있습니다. 나의 가장 위의 레이아웃은 센터 레이아웃을 강제로 내려 놓았고, 센터 버튼 중 하나 또는 두 개를 사용하지 않으면 (나는 사라 졌을 때) 레이아웃의 맨 위로 끌고 가야한다. 내가 올바르게 표시 할 필요가있는 것의 변형을 얻을 수는 있지만 모든 것이 올바로 배치되지는 않습니다.
도움을 주시면 감사하겠습니다. 감사합니다
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/adLayout"
android:background="@drawable/ad_contact_background"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:orientation="horizontal" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayoutAd"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true" >
<ImageView
android:id="@+android:id/ad_contactAdImageView"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
</LinearLayout>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativeLayoutContact"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_above="@+id/linearLayoutAd" >
<Button
android:id="@+id/ad_contactWebsiteButton"
android:background="@drawable/button_black"
android:layout_height="50dp"
android:layout_width="match_parent"
android:layout_marginTop="10dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textSize="18dip"
android:textStyle="bold"
android:textColor="@android:color/white"
android:typeface="sans" />
<Button
android:id="@+id/ad_contactEmailButton"
android:background="@drawable/button_black"
android:layout_height="50dp"
android:layout_width="match_parent"
android:layout_marginTop="10dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:textSize="18dip"
android:textStyle="bold"
android:textColor="@android:color/white"
android:typeface="sans" />
<Button
android:id="@+id/ad_contactPhoneButton"
android:background="@drawable/button_black"
android:layout_height="50dp"
android:layout_width="match_parent"
android:layout_marginTop="10dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_marginBottom="20dip"
android:textSize="18dip"
android:textStyle="bold"
android:textColor="@android:color/white"
android:typeface="sans" />
</RelativeLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayoutTitle"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_above="@+id/relativeLayoutContact"
android:layout_alignParentTop="true" >
<TextView
android:id="@+id/ad_contactTitleTextView"
android:cacheColorHint="#00000000"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="20dip"
android:textColor="#000000"
android:textSize="24dip"
android:textStyle="bold"
android:typeface="sans" />
<TextView
android:id="@+id/ad_contactAddressTextView"
android:cacheColorHint="#00000000"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:textColor="#000000"
android:textSize="20dip"
android:typeface="sans" />
</LinearLayout>
</RelativeLayout>
당신이 원하는 레이아웃의 이미지를 게시 할 수 있습니다. Just for and Idea, 어떻게 레이아웃을 원하십니까? –
알았어요. 방금 센터 레이아웃을 렌더링해야했습니다. 어쨌든 고마워. – user1222760