0

次の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" >
    <!--Multi Line TextView -->
    <TextView
        android:id="@+id/incomingmsg"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:autoLink="web"
        android:inputType="textMultiLine"
        android:minLines="5"
        android:scrollbars="vertical"
        android:singleLine="false"
        android:textIsSelectable="true" >
    </TextView>
    <!--Some more Views Here -->
</LinearLayout>

TextViewデータが多すぎると、以下のsが画面に表示されません。テキストのサイズに基づいて、 sをすぐ下に表示しViewたいと思います。ViewTextView

4

2 に答える 2

3

RelativeLayoutを使用する:

   // scrollview is to scroll the layout even the Textview takes the full height of the device so that the view is visible under TextView. 
   //If your Textview doesn't take too much height, you don't need to use scrollview.
   <Scrollview>
   <RelativeLayout>
        <TextView>
        <View
           android:layout_width="match_parent"
           android:layout_height="4dip"
           android:layout_below="@id/textview"
           android:background="#7c7c7c" />
   </RelativeLayout>
  <Scrollview>
于 2012-10-05T20:23:21.310 に答える
2

XMLによると、ビューはTextView(複数行のビュー)の上に設定されており、TextViewの下には設定されていませんか?

また、追加または設定できるmax_height属性とmax_lines属性があります。これは役立つかもしれません。

于 2012-10-05T20:26:13.007 に答える