Im пытается иметь макет с 3 слоями. Im использует 3 linearlayouts, в которых один из них является списком, но мой нижний Linearlayout не появляется на экране.Android 3 Layers Layout with listview
Мне нужно: Вверху: Горизонтальная линейная схема | В центре: Listview | На Дно: Горизонтальная линейная Компоновка
Im используя этот код:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/BackGroundColor"
android:orientation="vertical"
android:scaleType="center" >
<LinearLayout
android:id="@+id/titleLayout"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/titleBgColor"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/filterButton"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_gravity="left"
android:layout_weight="0"
android:background="@drawable/filtericon" />
<TextView
android:id="@+id/sectionTitle"
style="@style/sectionTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="(blank)" />
<Button
android:id="@+id/addCatButton"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_gravity="right"
android:layout_weight="0"
android:background="@drawable/effect_button_add_cat_click" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:listSelector="@drawable/listview_style_list_selector" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/titleBgColor"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/optionsButton"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_gravity="left"
android:layout_weight="0"
android:background="@drawable/filtericon" />
<TextView
android:id="@+id/totalValue"
style="@style/sectionTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="66,00€" />
<Button
android:id="@+id/savExpIncValues"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_gravity="right"
android:layout_weight="0"
android:background="@drawable/effect_button_add_cat_click" />
</LinearLayout>
</LinearLayout>
Что не так? спасибо
Что показывает ур logcat? –
вставьте свой код Java вместе с вашей трассировкой logcat, я думаю, что это поможет решить вопрос –
. Я понял, что заставило закрыть. но теперь проблема другая. Моя нижняя компоновка не отображается на экране. У меня есть мой верхний макет, список в центре, но не нижний макет. Я отредактировал код выше без ошибки «Force Close» –