1

こんにちは、アプリでスライド メニューを表示するためにリボン メニュー ライブラリを使用しています。

https://github.com/davds/RibbonMenu

ここに私のlayout.xmlがあります

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

<EditText
    android:id="@+id/editText1"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@drawable/abs__textfield_search_default_holo_dark"
    android:drawableRight="@drawable/abs__ic_search"
    android:ems="10"
    android:gravity="right|center_vertical"
    android:textColorHint="#7F462C" >

        <requestFocus />
    </EditText>
    <ListView
        android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
    </ListView>
    <com.darvds.ribbonmenu.RibbonMenuView
        android:id="@+id/ribbonMenuView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>

ここでの問題は、リスト ビューがなくなったことです。つまり、リボン メニューと編集テキストしか表示されないので、何か助けはありますか?

4

1 に答える 1

0

あなたのリストビューをinclude layout隠しています

<com.darvds.ribbonmenu.RibbonMenuView
        android:id="@+id/ribbonMenuView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

wrap_content を設定するか、layout_height のサイズを「100dp」などの値に設定します

于 2013-10-29T14:34:24.553 に答える