列表视图和屏幕方向
我不知道这是否可能,但这就是我想要实现的目标。我有一些活动使用列表适配器在列表视图中显示一些数据(仅由文本视图组成)。
布局基于:
这是 listView 的一“行”的基本组成: 文本视图1 文本视图2 文本视图4 文本视图5 inflatedview
(+++页眉和页脚)
因此,当设备处于纵向方向时,有一列看起来不错,但在横向时,屏幕右侧有很多空间,而且您需要滚动很多。
我想要的是,在横向中,显示同一列表的两列。 (稍后可能适用于平板电脑 3 列,但那是以后的事了……)
好吧,我知道我可以这样做:
textview textView
textView textView
但我不想要那个
我该如何实现呢?我的意思是使用哪些工具?
预先非常感谢!
I dont' event know if it's possible but here is what I would like to achieve. I have some actvities that show some data in listviews with list adapters (just compòsed of text views).
The layout is based on:
And Here is the basic composition of one "row" of the listView:
textview1
textView2
textView4
textview5
inflatedview
(+++headers and footers)
So there is one column which looks fine when device is in portrait orientation but when in landscape there is a lot of space at the right of the screen plus you need tyo scroll a lot.
Well what I would like is that in landscape, two columns of the same list are shown. ( And later maybe for tablets 3 columns but that is for later....)
ok I know I could do:
textview textView
textView textView
but I don't want that
How could I implement that? I mean which tools to use?
thanks a lot in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,当移动方向改变时,我们有一个事件,即;
通过使用上面的代码,我们获得了屏幕方向。如果当时方向是横向的,那么您并排获取 2 个列表视图,并将值设置为该列表视图
For this we have one event is there when mobile orientation is changed i,e;
By using above code we get the screen orientation .If orienation is landscape at that time you take 2 listviews side by side ,and set the values to that listviews