Моего макета выглядеть следующим образом:место две раскладки, кроме друг друг
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/ightwall"
android:id="@+id/drawerlayout"
>
<ScrollView
android:layout_width="wrap_content"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#6CEB87"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="my list"/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#D5D4D4">
<ImageView
android:id="@+id/mylist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/createlist_mylist"
android:adjustViewBounds="true"
android:maxHeight="100dp"
android:maxWidth="100dp"/>
<ImageView
android:id="@+id/freeadd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/createlist_freetext"
android:adjustViewBounds="true"
android:maxHeight="100dp"
android:maxWidth="100dp"/>
<ImageView
android:id="@+id/categoryadd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/createlist_categorysearch"
android:adjustViewBounds="true"
android:maxHeight="100dp"
android:maxWidth="100dp"/>
<ImageView
android:id="@+id/favproductadd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/createlist_favproduct"
android:adjustViewBounds="true"
android:maxHeight="100dp"
android:maxWidth="100dp"/>
</LinearLayout>
</LinearLayout>
Я хочу, чтобы два линейных слоев, чтобы выглядеть следующим образом:
the red layout will be for buttons ,and the green layout will be for changeable screens
Я развиваю в андроиде студии. Мне нужен красный макет, чтобы заполнить фиксированную ширину зеленой компоновкой, чтобы заполнить остальную часть экрана.
i want to get rid of the empty space i marked in red
он работает спасибо, но если мне нужно красное расположение, чтобы обернуть его содержимое? что мне нужно изменить? Мне нужно, чтобы он был размером с кнопки внутри него –
означает? объясните с помощью изображения –
используйте match_parent вместо wrap_content в кнопке –