0
我想在此框中看到此滾動線。我正在使用ViewStub並在ViewStub中充氣 android:layout =「@ layout/message_box」message_box.xml。這是我所做的代碼。我看不到這條線。
<ViewStub
android:id="@+id/stub_box1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="5dp"
android:layout_marginTop="30sp"
android:inflatedId="@+id/box1"
android:layout="@layout/message_box"/>
和機器人:佈局=「@佈局/ message_box」這條線,我們如下使用:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/Theme.bmo.Item.Message"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:maxLines="2"
android:scrollbars="vertical"
android:fadeScrollbars="false"/>
所以,請告訴我,我怎樣才能使它可見?
您好我puted它viewstub,但不能看行。 – Google
嘗試將ViewStub與ScrollView一起打包,並將ViewStub的高度設置爲match_parent和SrollView以wrap_content –