问题是这样的:希望每次切换的时候重新启动activity,其中一个activity是连接网络加载数据,如果该activity已经成功显示数据,那么在切换tab时就不需要重新启动;如果没有成功显示,则每次切换都希望重新启动该activity来连接网络再次加载,请问该怎么实现?
解决方案 »
- 请教android中binder的问题
- android天气预报 sax解析报错
- 现在有没有用C/C++ 开发 andriod 的兄弟
- 请问如何触发系统的广播(不能在activity里触发)?
- Android adb shell中将getevent信息重定向到文本文件,为什么会出现缓存情况
- 如何将自定义键盘显示出来?view挂在dialog上面
- 怎么不能更新sdk API了
- tabhost嵌套scrollview不能上下滚动?????
- 不是Activity能用sharedPreferences吗?
- Android studio前几天还能运行,后来在C盘里移除了个东西,然后再打开就如下图所示了
- 困扰一周的问题,至今无解,求大侠指教
- Android中使用正则表达式处理字符串
tabs.setCurrentTabByTag(tag);
Intent productsIntent = new Intent(this, ProductActivity.class);
Bundle param = new Bundle();
param.putInt("Categories", 0); //Your id
param.putCharSequence("CategoryName", "No Category");
productsIntent.putExtras(param);
productSpec.setContent(productsIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
在不同的activity中访问tabHost
Intent productsIntent = new Intent(context, ProductActivity.class);
Bundle param = new Bundle();
param.putInt("Categories", 1); //Your id
param.putCharSequence("CategoryName", categoryValues[position]);
productsIntent.putExtras(param);
MainTabActivity.productSpec.setContent(productsIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
MainTabActivity.tabHost.setCurrentTab(1);