学习目标:实现新的输入法学习目的:掌握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
【创建型】1、单例模式(Singleton Pattern) 2、工厂方法模式(Factory Method Pattern)3、抽象工厂(Abstract Factory Pattern)4、建造者模式(Builder Pattern) 5、原型模式(Prototype Pattern) 【结构型...
分类:
编程语言 时间:
2014-06-25 21:18:34
阅读次数:
247
自定义配置文件到spring 中,有时候想做一些数据结构的配置化信息,根据业务做一个扩展。
首先:
在项目的META-INF目录下新建两个文件spring.handlers,和spring.shcemas
Spring.handlers在类org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver中已经写死...
分类:
编程语言 时间:
2014-06-25 00:32:16
阅读次数:
304
创建action,内容如下:package action; import com.opensymphony.xwork2.ActionSupport; public class A extends ActionSupport { public String toJsp(){ ret...
分类:
其他好文 时间:
2014-06-24 14:01:10
阅读次数:
197
在算法分析中,当一个算法中包括递归调用时,其时间复杂度的分析会转化为一个递归方程求解。实际上,这个问题是数学上求解渐近阶的问题,而递归方程的形式多种多样,其求解方法也是不一而足,比較经常使用的有下面四种方法: (1)代入法(Substitution Method) 代入法的基本步骤是先猜測递归方程....
分类:
其他好文 时间:
2014-06-24 13:36:31
阅读次数:
195
关于收起虚拟键盘,网上能找到的大多是这个:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0) ;
不过这有个问题,比如我们在一个页面中...
分类:
移动开发 时间:
2014-06-22 21:59:42
阅读次数:
250
模板方法模式(template method pattern) 详解本文地址: http://blog.csdn.net/caroline_wendy模板方法模式(template method pattern): 在一个方法中定义一个算法的骨架, 而将一些步骤延迟到子类中. 模板方法使得子类可以在不改变算法结构的情况下, 重新定义算法中的某些步骤.模板方法可以进行挂钩(hook), 钩子(hoo...
分类:
其他好文 时间:
2014-06-22 18:49:01
阅读次数:
227
欢迎关注我的新博客地址: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