我正在尝试使用 textView 显示一个文本框。我在运行时添加了一些数据。我只想让它显示一个大小为 23 行的框。
我使用的代码就是这个。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/twittertext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fadingEdge="vertical"
android:maxLines="23"
android:minLines="23"
android:background="@drawable/dropshadow"
android:scrollbars="vertical"
android:text="Getting data on your slow n/w..."
android:textColor="#ffffff"
/>
</ScrollView>
</LinearLayout>
现在,当我在模拟器中看到它时,它会完美运行(Android 2.2),但是当我在真实设备(Wildfire 2.2.1)中测试相同的代码时,该框不会出现 23 行。相反,它只显示一个 5 行框。我能够滚动,但看起来像
:minLine
不管用。
请帮我。