我需要制作类似 spinner 或 dropdown 的列表,但是能够在列表中没有正确的值时手动输入值。
我正在尝试找到微调器的某些属性,但似乎没人适合。 kv语言有可能吗?
答案 0 :(得分:1)
这是使用try {
keyStore.load(null);
SecretKey key = (SecretKey) keyStore.getKey(KEY_NAME,
null);
cipher.init(Cipher.ENCRYPT_MODE, key);
//Return true if the cipher has been initialized successfully//
return true;
} catch (KeyPermanentlyInvalidatedException e) {
//Return false if cipher initialization failed//
return false;
} catch (KeyStoreException | CertificateException
| UnrecoverableKeyException | IOException
| NoSuchAlgorithmException | InvalidKeyException e) {
throw new RuntimeException("Failed to init Cipher", e);
}
小部件的基本实现。
DropDown
在做任何事情之前:
显示下拉列表:
输入一些自定义单词并提交:
再次显示DropDown: