显示 TextView 的问题
我在我的应用程序中完成了一种布局,其中我有 TextView 并且必须显示段落。现在 i9 已将所有内容设置为 XML 文件,如下代码所示。但它看不到全文,段落的最后一行被剪掉了。 。 。我必须为此做什么? 帮我。 。 。谢谢。 代码:
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:layout_height="35dip"
android:layout_width="wrap_content"
android:text="1973"
android:textColor="#ffffff"
android:layout_marginTop="7dip"
android:background="@drawable/histry"/>
<TextView
android:layout_height="100dip"
android:layout_width="wrap_content"
android:textSize="12px"
android:layout_marginLeft="5dip"
android:singleLine="false"
android:text="Tony Collier, a cook at the Grandview Foundation in Pasadena, begins collecting and distributing food. Collier receives more food donations from local businesses than anticipated and he shares the food with other organizations helping the hungry. Collier begins the first search for a larger facility by moving the small operation into a two-car garage."/>
</LinearLayout>
</LinearLayout>
I have Done One Layout in My Application Where i have TextView and in that i have to shown the Paragraph. now i9 have set all the contain in to the XML file as below code. But it cant seen the Whole text and the last line of the paragraph is cut. . . What i have to do for it ??
Help me. . . Thanks.
Code:
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:layout_height="35dip"
android:layout_width="wrap_content"
android:text="1973"
android:textColor="#ffffff"
android:layout_marginTop="7dip"
android:background="@drawable/histry"/>
<TextView
android:layout_height="100dip"
android:layout_width="wrap_content"
android:textSize="12px"
android:layout_marginLeft="5dip"
android:singleLine="false"
android:text="Tony Collier, a cook at the Grandview Foundation in Pasadena, begins collecting and distributing food. Collier receives more food donations from local businesses than anticipated and he shares the food with other organizations helping the hungry. Collier begins the first search for a larger facility by moving the small operation into a two-car garage."/>
</LinearLayout>
</LinearLayout>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查这个
我尝试了你需要的,它很简单
Check this
i tried what you needed its just simple
您必须为 TextView 设置一些属性。
例如
布局宽度
最大行数
minLines
请参考 http://developer.android.com/reference/android/widget /TextView.html。
You have to set some attributes for your TextView.
Ex.
layout_width
maxLines
minLines
Please refer to http://developer.android.com/reference/android/widget/TextView.html.
设置 TextView 的 Freezes Text="true" 属性..
set Freezes Text="true" property of TextView..