나는 안드로이드를 처음 접했고, 모든 씬이 자신의 공간에 집중되어있는 이런 식으로하고 싶습니다.Android : 상대적 레이아웃 센터 자신의 공간에있는 것들
이 코드를했습니다... 나는 그것을 바꿀 수있는 방법, 그 이유는 무엇입니까?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
tools:context="se.avatarcontrol.MainActivity">
<TextView
android:id="@+id/weather"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/light"
android:layout_marginTop="15dp"
android:text="RAINY" />
<Button
android:id="@+id/light"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="Light OFF" />
<TextView
android:id="@+id/frontText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/sideText"
android:text="FrontView"/>
<TextView
android:id="@+id/sideText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/light"
android:layout_marginTop="15dp"
android:layout_alignParentRight="true"
android:text="SideView" />
<ImageView
android:id="@+id/frontImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android: android:layout_below="@id/frontText"
android:src="**somesource**" />
<ImageView
android:id="@+id/sideImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/sideText"
android:layout_alignParentRight="true"
android:src="**othersource**"/>
</RelativeLayout>
또 다른 것은 내 ImageViews이 서로 중첩 whithout 모든 공간을 채울 수있는 방법이 될 것입니다?
질문 제목을 좀 더 구체적으로 작성하십시오. 이 제목은 당신이 downhotes을 얻을 것이다 – Nabin
당신은 제약 레이아웃해야합니다, 이것은 구글이 레이아웃의 불필요한 중첩을 방지하기 위해 무엇을 제안합니다. –