【发布时间】:2018-04-02 09:18:59
【问题描述】:
如果我在 android 中添加多个文本视图,它会隐藏我需要在屏幕完成时中断 例如,我的代码是这样的
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/layout5"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the text"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="last checking text"/>
</LinearLayout>
结果似乎是
我需要在屏幕关闭时分解文本 并换到另一行。 这只是我以编程方式做这件事的示例代码,所以请不要回答添加更多线性布局。
【问题讨论】:
-
为什么需要太多的textview?
-
将线性布局的方向更改为垂直
-
我需要它是水平的但是当屏幕完成时我需要它分解并且下一个文本视图出现在它下面
-
为什么没有一个
TextView呢? -
我正在以编程方式执行此操作,因此我需要多个文本视图,它们将执行不同的操作。我粘贴的代码只是一个例子
标签: android android-layout textview