У меня есть макет, который является относительной, который содержит 2 вертикальных линейных макета.Каждый из линейных макетов использует равную ширину.Ориентация горизонтальная, и я хотел бы, чтобы первая линейная схема использовала 2/3 от макета, а вторая - от 1/3.Я не очень хорошо разбираюсь в XML.Я работал в Visual Basic и теперь перехожу на Java с помощью Android Studio.
Вот XML-код для макета действия.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="@color/colorBackgroundGray"
tools:layout="@layout/fragment_select_item"
tools:context="com.myCompany.myProduct.activities.ReturnAreaActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<FrameLayout
android:id="@+id/FragmentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<include
android:id="@+id/include2"
layout="@layout/frm1"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="left"
android:layout_weight="1.7" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:paddingLeft="5dp"
android:orientation="vertical">
<include
android:id="@+id/include"
layout="@layout/layout_numpad5"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="220dp"
android:layout_weight="1.3"
android:layout_gravity="right"
/>
</LinearLayout>
</RelativeLayout>
Вес - это то, что я только что попробовал.Есть идеи?