Chinaunix首页 | 论坛 | 博客
  • 博客访问: 868792
  • 博文数量: 322
  • 博客积分: 6688
  • 博客等级: 准将
  • 技术积分: 3626
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-19 11:26
文章分类

全部博文(322)

文章存档

2013年(5)

2012年(66)

2011年(87)

2010年(164)

分类: Java

2011-07-25 23:59:11

1、TextView.setText()中不支持HTML TAG的输出,即如果写成如下:
  1. TextView mTextViewNo = (TextView)findViewById(R.id.test_html_tag_no);
  2. mTextViewNo.setText("Pls Access ");
  3.         
  4. extView mTextViewYes = (TextView)findViewById(R.id.test_html_tag_ok);
  5. mTextViewYes.setText("Pls Access ");
此时,layout.xml中配置为:
  1. <TextView
  2.     android:id="@+id/test_html_tag_no"
  3.     android:layout_width="fill_parent"
  4.     android:layout_height="wrap_content"
  5.     />
  6. <TextView
  7.     android:id="@+id/test_html_tag_ok"
  8.     android:layout_width="wrap_content"
  9.     android:layout_height="wrap_content"
  10.     android:autoLink="all"
  11. />
最终效果图为:


2、获取手机屏幕大小,使用DisplayMatrics来获取画面高宽的大小。






阅读(767) | 评论(0) | 转发(0) |
0

上一篇:Check Broswer UserAgent

下一篇:P3P技术总概

给主人留下些什么吧!~~