#include <akneditstateindicator.h>
struct S_uid: public TUid
{
S_uid(int i)
{
iUid = i;
}
};
TInt GetCurrentIndicatorState()
{
MAknEditingStateIndicator * ei = CAknEnv::Static()->EditingStateIndicator() ;
if (!ei) return -1;
CAknIndicatorContainer *ic = ei->IndicatorContainer();
if (!ic) return -1;
if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorPinyin) ))
{
//拼音输入法
return 2;
}
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorLowerCase)))
{
//小写
return 4;
}
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorUpperCase)))
{
//大写
return 5;
}
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorTextCase)))
{
return 0;
}
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorNumberCase)))
{
//数字
return 3;
}
else if(ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorStroke) ))
{
//笔画
return 1;
}
return -1;
}
获取当前输入框的输入法
最新推荐文章于 2024-07-08 23:14:10 发布