如果我在我的EditText点击,虚拟键盘简单不显示出来。显示光标,但不键入任何键盘。的EditText的onClick不显示虚拟键盘
我甚至用手动打开,但只是没有工作尝试。
这里是我的代码:
public class CreateNote extends Activity {
EditText titleEdit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.createnote);
titleEdit = (EditText) findViewById(R.id.titleEdit);
titleEdit.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
InputMethodManager imm = (InputMethodManager) CreateNote.this
.getSystemService(Service.INPUT_METHOD_SERVICE);
imm.showSoftInput(titleEdit, 0);
}
});
}
}
片段布局:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#989898" >
<EditText
android:id="@+id/titleEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/edittextdrawale"
android:ems="10"
android:textColor="#fff"
android:textColorHint="#fff" >
<requestFocus />
</EditText>
</FrameLayout>
什么可以玩捉迷藏的原因,寻求我的虚拟键盘? 我在真实设备上测试,而不是在仿真器上测试。