[英]text view going below screen how to fix this
我正在嘗試使用text-view添加大文本,但它在屏幕下方,請告訴我如何使其固定在屏幕上,是否有比text view更好的顯示文本的方法,我無法添加顯示框的字體,所以我使用了例如隨機文本
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.07" >
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="17dp"
android:layout_marginLeft="18dp"
android:text="Previous" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="43dp"
android:text="The organization and coordination of the
Management is often included as a factor of production along with machines, materials, and money. According to the management guru Peter Drucker (1909-2005), the basic task of management includes both marketing and innovation. Practice of modern management originates from the 16th century study of low-efficiency and failures of certain enterprises, conducted by the English statesman Sir Thomas More (1478-1535). Management consists of the interlocking functions of creating corporate policy and organizing, planning, controlling, and directing an organization's resources in order to achieve the objectives of that policy.
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/button2"
android:layout_alignBottom="@+id/button2"
android:layout_alignParentRight="true"
android:layout_marginRight="37dp"
android:text="Next" />
</RelativeLayout>
</LinearLayout>
使用ScrollView而不是LinearLayout作為包裝器視圖。
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<!--everything else-->
</ScrollView>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.