我LinearLayout
内有ScrollView
。 LinearLayout
的内容会动态呈现。
ScrollView
下方我有另一个LinearLayout
(下方屏幕截图中的下方栏)。
根据文字的高度,有时会被切断(请查看下面的红色破碎椭圆形)。
我有什么选择?非常感谢任何想法: - )
已更新:示例代码
我包含了一些示例代码。我手动指定了TextView的高度,以演示如何在ScrollView中切断文本。一个更有用的布局就像上一个截图中的那个,我有一个底栏和一个固定高度的ScrollView。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="47dp" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Lorem ipsum long text...Lorem ipsum long text...Lorem ipsum long text...Lorem ipsum long text...Lorem ipsum long text...Lorem ipsum long text... bla bla bla" />
</ScrollView>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="195dp"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
示例的屏幕截图:
我原来问题中的棘手问题是我在ScrollView中有可变高度的内容(文本除外)。我想让TextView的最后一行显示它是否被切断。