android-keypad

New to kernel development: “Virtual” input driver in kernel?

别来无恙 提交于 2019-12-09 14:05:30
问题 I'm doing some edits to an input device driver in an android kernel. This device has a limited range of keybits and evbits enabled. What I want to do is to create a new /dev/input event node that is not related to any physical device, with more keybits and evbits enabled, so that I can send real input signals from the physical driver to the userspace, in the userspace I listen to them and when received I can inject input events to the "virtual" driver writing to its event node. Does linux

Is there a way in Android to tell if a users device has an actual keyboard or not?

别来无恙 提交于 2019-12-09 13:13:43
问题 I would like to detect if the current users phone has a hardware keyboard or only a on-screen keyboard. Is this possible with the SDK? 回答1: Yes, you can . Fetch the Configuration object using Configuration config = getResources().getConfiguration(); ...and then look at the keyboard field. If they value of keyboard is not KEYBOARD_NOKEYS, the user has a hardware keyboard. Note that as @Carl says in his comment below, the user may attach a USB keyboard at any point while your app is running,

Adjust scrollview when keyboard is up

和自甴很熟 提交于 2019-12-09 02:30:48
问题 I have an activity with a form in it. Because the form is quite long, I've used a scrollview. The problem is that the scrollview doesn't change when the keyboard is up. The keyboard overlaps the last part of the scrollview. How can I make sure that the keyboard is below the scrollview and the scrollview is adjusted to fit the space above it? In the meanwhile, is there a way to make sure the buttons ‘previous’ and ‘next’ are in the keyboard as well? 回答1: In the application's manifest file, add

Handling Soft Keyboard Navigation Arrows

瘦欲@ 提交于 2019-12-07 19:56:04
问题 Here i am using ViewPager for Fragments, i used custom view pager for controlling navigation. here is the class, public class NonSwipeableViewPager extends ViewPager { public NonSwipeableViewPager(Context context) { super(context); setMyScroller(); } public NonSwipeableViewPager(Context context, AttributeSet attrs) { super(context, attrs); setMyScroller(); } @Override public boolean onInterceptTouchEvent(MotionEvent event) { // Never allow swiping to switch between pages return false; }

Is there a way to launch voice input on the softkeyboard programatically?

社会主义新天地 提交于 2019-12-07 16:10:18
问题 The idea is to take a user voice input on the press of a button and pass it to the search inside the app. Because of device limitations we are using the SearchViewCompat instead of the useful SearchView. I have been able to grab the voice output using this link, but there is not a simple way to pass the text to the search bar this way. The search view itself shows as a view (so no setText()), but if I can just say "use mic key on keyboard" or something as soon as the searchbar comes up, I

Hide keyboard when a search is submitted or a search suggestion is chosen

半城伤御伤魂 提交于 2019-12-07 04:48:33
问题 I have a action bar search widget that offers search suggestion too. When the user types in a query and submits it or chooses a search suggestion, the keyboard doesn't disappear. How can I resolve this issue? I haven't been able to figure out how to hide the keyboard upon search submit or suggestion choose. Thank you. 回答1: To hide the input method editor, use InputMethodManager : InputMethodManager imm= (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v

Android edittext is underlined when typing

耗尽温柔 提交于 2019-12-07 03:34:13
问题 I need to removed underline when type in edit text field in Android. For the first name edit text first letter should be capital so that I have given textCapSentences , but in my case I see underline in edittext fields. how to remove that? I have tried all the combination of textFilter|textNoSuggestions|textCapSentences its my first name edit text: <EditText android:id="@+id/signup_lname" android:layout_width="match_parent" android:layout_height="60dp" android:background="@color/signup_layer

Keyboard issue while focusing on bottom edit text in Android

旧时模样 提交于 2019-12-06 19:36:37
问题 I am working on an android Application where I am willing to get input from user. I created a layout for it which has a scroll view as a root view & Relative layout as it's child all the other layout are inside this Relative layout. But when edit text is at the bottom of screen & user click on it to bring keyboard it shows some blank box between edit text & keyboard & after this if user enters any word it doesn't get displayed in edit text. But if Edit text is above nearly more then half size

Android custom keyboard with 2 lablels (main and small at the top right)

筅森魡賤 提交于 2019-12-06 10:51:08
问题 I am implementing my own custom keyboard. I use this tutorial for implementing keyboard <?xml version="1.0" encoding="utf-8"?> <Row> <Key android:keyLabel="q" android:keyEdgeFlags="left"/> <Key android:keyLabel="w"/> <Key android:keyLabel="e"/> <Key android:keyLabel="r"/> <Key android:keyLabel="t"/> <Key android:keyLabel="y"/> <Key android:keyLabel="u"/> <Key android:keyLabel="i"/> <Key android:keyLabel="o"/> <Key android:keyLabel="p" android:keyEdgeFlags="right"/> </Row> I want have 2 label

Android - Unexpected Behavior of Keypad - EditText in ListView

无人久伴 提交于 2019-12-06 08:22:42
问题 I am stuck with problem since last two days i.e. i have created ListView with Custom View with Variant SubLayout like: Problems: When i click on EditText of Qty , its displaying Soft Input Keyboard with Numeric Keypad and immediately focus lost from edittext with change of alphabetic keypad. (First ScreenShot Below) on Second time focus of EditText its works fine and taking numeric values but while scrolling its change keypad from numeric to alphabetic. (Second ScreenShot Below) Actually i