解决方案 »
- android部署到2.2报错和4.2不报错!
- 读SD卡文件乱码问题
- Android蓝牙通信是怎么获取串口数据?请做过蓝牙通信的高手们帮忙看一下
- 关于apk安装的疑问
- win7安装Android的SDK 一闪就没了 全部分都给 跪求答案啊~~~~
- 安卓
- 在线等externalBytesAvailable(): footprint 1708016+extAlloc35041168+n167040>max
- 求一个文件选择器的demo
- 【大侠救我】求一个Android2.3系统源代码下载地址
- Android Studio用不了
- 在Fragment 调用PopupWindow 不显示这么回事,在线等。。。
- android panel
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main); TextView username=(TextView)findViewById(R.id.username);
// username.setText(Html.fromHtml("Hello,大家好,<font color=red>我是你们的新导师</font>"));
String userText="你知道我的名字吗";
SpannableStringBuilder style=new SpannableStringBuilder(userText);
style.setSpan(new ForegroundColorSpan(Color.RED), 1, 3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
username.setText(style);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}
}
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}新版用不惯的话就下个老版本的Eclipse吧
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().add(R.id.container, new PlaceholderFragment()).commit();
}新版用不惯的话就下个老版本的Eclipse吧已经解决啦,引用的layout下的哪个文件 就在哪个文件下创建TextView,报错是因为创建的和引用的不同,此贴终结,多谢各位帮解释