工作笔记1
来源:互联网 发布:网络不安全事件 编辑:程序博客网 时间:2024/06/05 00:57
1. 判断一个String是否为空时候,string.length > 1 比string != "" 好用~原因不知~~反正用length解决了~
2, android:fillViewport="true"
on theScrollView
. scrollview 必须要设置这个为true,才能扩展内部的部件显示出来
3, 点击textview,展开更多内容的方法。
3 down vote
Actually, the way android platform does that is by setting the MaxLine to Integer.MAX_VALUE.
textView.setMaxLines(Integer.MAX_VALUE);
also, if you are using Ellipsize, don't forget to set to null.
textView.setEllipsize(null);
just check how the android framework do just that ;) watch the setMaxLines(Integer.MAX_VALUE);
private void applySingleLine(boolean singleLine, boolean applyTransformation) { mSingleLine = singleLine; if (singleLine) { setLines(1); setHorizontallyScrolling(true); if (applyTransformation) { setTransformationMethod(SingleLineTransformationMethod.getInstance()); } } else { setMaxLines(Integer.MAX_VALUE); setHorizontallyScrolling(false); if (applyTransformation) { setTransformationMethod(null); } } }
4,
setEllipsize
这个是内容过长加省略号的作用~- squid工作笔记 - 1
- vc++工作笔记1
- 工作笔记1
- 工作笔记1
- unity3d工作笔记(1)
- isos系统工作笔记1
- web前台工作笔记1
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 工作笔记
- 抓取
- oracle 游标
- Linux Kernel 排程機制介紹
- 整合IIS和Tomcat失败之后,原网站打不开,出现Service Unavailable 解决办法!!
- Cocos2d-x CCTMXTiledMap类
- 工作笔记1
- long mode 模式下的中断服务例程
- oracle10g init.ora参数文件内容
- 使用 int n 调用系统例程
- 使用 task gate 进行任务切换
- 使用 TSS selector 进行任务切换
- 选择 conforming 还是 non-conforming ?
- long mode 模式下 system/gate descriptor 的疑惑
- 通过 call gate 访问目标 code segment