简体   繁体   English

带有视图的Android选项卡,仍然是动态的

[英]Android tabs with views, still dynamic

I want to avoid using intents in android tabs. 我想避免在android标签中使用intent。 so I am doing views, but I would like an example on how a large project does this. 所以我在做视图,但是我想举一个关于大型项目如何做到这一点的例子。

Mainly because I am not just displaying static information configured on the view xml, but I am pulling a lot of information from a server when a user interacts with a button within a view. 主要是因为我不仅显示在视图xml上配置的静态信息,而且当用户与视图中的按钮进行交互时,我从服务器中提取了很多信息。 The code seems like it can get really long and messy with this view implementation, instead of when each view is in a separate activity. 该代码似乎会使该视图实现变得冗长而混乱,而不是将每个视图置于单独的活动中。

I would like to see how others separated their methods in a nice neat and organized way. 我想看看其他人如何以一种整洁而有条理的方式分离他们的方法。

and that example hello-tabwidget is nowhere near what I am looking for, thanks 那个例子hello-tabwidget离我要找的东西不远,谢谢

use a viewflipper. 使用取景器。 its like the text switcher. 它就像文本切换器。 u put a layout inside of a viewflipper and trigger it wen a tab is selected. 您将布局放到视镜内,并在选择标签后触发它。

http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/ http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM