tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("快速发布", getResources().getDrawable(R.drawable.publish))
.setContent(intentPublish)
);
为什么会出错,要添加什么了吗
.setIndicator("快速发布", getResources().getDrawable(R.drawable.publish))
.setContent(intentPublish)
);
为什么会出错,要添加什么了吗
解决方案 »
- 关于安卓截图保存的问题
- Android Failed to open libwvm.so问题
- 最新eclipse安装ADT报错,以及SDK manager相关问题。
- 急 , 在线等,关于android 播放器问题
- MTK6573智能机平台系统文件夹文件详解3 - App目录
- 请教问题,android中,调用另外一个APK的主程序,怎么调用啊?
- 关于安卓打包jar文件的问题
- AlertDialog.Builder设置透明度,失败,这是为何?
- 新手求教Android Studio的问题
- item左右切换
- 关于HorizontalScrollView和RelativeLayout搭配使用的问题
- webview 代理问题
.setIndicator("快速发布", getResources().getDrawable(R.drawable.publish))
.setContent(intentPublish)
);这一段代码有问题的只可能是intentPublish,这是什么?是在xml里面定义的id吗,还是其他?
Intent intent = getIntent(); //获得启动该Activity的Intent
uno = intent.getStringExtra("uno");
final TabHost tabHost = getTabHost();
Intent intentPublish = new Intent(this,wtf.wpf.PublishActivity.class);
intentPublish.putExtra("uno", uno);
intentPublish是我定义的
super.onCreate(savedInstanceState);
uno = (String) this.getIntent().getExtras().get("uno");
final TabHost tabHost = getTabHost();
Intent intentPublish = new Intent(this,wtf.wpf.PublishActivity.class);
intentPublish.putExtra("uno", uno);