动态添加视图到水平的LinearLayout熄灭屏幕 [英] Dynamically adding views To Horizontal LinearLayout goes out of the screen

查看:129
本文介绍了动态添加视图到水平的LinearLayout熄灭屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要动态创建文本浏览和编辑文本和线性布局(水平),这已经是XML文件中声明里面插入。文本浏览和编辑的文本数量要插入的动态变化。我是动态创建的意见,并将其添加到线性layout.But的问题是,如果浏览次数更是移出屏幕,尽管将在未来line.what我应该做的,使的意见进来接下来,如果没有空间可用行。

I have to create Text Views and Edit Texts dynamically and insert it inside the linear layout(horizontal) which is already declared in the XML file. Number of Text Views and Edit Texts to be inserted varies dynamically. I am creating the views dynamically and adding it to the linear layout.But the problem is that if number of views is more it moves out of the screen in spite of coming in the next line.what should I do to make the views come in next line if no space is available.

推荐答案

目前与行为没有任何Android的布局。

There is currently no Android layout with that behaviour.

然而,它已经解决在其它线程(例如<一个href="http://stackoverflow.com/questions/2961777/android-linearlayout-horizontal-with-wrapping-children">Android - 的LinearLayout水平,带包装的孩子),它提供了有关如何实现这样的布局指导

Nevertheless, it has already been tackled in other threads (such as Android - LinearLayout Horizontal with wrapping children), which provide guidance on how to implement such a layout.

这篇关于动态添加视图到水平的LinearLayout熄灭屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆