Android EditText without input with external blue keyboard

when testing my application on my tablet (Android 4.1.1 Asus), I find out that my bluetooth keyboard is not supported on my edittext. No input! Using the soft keyboard is not a problem.

This is my layout:

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:layout_width="match_parent" android:id="@+id/txtTuneScript" android:layout_height="match_parent" android:layout_weight="1" android:scrollbars="vertical" /> </LinearLayout> 

Am I missing an attribute for editText? Any ideas? Using another application on the tablet, such as droidEdit, the bluetooth keyboard works great ...

+4
source share
1 answer

I am having a problem with KeyEventListner that returned true.

  ed.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View view, int i, KeyEvent keyEvent) { if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_ENTER || keyEvent.getKeyCode() == KeyEvent.KEYCODE_TAB) { useData(result); finish(); } return true; } }); 

The amazing part is that the virtual keyboard has a working input while it is still processing events.

0
source

All Articles