本文整理汇总了Java中keepass2android.kbbridge.StringForTyping类的典型用法代码示例。如果您正苦于以下问题:Java StringForTyping类的具体用法?Java StringForTyping怎么用?Java StringForTyping使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StringForTyping类属于keepass2android.kbbridge包,在下文中一共展示了StringForTyping类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: commitTextForKey
import keepass2android.kbbridge.StringForTyping; //导入依赖的package包/类
private boolean commitTextForKey(final EditorInfo attribute, String key) {
List<StringForTyping> availableFields = keepass2android.kbbridge.KeyboardData.availableFields;
for (StringForTyping str: availableFields)
{
if (str.key.equals(key))
{
Log.d("KP2AK", "Typing!");
commitKp2aString(str.value, attribute);
return true;
}
}
return false;
}
示例2: findStringForTyping
import keepass2android.kbbridge.StringForTyping; //导入依赖的package包/类
private StringForTyping findStringForTyping(String key) {
for (StringForTyping s: keepass2android.kbbridge.KeyboardData.availableFields)
{
if (key.equals(s.key))
{
return s;
}
}
//found nothing: return empty struct:
return new StringForTyping();
}
示例3: commitStringForTyping
import keepass2android.kbbridge.StringForTyping; //导入依赖的package包/类
private void commitStringForTyping(StringForTyping theItem) {
if ((mKp2aRememberAutoFill) && (!TextUtils.isEmpty(getCurrentInputEditorInfo().hintText)))
{
EditorInfo editorInfo = getCurrentInputEditorInfo();
String key = editorInfo.packageName+"/"+keepass2android.kbbridge.KeyboardData.entryId+"/"+editorInfo.hintText;
SharedPreferences prefs = getApplicationContext().getSharedPreferences(KP2A_SAVED_FIELD_HINTS, MODE_PRIVATE);
Editor edit = prefs.edit();
edit.putString(key, theItem.key);
edit.commit();
}
Log.d("KP2AK", "committing text for " + theItem.key);
commitKp2aString(theItem.value, getCurrentInputEditorInfo());
}