学习目标:实现新的输入法学习目的:掌握Android输入法框架学习收获:Android 1.5 新特色之一就是输入法框架(Input Method Framework,IMF),正是它的出现,才为诞生不带实体键盘的设备提供了可能。IMF设计用来支持不同的IME,包括了soft keyboard,ha...
分类:
移动开发 时间:
2014-06-26 00:09:40
阅读次数:
345
一、文件的上传1、客户端设置:(1)、在标签中将enctype和method两个属性指明相应的值。Enctype="multipart/form-data"; Method="POST"(2)、form表单中设置一个hidden类型的input框,其中name的值为MAX_FILE_SIZE的隐藏值...
分类:
移动开发 时间:
2014-06-25 22:07:20
阅读次数:
394
创建action,内容如下:package action; import com.opensymphony.xwork2.ActionSupport; public class A extends ActionSupport { public String toJsp(){ ret...
分类:
其他好文 时间:
2014-06-24 14:01:10
阅读次数:
197
关于收起虚拟键盘,网上能找到的大多是这个:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0) ;
不过这有个问题,比如我们在一个页面中...
分类:
移动开发 时间:
2014-06-22 21:59:42
阅读次数:
250
模板方法模式(template method pattern) JFrame 详解本文地址: http://blog.csdn.net/caroline_wendy参考模板方法模式(template method pattern): http://blog.csdn.net/caroline_wendy/article/details/32159455模板方法模式(template method ...
分类:
其他好文 时间:
2014-06-22 21:36:47
阅读次数:
283
模板方法模式(template method pattern) 详解本文地址: http://blog.csdn.net/caroline_wendy模板方法模式(template method pattern): 在一个方法中定义一个算法的骨架, 而将一些步骤延迟到子类中. 模板方法使得子类可以在不改变算法结构的情况下, 重新定义算法中的某些步骤.模板方法可以进行挂钩(hook), 钩子(hoo...
分类:
其他好文 时间:
2014-06-22 18:49:01
阅读次数:
227
前些时间在做一个搜索功能时发现一个比较有意思的现象,场景是这样的:在一个模态窗口中是一个订单列表,页面的顶部有若干个状态筛选框和一个搜索关键字输入框,当焦点在关键字输入框时按回车,本来是对input的keyup事件做了监听,当发现是按了回车键时便自动提交搜索请求的,但输入关键字后按回车时页面竟然跳转了,并且出现“HTTP 错误 405.0 - Method Not Allowed无法显示您正在查找...
分类:
其他好文 时间:
2014-06-22 17:05:07
阅读次数:
219
模板方法模式(template method pattern) 排序(sort) 详解本文地址: http://blog.csdn.net/caroline_wendy参考模板方法模式(template method pattern): http://blog.csdn.net/caroline_wendy/article/details/32159455模板方法模式的一个主要的应用是排序(sor...
分类:
其他好文 时间:
2014-06-22 15:24:51
阅读次数:
231
欢迎关注我的新博客地址:http://cuipengfei.me/
在Scala中,名字叫做update的方法是有特殊作用的。
比如:
1
2
3
val scores = new scala.collection.mutable.HashMap[String, Int]
scores("Bob") = 100
val bobsScore =...
分类:
其他好文 时间:
2014-06-22 07:37:52
阅读次数:
282
Inflate() method can find out a layout defined by xml,as like the findViewById() method,but there have some different between them.
The different are:
If your Activity used other layout,such as...
分类:
移动开发 时间:
2014-06-22 06:41:43
阅读次数:
362