2 u013696862 u013696862 于 2014.03.31 17:07 提问

中根据应用的状态(状态机形式),用setContentView来切换各个视图,

用一个Activity对应一个界面,还是一个个自定义的View对应一个界面
从网上看到的很多例子都是:整个应用一个Activity,然后所有的界面采用自定义的派生自View的类实现,比如:MenuView、SplashView、HelpAboutView,在Activity中根据应用的状态(状态机形式),用setContentView来切换各个视图,这样就是一个View对应一个界面。还有一种写法,就是用一个Activity来对应一个界面,根据应用的状态在各个Activity间进行切换。我想问下这两种写法谁优谁劣,各有什么优点和弊端
http://www.zhoushan.cn/yy/mhjk/1263207.html
http://www.zhoushan.cn/yy/mhjk/1263310.html
http://www.zhoushan.cn/yy/mhjk/1263317.html
http://www.zhoushan.cn/yy/sh/1263403.html
http://www.zhoushan.cn/yy/sh/1263353.html
http://www.zhoushan.cn/yy/sh/1263222.html
http://www.changsha.cn/ys/csys/2513161.html
http://www.changsha.cn/ys/csys/2513084.html
http://www.changsha.cn/ys/csys/2513124.html
http://www.changsha.cn/ys/csys/2513016.html
http://www.changsha.cn/ys/csys/2512997.html
http://www.qdxw.com.cn/yx/dwwf/2014007.html
http://www.qdxw.com.cn/yx/dwwf/2013983.html
http://www.qdxw.com.cn/yx/dwwf/2013966.html
http://www.js0573.com/yx/sjbm/3731784.html
http://www.js0573.com/yx/sjbm/3731585.html
http://www.js0573.com/yx/jsfs/3731708.html
http://www.js0573.com/yx/jsfs/3731687.html
http://www.js0573.com/yx/dzdy/3731737.html
http://www.js0573.com/yx/dzdy/3731749.html
http://jiankang.nen.com.cn/system/2014/03/31/012080373.shtml
http://jiankang.nen.com.cn/system/2014/03/31/012080386.shtml
http://jiankang.nen.com.cn/system/2014/03/31/012080397.shtml
http://www.changsha.cn/bj/yl/2014/0331/518725.html
http://www.changsha.cn/bj/yl/2014/0331/518728.html
http://www.changsha.cn/bj/yl/2014/0331/518730.html
http://www.xgrb.cn/xwzx/jkys/5264424648.html
http://www.changsha.cn/bj/yl/2014/0331/518743.html
http://www.xgrb.cn/xwzx/jkys/5264444085.html
http://www.js0573.com/yx/dzdy/3732270.html
http://www.js0573.com/yx/dzdy/3732354.html
http://www.js0573.com/yx/dzdy/3732437.html
http://www.js0573.com/yx/sjbm/3732625.html
http://www.js0573.com/yx/sjbm/3732635.html
http://www.js0573.com/yx/sjbm/3732641.html
http://www.yongzhou.gov.cn/yangsheng/zx/2014/0331/54615.html
http://www.yongzhou.gov.cn/yangsheng/zx/2014/0331/54616.html
http://www.yongzhou.gov.cn/yangsheng/zx/2014/0331/54617.html
http://www.lfxww.com/yy/zxtj/2014/0331/1359544.html
http://www.yltvb.com/xwbk/jkxx/5258308177.html
http://www.yltvb.com/xwbk/redianxinwen/5258317361.html
http://www.lfxww.com/yy/zxtj/2014/0331/1359549.html
http://www.lfxww.com/yy/zxtj/2014/0331/1359552.html
http://www.yltvb.com/xwbk/redianxinwen/5258329540.html
http://www.yltvb.com/xwbk/redianxinwen/5258370808.html
http://www.yltvb.com/xwbk/redianxinwen/5258375249.html
http://www.js0573.com/yx/jsfs/3733131.html
http://www.js0573.com/yx/jsfs/3733163.html
http://www.js0573.com/yx/jsfs/3733186.html
http://www.yltvb.com/xwbk/redianxinwen/5258400583.html
http://www.aibang.com/detail/1816725179-1268699976/product/13687851.html
http://www.aibang.com/detail/1816725179-1268699976/product/13687897.html
http://www.aibang.com/detail/1816725179-1268699976/product/13687963.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688009.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688111.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688189.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688229.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688287.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688383.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688427.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688457.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688495.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688549.html
http://www.aibang.com/article/1816725179-1268699976/product/13688601.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688665.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688713.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688793.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688857.html
http://www.aibang.com/detail/1816725179-1268699976/product/13688895.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689025.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689067.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689155.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689239.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689339.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689387.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689443.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689495.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689607.html
http://www.aibang.com/article/1816725179-1268699976/product/13689641.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689699.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689731.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689765.html
http://www.aibang.com/article/1816725179-1268699976/product/13689801.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689823.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689849.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689893.html
http://www.aibang.com/article/1816725179-1268699976/product/13689921.html
http://www.aibang.com/detail/1816725179-1268699976/product/13689983.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690067.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690177.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690277.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690311.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690383.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690439.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690485.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690583.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690687.html
http://www.aibang.com/article/1816725179-1268699976/product/13690781.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690833.html
http://www.aibang.com/detail/1816725179-1268699976/product/13690903.html
http://www.aibang.com/show/1816725179-1268699976/product/13687851.html
http://www.aibang.com/show/1816725179-1268699976/product/13687897.html
http://www.aibang.com/show/1816725179-1268699976/product/13687963.html
http://www.aibang.com/show/1816725179-1268699976/product/13688009.html
http://www.aibang.com/show/1816725179-1268699976/product/13688111.html
http://www.aibang.com/show/1816725179-1268699976/product/13688189.html
http://www.aibang.com/show/1816725179-1268699976/product/13688229.html
http://www.aibang.com/show/1816725179-1268699976/product/13688287.html
http://www.aibang.com/show/1816725179-1268699976/product/13688383.html
http://www.aibang.com/show/1816725179-1268699976/product/13688427.html
http://www.aibang.com/show/1816725179-1268699976/product/13688457.html
http://www.aibang.com/show/1816725179-1268699976/product/13688495.html
http://www.aibang.com/show/1816725179-1268699976/product/13688549.html
http://www.aibang.com/show/1816725179-1268699976/product/13688665.html
http://www.aibang.com/show/1816725179-1268699976/product/13688713.html
http://www.aibang.com/show/1816725179-1268699976/product/13688793.html
http://www.aibang.com/show/1816725179-1268699976/product/13688857.html
http://www.aibang.com/show/1816725179-1268699976/product/13688895.html
http://www.aibang.com/show/1816725179-1268699976/product/13689025.html
http://www.aibang.com/show/1816725179-1268699976/product/13689067.html
http://www.aibang.com/show/1816725179-1268699976/product/13689155.html
http://www.aibang.com/show/1816725179-1268699976/product/13689239.html
http://www.aibang.com/show/1816725179-1268699976/product/13689339.html
http://www.aibang.com/show/1816725179-1268699976/product/13689387.html
http://www.aibang.com/show/1816725179-1268699976/product/13689443.html
http://www.aibang.com/show/1816725179-1268699976/product/13689495.html
http://www.aibang.com/show/1816725179-1268699976/product/13689607.html
http://www.aibang.com/show/1816725179-1268699976/product/13689699.html
http://www.aibang.com/show/1816725179-1268699976/product/13689731.html
http://www.aibang.com/show/1816725179-1268699976/product/13689765.html
http://www.aibang.com/show/1816725179-1268699976/product/13689823.html
http://www.aibang.com/show/1816725179-1268699976/product/13689849.html
http://www.aibang.com/show/1816725179-1268699976/product/13689893.html
http://www.aibang.com/show/1816725179-1268699976/product/13689983.html
http://www.aibang.com/show/1816725179-1268699976/product/13690067.html
http://www.aibang.com/show/1816725179-1268699976/product/13690177.html
http://www.aibang.com/show/1816725179-1268699976/product/13690277.html
http://www.aibang.com/show/1816725179-1268699976/product/13690311.html
http://www.aibang.com/show/1816725179-1268699976/product/13690383.html
http://www.aibang.com/show/1816725179-1268699976/product/13690439.html
http://www.aibang.com/show/1816725179-1268699976/product/13690485.html
http://www.aibang.com/show/1816725179-1268699976/product/13690583.html
http://www.aibang.com/show/1816725179-1268699976/product/13690687.html
http://www.aibang.com/show/1816725179-1268699976/product/13690833.html
http://www.aibang.com/show/1816725179-1268699976/product/13690903.html
http://t.163.com/event/info/eventId/3797628332482416142
http://t.163.com/event/info/eventId/5048200334718355192
http://t.163.com/event/info/eventId/3001632523252360683
http://t.163.com/event/info/eventId/-5165053443916676054
http://t.163.com/event/info/eventId/5151079283304079351
http://t.163.com/event/info/eventId/-5846807100589323606
http://t.163.com/event/info/eventId/465691299094645189
http://t.163.com/event/info/eventId/-3817468640769491882
http://t.163.com/event/info/eventId/-2482077835762300334
http://t.163.com/event/info/eventId/6229128537689051590
http://t.163.com/event/info/eventId/1529518410380857955
http://t.163.com/event/info/eventId/-7711777147765641859
http://t.163.com/event/info/eventId/5745047756132607167
http://t.163.com/event/info/eventId/1022272176945148050
http://t.163.com/event/info/eventId/-6311607256242401192
http://t.163.com/event/info/eventId/-6708852757208684514
http://t.163.com/event/info/eventId/-627761402548380565
http://t.163.com/event/info/eventId/-3269150822262727791
http://t.163.com/event/info/eventId/-3120899941189843125
http://t.163.com/event/info/eventId/-6247903782414298207
http://kan.weibo.com/con/3694215406869548
http://kan.weibo.com/con/3694215490755646
http://kan.weibo.com/con/3694215570327226
http://kan.weibo.com/con/3694216803452879
http://kan.weibo.com/con/3694216900042121
http://kan.weibo.com/con/3694217810086039
http://kan.weibo.com/con/3694218108001927
http://kan.weibo.com/con/3694218393214648
http://kan.weibo.com/con/3694218519043800
http://kan.weibo.com/con/3694218724444480
http://kan.weibo.com/con/3694218992879981
http://kan.weibo.com/con/3694219080960379
http://kan.weibo.com/con/3694219160772424
http://kan.weibo.com/con/3694219269824347
http://kan.weibo.com/con/3694219378876268
http://kan.weibo.com/con/3694219508899714
http://kan.weibo.com/con/3694219617951638
http://kan.weibo.com/con/3694219697523176
http://kan.weibo.com/con/3694219789918143
http://kan.weibo.com/con/3694219869609941
http://blog.sina.com.cn/s/blog_b6ce44750101upp7.html
http://blog.sina.com.cn/s/blog_b6ce44750101upp8.html
http://blog.sina.com.cn/s/blog_b6ce44750101upp9.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppa.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppd.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppe.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppj.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppm.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppp.html
http://blog.sina.com.cn/s/blog_b6ce44750101uppv.html
http://www.zhongsou.net/news/25369181.html
http://www.zhongsou.net/news/25369357.html
http://www.zhongsou.net/news/25369448.html
http://www.zhongsou.net/news/25369578.html
http://www.zhongsou.net/news/25369663.html
http://www.zhongsou.net/news/25369737.html
http://www.zhongsou.net/news/25369758.html
http://www.zhongsou.net/news/25369865.html
http://www.zhongsou.net/news/25369905.html
http://www.zhongsou.net/news/25369943.html
http://www.beibaotu.com/plans/k03es1?from=map
http://www.beibaotu.com/plans/w03ekv?from=map
http://www.beibaotu.com/plans/o03er9?from=map
http://www.beibaotu.com/plans/l03erf?from=map
http://www.beibaotu.com/plans/n03ery?from=map
http://www.beibaotu.com/plans/703eb1?from=map
http://www.beibaotu.com/plans/z03ebf?from=map
http://www.beibaotu.com/plans/303eyq?from=map
http://www.beibaotu.com/plans/q03eyj?from=map
http://www.beibaotu.com/plans/803eyp?from=map
http://www.xsjyiyuan.com/38/

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!