- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我尝试使用 input.setImeOptions(EditorInfo.IME_ACTION_DONE) 设置软键盘上的“完成”按钮;
但“完成”按钮根本不显示在软键盘上。
有什么建议吗?
public void modif(int position) {
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle("Modifica");
EditText input = new EditText(MainActivity.this);
input.setImeOptions(EditorInfo.IME_ACTION_DONE);
alert.setView(input);
final Editable value = input.getText();
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
Toast.makeText(getApplicationContext(), value, Toast.LENGTH_LONG).show();
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Canceled.
}
});
alert.show();
}
最佳答案
这可能是因为您的输入字段不是单行的。
尝试添加
input.setSingleLine();
您会看到按下键盘的操作键实际上会执行“完成”操作(即关闭键盘)
见 http://developer.android.com/reference/android/view/inputmethod/EditorInfo.html#IME_ACTION_DONE
关于android - setImeOptions : why the "Done" button does not show on the soft keyboard?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13561808/
我正在编写一个 google 内容脚本,我的程序需要对服务器进行大约 30 个 AJAX 调用。我将 JQuery 的 .when 函数与 .apply 结合使用,将数组传递给 .when 函数。我也
编辑 - 请查看底部的注释,了解为什么我不认为这是一个重复的问题 使用 jquery 3.2.1 和 Bootstrap 3.3.7 我的部分应用程序具有以下流程: 用户单击 ID 为 #notifi
请解释 done() 方法和作为参数传递给函数的 done 关键字之间的区别? it("qwerty",function(done){ ------ ------ done(); });
我有一个 EditText,我想听听用户是否按下键盘上的“完成”按钮,我还想在用户没有按下软键盘上的“完成”按钮时清除 EditText,我该怎么做? 最佳答案 要检查用户是否按下了软键盘的“完成”按
我正在使用https://api.jquery.com/jquery.when/中描述的方法进行一系列 ajax 调用。 (基于该页面中的示例 $.when( $.ajax( "/page1.php"
我正在学习 bash,我在互联网上找到了一个教程,说它们是相同的: while read -r line; do ... done foo=$line # assume $line
Mozilla 的 JavaScript 文档的 Promises(参见 API page)和 jQuery 的 Promises(参见 API page)之间有什么区别? Mozilla 的prom
首先我想说我是 jQuery 新手,我怀疑我只是做了一些愚蠢的事情,所以希望这对某人来说会很简单。 我正在尝试向我的网站添加滑动移动子菜单。我想要一种 Accordion 效果,如果我单击一个父链接,
我的 JavaScript 函数之一出现问题。在我的网页中,我有多个 $.ajax 调用,后跟 .done() ,它们似乎都有效,除了一个。有人能发现错误吗? me.AcquireProject =
C 中是否有语法让编译器知道某个变量已完成并且此后将不再使用,从而可能释放寄存器?我宁愿不使用函数调用,因为它们很昂贵。 我知道我可以重用一个变量,但这会导致歧义(这个变量是什么意思?)。 例子: f
这个问题已经有答案了: How do you work with an array of jQuery Deferreds? [duplicate] (4 个回答) 已关闭 6 年前。 我有一个这样的
C 中是否有语法让编译器知道某个变量已完成并且此后将不再使用,从而可能释放寄存器?我宁愿不使用函数调用,因为它们很昂贵。 我知道我可以重用一个变量,但这会导致歧义(这个变量是什么意思?)。 例子: f
假设任何时候在registerChan上最多有两个元素(工作人员地址)。然后由于某种原因,以下代码不会在最后两个goroutines中调用wg.Done()。 func schedule(jobNam
$(document).ready(function(){ $('.msg-buttons :button').on("click",function(event) { var
我试图在请求完成后隐藏 ajax 加载器,但是 done() 回调在 blur() 事件之后、在提出请求。我让 Controller Action 休眠 5 秒钟,以确保情况确实如此,事实确实如此。我
我在使用 jQuery 时遇到 $.when().done() 函数的一些问题。有人可以帮忙吗?当我有 ajax 调用和非 ajax 调用方法时,即使我使用 $.when().done() 也会调用非
我有一个小脚本,它使用函数 getJSON 将 json 字符串保存到 var。之后我想用内容创建一些 div。 为此,我为猫(类别)创建了一个 each。在第二个中,当 repo 适合猫时,它也应该
以下代码有一个错误的语法错误。可能是因为我正在使用“for”之类的东西。 $.when( for (var i=0; i < 5; i++) { $.getScript( "'
我在 javascript (jquery) 中有这段代码 function getTopLevelId(gender) { var catId = $.ajax({
在我的代码中,除了 DONE 之外,所有的键都可以正常工作,所以告诉我关于 DONE 键的建议。我的代码如下: 我的mainActivity代码如下 package nl.fampennings.ke
我是一名优秀的程序员,十分优秀!