android Textview 常见效果
来源:互联网 发布:java邮件设置传输协议 编辑:程序博客网 时间:2024/06/06 11:01
android:imeOptions="actionSearch"
1:跑马灯的效果
android:singleLine="true"android:ellipsize="marquee"android:focusableInTouchMode="true"android:focusable="true"android:marqueeRepeatLimit="marquee_forever"
- android:singleLine=true 表示使用单行文字,多行文字也就无所谓使用Marquee效果了。
- android:marqueeRepeatLimit,设置走马灯滚动的次数。
- android:ellipsize,设置了文字过长时如何切断文字,可以有none, start,middle, end, 如果使用走马灯效果则设为marquee.
- android:focusable,Android的缺省行为是在控件获得Focus时才会显示走马灯效果
2:超出几行点点的效果:
android:maxLines="2" android:ellipsize="end"
3:自动链接的效果:
android:autoLink="phone|email|map|web|all"
4:超出几行点点的效果:
5:Android 如何让EditText不自动获取焦点
解决之道:
<activity android:name=".ui.race.RaceSignUpAlipayActivity" android:windowSoftInputMode="stateAlwaysHidden"/>
6:
android:imeOptions属性
android软键盘的一些控制
自定弹出软键盘
/** * 自动弹出软键盘 * @param context */ public static void autoPopSoftBorad(Activity context, EditText editText) { try { InputMethodManager m = (InputMethodManager) context. getSystemService(context.getApplicationContext().INPUT_METHOD_SERVICE); m.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_NOT_ALWAYS); editText.setFocusable(true); editText.setFocusableInTouchMode(true); } catch (Exception e) { e.printStackTrace(); } }
/** * 隐藏输入法面板 * 哪个veiw弹出的对话框,填那个view; 针对对话框弹出的软键盘做处理 */ public static void hideKeyboard(Activity c, View view) { InputMethodManager imm = (InputMethodManager) c.getSystemService(c.INPUT_METHOD_SERVICE); if (imm.isActive()) { imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } }
android:imeOptions="actionSearch" 设置键盘的模式
android:focusable="false" android:clickable="false" android:focusableInTouchMode="false"
1 1
- android Textview 常见效果
- Android TextView滚动效果
- TextView 滚动效果 android
- android TextView 走马灯效果
- Android TextView走马灯效果
- Android TextView滚动效果
- Android:TextView点击效果
- Android TextView阴影效果
- Android TextView投影效果
- Android TextView点击效果
- Android TextView 走马灯效果
- Android Textview 阴影效果
- android textView阴影效果
- android 环绕TextView效果
- Android之TextView效果
- Android TextView走马灯效果
- Android TextView跑马灯效果
- Android TextView实现滚动效果
- Pyclewn
- crmsql查询表的信息
- Python 正则表达式验证Canadian邮政编码
- 多叉树结构:JSON数据解析(二)
- 超越纯CSS3,超赞阴影效果推荐-shine.js
- android Textview 常见效果
- python 字符串 的 join 方法 与 split 方法
- 13.10 Decode Ways
- 当下的爱情,不再那么看重才华---七夕节
- 分布式文件系统概述
- Yii-import-导入-自加载
- scons安装和使用
- dede小结1(dede修改默认的目录相对位置和修改文章命名规则)
- Makefile经典教程(掌握这些足够)