- 浏览: 698250 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
utyujin:
作者你好,首先自我注释一下我是一名UI设计师,最近在写关于屏幕 ...
android中的dp,px深度解析 -
eagledame:
<data android:scheme="p ...
Android利用系统广播---监听应用程序安装和卸载[转] -
圣经未来:
虽然帖子距今已有三年,但是我还是来评论一下。对于这段话: 这句 ...
android中的dp,px深度解析 -
passerby_whu:
如果Activity中已经有了很多id了。怎么样保证你指定的i ...
Android Layout 之 RelativeLayout,代码实现相对布局 -
passerby_whu:
u013023750 写道楼主你好 ...
android中的dp,px深度解析
输入法的例子和源代码看了不少时间了,看得头很晕,很郁闷。静下心来把整个代码想了一遍,其实大部分代码都在处理绘制界面,以及事件的处理,核心代码很少,都被底层封装得很完美了。
先看看一般输入法的界面:
分为两个部分,上部分是候选窗口(CandidateView),用来显示候选词,现在常用的输入法都有这个功能,如在搜狗、google输入法中输入abc,输入框中就会显示很多相关联的中文词。下部分就是软键盘了,这个没什么好说的。
输入法中核心类是InputMethodService
其次就是:CandidateView 和KeyboardView
CandidateView为候选窗口,InputMethodService在启动过程中会调用接口public View onCreateCandidatesView() ,在这个方法
中把CandidateView对象返回后,InputMethodService内部会将其布局到相应的位置。
在android中没有CandidateView父类,得自己从头写,一般的做法是:
通过方法public void setService(InputMethodService listener) 将Service类传进来,然后再通过public void setSuggestions(List<String> suggestions…) 方法将候选词列表传递过来,CandidateView将其显示到界面上,用户选择结束后,再通过service的方法pickSuggestionManually(mSelectedIndex) ,将选择的候选词在列表中的序号传递回去。至此, CandidateView 就完成了它神圣的使命。
android中KeyboardView有一个通用类,继承它可以通过简单的配置文件就显示出很专业软键盘。在源代码中,它绝大部分代码都在做绘制工作和事件处理,不过就其本质功能来说是相当地简单,用户摁下软键盘上的某个键后,它把这个键所代表的值传递给InputMethodService类也完成了它的使命。InputMethodService在public View onCreateInputView() 方法中获得该View。
InputMethodService就是输入法的核心了,该类是一个Service,跟其它默默无闻的Service不同的是,它是一个带有View的Service。其内部有几个个重要的接口:
InputMethodImpl
InputMethodSessionImpl
InputConnection
InputMethodService通过这几个个类跟系统和输入框进行交互的。
输入框从InputMethodService获取信息是通过InputConnection来实现的, 在启动输入法时,InputConnection由客户端控件创建,并传递给输入法应用,由输入法应用调用,进行信息反馈
InputMethod接口定义了一套操纵输入法应用的方法。如,bindInput, hideInput, startInput等。为了系统安全,这类接口只有系统可以访问,客户端控件无法直接调用这个接口。所有的输入法应用都需要客户端控件具有 BIND_INPUT_METHOD权限,作为系统的安全机制,否则将无法与输入法服务交互。
InputMethodSession作为InputMethod的辅助接口类,为客户端控件开放了可直接调用的函数接口。包括向输入法应用分发键盘事件,更新光标位置,更新编辑区域内选择的问题信息等。客户端控件通过IIputMethodSession对于输入法应用的交互是单向的,即只能向输入法应用传递信息,无法获取信息
以上几个点是从网上copy过来的,感觉这几点对于理解InputMethodService特别有用。
代码看得太多反而看不清本质,这几个类中最实用的是InputConnection的
public boolean commitText(CharSequence text, int newCursorPosition) 。
通过KeyboardView和CandidateView, InputMethodService类已经获得了想要的内容,然后通过这个方法把值传递给输入框。
按奈不住心中读源代码的郁闷,先来写一个输入法发泄一下:
先来一个CandidateView,设想的布局如下:
这个View中不进行任何自绘制,用android现有的View,两边各一个按钮(Button),用来滚动多个候选词,中间显示候选词(TextView),为了方便CandidateView继承RelativeLayout的内部类,便于加入子控件和控制,setService和 setSuggestions两个方法可以不用,反正是内部类,不过为了配合上面的说明,思量再三还是加上了:
public class helloIme extends InputMethodService {
class CandidateView extends RelativeLayout{
TextView tv; // 中间显示候选词
Button btLeft, btRight; // 左右按钮
helloIme listener; // helloIme 用于返回选中的 候选词下标
List<String> suggestions; // 候选词列表, KeyboardView 不同的键按下后会设置相关的列表
int mSelectedIndex = -1; // 当前 候选词下标
public CandidateView(Context context) {
super(context);
tv = new TextView(context);
tv.setId(1);
RelativeLayout.LayoutParams lpCenter = new RelativeLayout.LayoutParams(200, ViewGroup.LayoutParams.WRAP_CONTENT);
lpCenter.addRule(RelativeLayout.CENTER_IN_PARENT);
addView(tv, lpCenter);
tv.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
listener.pickSuggestionManually(mSelectedIndex);
}
});
btLeft = new Button(context);
btLeft.setText("<");
btLeft.setOnClickListener(new OnClickListener(){
public void onClick(View arg0) {
mSelectedIndex = mSelectedIndex > 0 ? (mSelectedIndex - 1) : 0;
tv.setText(suggestions.get(mSelectedIndex));
}
});
RelativeLayout.LayoutParams lpLeft = new RelativeLayout.LayoutParams(60, ViewGroup.LayoutParams.WRAP_CONTENT);
lpLeft.addRule(RelativeLayout.LEFT_OF, 1);
addView(btLeft, lpLeft);
btRight = new Button(context);
btRight.setText(">");
btRight.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
mSelectedIndex = mSelectedIndex >= suggestions.size() - 1 ? suggestions.size() - 1 : mSelectedIndex + 1;
tv.setText(suggestions.get(mSelectedIndex));
}
});
RelativeLayout.LayoutParams lpRight = new RelativeLayout.LayoutParams(60, ViewGroup.LayoutParams.WRAP_CONTENT);
lpRight.addRule(RelativeLayout.RIGHT_OF, 1);
addView(btRight, lpRight);
}
public void setService(helloIme listener){
this.listener = listener;
}
public void setSuggestions(List<String> suggestions) {
mSelectedIndex = 0;
tv.setText(suggestions.get(mSelectedIndex));
this.suggestions = suggestions;
}
}
上面最重要的是粗体的那两行,View的布局还是花费了很多代码:(
KeyboardView的布局预想如下:
就两个按钮,点if时往输入框中输出if(){}, if(){}else if(){}...,whie时往输入框中输出whie(){},这个类同样是继承于RelativeLayout的内部类:
class KeyboardView extends RelativeLayout{
public KeyboardView(Context context) {
super(context);
Button btIf = new Button(context);
btIf.setText("if");
btIf.setId(1);
RelativeLayout.LayoutParams lpIf = new RelativeLayout.LayoutParams(100, 50);
lpIf.addRule(RelativeLayout.CENTER_HORIZONTAL);
btIf.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
setCandidatesViewShown(true); // 显示 CandidateView
helloIme.this.onKey("if"); // 将点击按钮的值传回给 InputMethodService
}
});
addView(btIf, lpIf);
Button btWhile = new Button(context);
btWhile.setText("while");
RelativeLayout.LayoutParams lpWhile = new RelativeLayout.LayoutParams(100, 50);
lpWhile.addRule(RelativeLayout.BELOW , 1);
lpWhile.addRule(RelativeLayout.ALIGN_LEFT, 1);
btWhile.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
setCandidatesViewShown(true);
helloIme.this.onKey("while");
}
});
addView(btWhile, lpWhile);
}
}
CandidateView默认是不显示的,所以需要调用InputMethodService 的setCandidatesViewShown()方法。
接下来把helloIme的代码贴出来:
public class helloIme extends InputMethodService {
private List<String>suggestionlist; // 当前候选词表
private Hashtable<String, List<String>> data; // 词典数据
private KeyboardView mkeyView;
private CandidateView mCandView;
public void onInitializeInterface() { //InputMethodService在启动时,系统会调用该方法,具体内容下回再表
// 初始化 词典数据
data = new Hashtable<String, List<String>>();
List<String> list = new ArrayList<String>();
list.add("if(){}");
list.add("if(){}else if(){}");
list.add("if(){}else{}");
data.put("if", list);
list = new ArrayList<String>();
list.add("while(){}");
data.put("while", list);
}
public View onCreateInputView() {
mkeyView = new KeyboardView(this);
return mkeyView;
}
public View onCreateCandidatesView() {
mCandView = new CandidateView(this);
mCandView.setService(this);
return mCandView;
}
public void pickSuggestionManually(int mSelectedIndex){
getCurrentInputConnection().commitText(suggestionlist.get(mSelectedIndex), 0); // 往输入框输出内容
setCandidatesViewShown(false); // 隐藏 CandidatesView
}
public void onKey(CharSequence text){
// 根据按下的按钮设置候选词列表
suggestionlist = data.get(text);
mCandView.setSuggestions(suggestionlist);
}
class KeyboardView extends RelativeLayout{
//......
}
class CandidateView extends RelativeLayout{
//......
}
}
代码写完,再来写配置文件,
在res目录下面建立一个新目录xml,然后创建一个method.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Search Manager. -->
<input-method
xmlns:android="http://schemas.android.com/apk/res/android" />
设置Manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.helloIme"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<service android:name="helloIme"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod"/>
</intent-filter>
<meta-data android:name="android.view.im" android:resource="@xml/method"/>
</service>
</application>
<uses-sdk android:minSdkVersion="5" />
</manifest>
直接运行程序,eclipse输出如下Log:
[2010-08-25 17:16:48 - helloIme]Installing helloIme.apk...
[2010-08-25 17:16:50 - helloIme]Success!
[2010-08-25 17:16:50 - helloIme]\helloIme\bin\helloIme.apk installed on device
[2010-08-25 17:16:50 - helloIme]Done!
嗯,安装成功了!呵呵,革命尚未成功,还需在模拟器上进行设置:
点击settings->Language & keyboard,在下部出现了一个test,右边有个checkbox,选上它。
找一个有输入框的应用,最简单到写短消息的画面,左键长按输入框,会弹出一个输入法选择提示框,点进去就会看到刚才创建的输入法了,点击右边的单选框,oh,my ime,漂亮的hello输入法就展现在面前了:
android果然很强大啊。
先看看一般输入法的界面:
分为两个部分,上部分是候选窗口(CandidateView),用来显示候选词,现在常用的输入法都有这个功能,如在搜狗、google输入法中输入abc,输入框中就会显示很多相关联的中文词。下部分就是软键盘了,这个没什么好说的。
输入法中核心类是InputMethodService
其次就是:CandidateView 和KeyboardView
CandidateView为候选窗口,InputMethodService在启动过程中会调用接口public View onCreateCandidatesView() ,在这个方法
中把CandidateView对象返回后,InputMethodService内部会将其布局到相应的位置。
在android中没有CandidateView父类,得自己从头写,一般的做法是:
通过方法public void setService(InputMethodService listener) 将Service类传进来,然后再通过public void setSuggestions(List<String> suggestions…) 方法将候选词列表传递过来,CandidateView将其显示到界面上,用户选择结束后,再通过service的方法pickSuggestionManually(mSelectedIndex) ,将选择的候选词在列表中的序号传递回去。至此, CandidateView 就完成了它神圣的使命。
android中KeyboardView有一个通用类,继承它可以通过简单的配置文件就显示出很专业软键盘。在源代码中,它绝大部分代码都在做绘制工作和事件处理,不过就其本质功能来说是相当地简单,用户摁下软键盘上的某个键后,它把这个键所代表的值传递给InputMethodService类也完成了它的使命。InputMethodService在public View onCreateInputView() 方法中获得该View。
InputMethodService就是输入法的核心了,该类是一个Service,跟其它默默无闻的Service不同的是,它是一个带有View的Service。其内部有几个个重要的接口:
InputMethodImpl
InputMethodSessionImpl
InputConnection
InputMethodService通过这几个个类跟系统和输入框进行交互的。
输入框从InputMethodService获取信息是通过InputConnection来实现的, 在启动输入法时,InputConnection由客户端控件创建,并传递给输入法应用,由输入法应用调用,进行信息反馈
InputMethod接口定义了一套操纵输入法应用的方法。如,bindInput, hideInput, startInput等。为了系统安全,这类接口只有系统可以访问,客户端控件无法直接调用这个接口。所有的输入法应用都需要客户端控件具有 BIND_INPUT_METHOD权限,作为系统的安全机制,否则将无法与输入法服务交互。
InputMethodSession作为InputMethod的辅助接口类,为客户端控件开放了可直接调用的函数接口。包括向输入法应用分发键盘事件,更新光标位置,更新编辑区域内选择的问题信息等。客户端控件通过IIputMethodSession对于输入法应用的交互是单向的,即只能向输入法应用传递信息,无法获取信息
以上几个点是从网上copy过来的,感觉这几点对于理解InputMethodService特别有用。
代码看得太多反而看不清本质,这几个类中最实用的是InputConnection的
public boolean commitText(CharSequence text, int newCursorPosition) 。
通过KeyboardView和CandidateView, InputMethodService类已经获得了想要的内容,然后通过这个方法把值传递给输入框。
按奈不住心中读源代码的郁闷,先来写一个输入法发泄一下:
先来一个CandidateView,设想的布局如下:
这个View中不进行任何自绘制,用android现有的View,两边各一个按钮(Button),用来滚动多个候选词,中间显示候选词(TextView),为了方便CandidateView继承RelativeLayout的内部类,便于加入子控件和控制,setService和 setSuggestions两个方法可以不用,反正是内部类,不过为了配合上面的说明,思量再三还是加上了:
public class helloIme extends InputMethodService {
class CandidateView extends RelativeLayout{
TextView tv; // 中间显示候选词
Button btLeft, btRight; // 左右按钮
helloIme listener; // helloIme 用于返回选中的 候选词下标
List<String> suggestions; // 候选词列表, KeyboardView 不同的键按下后会设置相关的列表
int mSelectedIndex = -1; // 当前 候选词下标
public CandidateView(Context context) {
super(context);
tv = new TextView(context);
tv.setId(1);
RelativeLayout.LayoutParams lpCenter = new RelativeLayout.LayoutParams(200, ViewGroup.LayoutParams.WRAP_CONTENT);
lpCenter.addRule(RelativeLayout.CENTER_IN_PARENT);
addView(tv, lpCenter);
tv.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
listener.pickSuggestionManually(mSelectedIndex);
}
});
btLeft = new Button(context);
btLeft.setText("<");
btLeft.setOnClickListener(new OnClickListener(){
public void onClick(View arg0) {
mSelectedIndex = mSelectedIndex > 0 ? (mSelectedIndex - 1) : 0;
tv.setText(suggestions.get(mSelectedIndex));
}
});
RelativeLayout.LayoutParams lpLeft = new RelativeLayout.LayoutParams(60, ViewGroup.LayoutParams.WRAP_CONTENT);
lpLeft.addRule(RelativeLayout.LEFT_OF, 1);
addView(btLeft, lpLeft);
btRight = new Button(context);
btRight.setText(">");
btRight.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
mSelectedIndex = mSelectedIndex >= suggestions.size() - 1 ? suggestions.size() - 1 : mSelectedIndex + 1;
tv.setText(suggestions.get(mSelectedIndex));
}
});
RelativeLayout.LayoutParams lpRight = new RelativeLayout.LayoutParams(60, ViewGroup.LayoutParams.WRAP_CONTENT);
lpRight.addRule(RelativeLayout.RIGHT_OF, 1);
addView(btRight, lpRight);
}
public void setService(helloIme listener){
this.listener = listener;
}
public void setSuggestions(List<String> suggestions) {
mSelectedIndex = 0;
tv.setText(suggestions.get(mSelectedIndex));
this.suggestions = suggestions;
}
}
上面最重要的是粗体的那两行,View的布局还是花费了很多代码:(
KeyboardView的布局预想如下:
就两个按钮,点if时往输入框中输出if(){}, if(){}else if(){}...,whie时往输入框中输出whie(){},这个类同样是继承于RelativeLayout的内部类:
class KeyboardView extends RelativeLayout{
public KeyboardView(Context context) {
super(context);
Button btIf = new Button(context);
btIf.setText("if");
btIf.setId(1);
RelativeLayout.LayoutParams lpIf = new RelativeLayout.LayoutParams(100, 50);
lpIf.addRule(RelativeLayout.CENTER_HORIZONTAL);
btIf.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
setCandidatesViewShown(true); // 显示 CandidateView
helloIme.this.onKey("if"); // 将点击按钮的值传回给 InputMethodService
}
});
addView(btIf, lpIf);
Button btWhile = new Button(context);
btWhile.setText("while");
RelativeLayout.LayoutParams lpWhile = new RelativeLayout.LayoutParams(100, 50);
lpWhile.addRule(RelativeLayout.BELOW , 1);
lpWhile.addRule(RelativeLayout.ALIGN_LEFT, 1);
btWhile.setOnClickListener(new OnClickListener(){
public void onClick(View v) {
setCandidatesViewShown(true);
helloIme.this.onKey("while");
}
});
addView(btWhile, lpWhile);
}
}
CandidateView默认是不显示的,所以需要调用InputMethodService 的setCandidatesViewShown()方法。
接下来把helloIme的代码贴出来:
public class helloIme extends InputMethodService {
private List<String>suggestionlist; // 当前候选词表
private Hashtable<String, List<String>> data; // 词典数据
private KeyboardView mkeyView;
private CandidateView mCandView;
public void onInitializeInterface() { //InputMethodService在启动时,系统会调用该方法,具体内容下回再表
// 初始化 词典数据
data = new Hashtable<String, List<String>>();
List<String> list = new ArrayList<String>();
list.add("if(){}");
list.add("if(){}else if(){}");
list.add("if(){}else{}");
data.put("if", list);
list = new ArrayList<String>();
list.add("while(){}");
data.put("while", list);
}
public View onCreateInputView() {
mkeyView = new KeyboardView(this);
return mkeyView;
}
public View onCreateCandidatesView() {
mCandView = new CandidateView(this);
mCandView.setService(this);
return mCandView;
}
public void pickSuggestionManually(int mSelectedIndex){
getCurrentInputConnection().commitText(suggestionlist.get(mSelectedIndex), 0); // 往输入框输出内容
setCandidatesViewShown(false); // 隐藏 CandidatesView
}
public void onKey(CharSequence text){
// 根据按下的按钮设置候选词列表
suggestionlist = data.get(text);
mCandView.setSuggestions(suggestionlist);
}
class KeyboardView extends RelativeLayout{
//......
}
class CandidateView extends RelativeLayout{
//......
}
}
代码写完,再来写配置文件,
在res目录下面建立一个新目录xml,然后创建一个method.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- The attributes in this XML file provide configuration information -->
<!-- for the Search Manager. -->
<input-method
xmlns:android="http://schemas.android.com/apk/res/android" />
设置Manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.helloIme"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<service android:name="helloIme"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod"/>
</intent-filter>
<meta-data android:name="android.view.im" android:resource="@xml/method"/>
</service>
</application>
<uses-sdk android:minSdkVersion="5" />
</manifest>
直接运行程序,eclipse输出如下Log:
[2010-08-25 17:16:48 - helloIme]Installing helloIme.apk...
[2010-08-25 17:16:50 - helloIme]Success!
[2010-08-25 17:16:50 - helloIme]\helloIme\bin\helloIme.apk installed on device
[2010-08-25 17:16:50 - helloIme]Done!
嗯,安装成功了!呵呵,革命尚未成功,还需在模拟器上进行设置:
点击settings->Language & keyboard,在下部出现了一个test,右边有个checkbox,选上它。
找一个有输入框的应用,最简单到写短消息的画面,左键长按输入框,会弹出一个输入法选择提示框,点进去就会看到刚才创建的输入法了,点击右边的单选框,oh,my ime,漂亮的hello输入法就展现在面前了:
android果然很强大啊。
评论
3 楼
stonewoodfish
2012-11-01
哥们,太给力了。能发个源码参考下吗,正需要这个,不甚感激。shifeng@coship.com,这时我邮箱,谢谢了
2 楼
wukongwork
2012-08-29
你好,看了你的文章,自己也写了一个(当然是工作需要,呵呵),不过遇到了一个问题,我有一个按键是关闭输入法,就相当于系统输入法的完成,一点完成后输入完毕,
不知道这个方法你用过没requestHideSelf(0);,说是可以关闭,但只是闪了一下,输入法又打开了,真不知道怎么弄了。
你写的KeyboardView是extends RelativeLayout,而系统的KeyboardView中有一个closing()方法,我实在不知道该怎么处理,请教博主
不知道这个方法你用过没requestHideSelf(0);,说是可以关闭,但只是闪了一下,输入法又打开了,真不知道怎么弄了。
你写的KeyboardView是extends RelativeLayout,而系统的KeyboardView中有一个closing()方法,我实在不知道该怎么处理,请教博主
1 楼
xihuan&java
2011-05-27
楼主请问怎么实现不同输入框,设置使用相应的默认输入法
发表评论
-
深入理解Android的密度独立性
2013-06-17 10:24 1811前言 安卓是一个只 ... -
滑动操作的维度研究
2013-06-13 10:44 1153提示:这篇文章 ... -
移动开发高价值资料参考[持续更新中]
2013-06-13 09:56 1503做人要厚道转载请注明出处:http://zhangkun71 ... -
手机产品设计之用户引导
2013-06-10 20:21 1379在手机产品的设计过程中,由于手机界面 ... -
Android 设计的几处硬伤
2013-06-08 11:31 1536[核心提示] 一些 Andro ... -
Android开发大牛们的博客[持续更新中]
2013-05-31 08:40 27做人要厚道转载请注明出处:http://zhangk ... -
LocalActivityManager的内部机制详解
2013-05-27 15:56 5127LocalActivityManager的内部 ... -
App调试内存泄露之Cursor深入研究
2013-05-24 15:20 0最近在工作中处 ... -
Android设计模式系列(6)--SDK源码之享元模式
2013-05-24 13:12 886享元模式,给我的感 ... -
Android设计模式系列(5)--SDK源码之备忘录模式
2013-05-24 11:15 1045定义(源于GoF《设计模式》):在不破坏封闭的前提下,捕获 ... -
Android设计模式系列(4)--SDK源码之模板方法模式
2013-05-24 10:39 858模板方法,和单例模 ... -
Android设计模式系列(3)--SDK源码之单例模式
2013-05-24 09:43 975单例模式,可以说是GOF的23种设计模式中最简单的一个。这 ... -
Android设计模式系列(2)--SDK源码之观察者模式
2013-05-23 17:41 1275观察者模式,是一种非常常见的设计模式,在很多系统中随处可见 ... -
Android设计模式系列(1)--SDK源码之组合模式
2013-05-23 17:12 840Android中对组合模式的应用,可谓是泛滥成粥,随处可见, ... -
Android设计模式系列(0)--开篇
2013-05-23 17:11 1170有时候,最难的是坚持;有时候缺少的是信念。 看了很多 ... -
Android Design与Holo Theme详解
2013-05-22 14:06 1503在 国内,有个很有意思的现状。一方面,几个国内最大的公司/企 ... -
GitHub上最火的Android开源项目(完结篇)
2013-05-22 09:22 7643摘要:截至目前,在GitHub“最受欢迎的开源项目”系列文 ... -
二十六个月Android学习工作总结
2013-05-21 16:52 2370本文转自http://www.cnblog ... -
Android中的Layout_weight终极研究
2013-05-17 14:08 3922以前在做UI布局时,也经常用Layout_weight属性 ... -
谷歌I/O大会给开发者带来福音:推出最新Android Studio开发工具
2013-05-17 08:59 1347摘要:在Android Studio发布之后,无论国内外, ...
相关推荐
Android之输入法开发简单说明.pdf
Android之输入法开发简单说明[参照].pdf
Android自定义输入法软键盘,博客地址: https://blog.csdn.net/DeMonliuhui/article/details/84589936
android4.0 输入法源码,谷歌自带输入法
安卓(Android)系统本身的确没有原生的日文输入法,但是谷歌公司在安卓SDK中包含了日本omronsoft软件公司的开源输入法OpenWnn。OpenWnn是omronsoft公司的手机输入法iWnn IME的精简开源版本。OpenWnn在官方各个版本...
开发环境:android studio Chipmunk 2021.2.1版本 内容概要:谷歌拼音输入法,支持中英文切换。C++代码,cmake编译通过,整个工程可以编译成一个输入法apk,安装后需要在设置里添加此输入法,再选择使用即可。 适合...
输入法的操作:点击非文本框的区域,输入法则隐藏。
Android IMF输入法总结 研究输入法的文档
ANDROID搜狗输入法客户端 ANDROID搜狗输入法客户端 ANDROID搜狗输入法客户端
前一段时间需要开发一个Android上的输入法,收集了一些源码,仅供参考
android输入法android输入法android输入法android输入法
Android 类似搜狗输入法android源码.zip
android控制输入法是否隐藏,该demo解决了一些bug,如进入activity就自动弹出输入法或者自定义输入法,可以把该demo用在项目中去
android车牌号输入法(完美版)android车牌号输入法(完美版)android车牌号输入法(完美版)android车牌号输入法(完美版)
实现Android26键简单输入法,可以实现英文的输入和中文的词组的输入,只实现了26键,没法转换到九宫格!大家可以拿去学习学习
Android 谷歌输入法1.1.5Android 谷歌输入法1.1.5
android 讯飞输入法 支持语音手写功能
android输入法 emoji 输入法 键盘 软键盘
android7.1.2内置搜狐输入法,包括SogouInput.apk和Android.mk 将压缩包解压,并将其中的apk解压,然后上传到android_source/packages/apps/