我有一个看起来像脉冲 https://lh5.ggpht.com/JPrFfuPBYwxBKQYcqSxdmdBWsJPRfZAiYmnKboFBI3V8Zqq7GqTUG9R 的应用程序,它在每个部分有大约8-10个新闻部分,大约有20-30个故事,我现在的设计是一个水平滚动视图,包含20-30个故事,这是my suedo main.xml:。
<LinearLayout>
<HorizontalScrollView>
<LinearLayout orientation:horizontal>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
etc...
<LinearLAyout/>
<horizontalScrollView>
<HorizontalScrollView>
<LinearLayout orientation:horizontal>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
etc...
<LinearLAyout/>
<horizontalScrollView>
<HorizontalScrollView>
<LinearLayout orientation:horizontal>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
<RelativeLayout id:singlenewsstory>
<Imageview/>
<TextView/>
<RelativeLayout/>
etc...
<LinearLAyout/>
<horizontalScrollView>
etc...当然,我会动态地填充我的布局,但我最关心的是,使用这个设计,活动中将有大约200个视图和大约150张图片,这可能会减慢应用程序的速度。我有几个问题:
每个滚动视图最多有3个新闻故事在屏幕上可见,水平滚动视图是否通过不提取绑定视图来优化这一点?
2-视野是否适合我正在做的事情,或者我还可以使用其他的东西?
我把所有这些水平滚动视图放到一个垂直滚动视图中,但是我将一个水平滚动,垂直滚动视图也会滚动少量。
发布于 2012-09-24 06:19:18
可以用列表视图替换滚动视图吗?Listviews只绘制屏幕上的内容,听起来像是在滚动一组重复的视图。
https://stackoverflow.com/questions/12558096
复制相似问题