0

レイアウトの高さに悩んでいます

これが私のコードです:

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingBottom="2dp"
android:paddingLeft="5dip"
android:paddingTop="2dp" >

<TextView
    android:id="@+id/calendar_name_label"
    style="@style/event_detail_label"
    android:text="@string/calendar_name_label" />

<LinearLayout
    android:id="@+id/calendars_place_holder"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:orientation="vertical" >
</LinearLayout>

calendars_place_holder は、ストア テキスト ビューのレイアウトです。

calendars_place_holder には 3 つまたは 4 つのテキスト ビューしかないため、レイアウト全体が高くなっています。

アドバイスをいただけますか?

前もって感謝します

4

1 に答える 1

0

テキストビューに幅を与えてみてください

<TextView
android:id="@+id/calendar_name_label"
style="@style/event_detail_label"
android:text="@string/calendar_name_label" 
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
于 2013-09-25T14:38:10.673 に答える