<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/lyt_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/plain_bg"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/lyt_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<include
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/header" />
</LinearLayout>
<LinearLayout
android:id="@+id/lyt_body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/lyt_Buttons"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imgfrontlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/imgcenterlogo"
android:layout_alignParentTop="true"
android:layout_marginTop="61dp"
android:background="@drawable/front_logo"
/>
<ImageView
android:id="@+id/imgcenterlogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/btnPersonaltrainer"
android:layout_centerHorizontal="true"
android:layout_marginBottom="29dp"
android:background="@drawable/center_logo" />
<Button
android:id="@+id/btnMyProfile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="21dp"
android:layout_marginLeft="32dp"
android:background="@drawable/myprofile" />
<Button
android:id="@+id/btnTaracker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imgcenterlogo"
android:layout_alignParentRight="true"
android:layout_marginBottom="49dp"
android:background="@drawable/track" />
<Button
android:id="@+id/btnPersonaltrainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/btnMyProfile"
android:layout_alignLeft="@+id/btnAllExercises"
android:background="@drawable/personaltrainer" />
<Button
android:id="@+id/btnRandomworkouts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/btnPersonaltrainer"
android:layout_alignParentLeft="true"
android:background="@drawable/randomworkout" />
<Button
android:id="@+id/btnAllworkouts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/btnAllExercises"
android:layout_alignBottom="@+id/btnAllExercises"
android:layout_alignLeft="@+id/btnMyProfile"
android:background="@drawable/allworkouts" />
<Button
android:id="@+id/btnAllExercises"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/btnTaracker"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp"
android:background="@drawable/allexercises" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>`
모든 화면 크기에 호환되는 레이아웃을 만들어야하고, xlarge 크기 (800x1280,720x1280 등)의 separte 레이아웃을 만들어야합니다. 여기 평판 때문에 이미지를 업로드 할 수 없으며 레이아웃의 중앙에 하나의 메인 버튼을 배치하고 중간 버튼의 왼쪽과 오른쪽에 3 개의 버튼을 배치해야합니다. 모든 사람이 레이아웃없이 모든 화면 크기에 호환되는 레이아웃을 만들 수 있습니다. dp 또는 고정 점을 사용합니다.모든 화면 크기와 호환되는 여러 버튼이있는 상대적 레이아웃을 만드는 방법은 무엇입니까?
답장을 보내 주셔서 감사합니다. 그러나 여기서는 배치 버튼에 상대적 레이아웃을 사용하고 있기 때문에 layout_weight 속성을 설정할 수 없습니다. 7 개의 버튼, 가운데 버튼 하나와 커브 버튼 3 개가 가운데 버튼의 왼쪽과 오른쪽에 있습니다. m 정렬 문제에 직면 해 있습니다. 여기 스크린 샷을 업로드 할 수 없습니다. 여기에 이메일 ID를 언급하면 이미지를 보낼 수 있습니다. – Kishore
내 대답의 마지막 줄에 제공된 링크를 확인하십시오. 상대적 레이아웃에 대한 답변도 있습니다. – Shiv
미안하지만 해결책을 얻지 못합니다. – Kishore