android-softkeyboard

How to have the soft keyboard cover a view, yet cause other views to take the available space?

时间秒杀一切 提交于 2019-12-23 22:26:11
问题 Background Suppose I have a view that works as the background (MapFragment in my case), and some other views that are the content of the activity. The problem Focusing an EditText, it shows the soft keyboard, causing all views to change their sizes, including the background view. This means that showing the soft keyboard causes the background to "jump" and re-layout itself. This is especially problematic in my case, as I use MapFragment as the background. That's because I can think of a

How to change the key label size of a custom keyboard in android

回眸只為那壹抹淺笑 提交于 2019-12-23 20:25:07
问题 I want to change the size of the keyboard label in my custom keyboard. The code I am using is like this, <Keyboard android:keyWidth="%10p" android:keyHeight="50px" android:horizontalGap="2px" android:verticalGap="2px" > <Row android:keyWidth="32px" > <Key android:keyLabel="A" /> ... </Row> ... So the issue is, if we take the code above the letter 'A'(label) is too small in my keyboard. In KeyBoard class I can't find any xml attribute to change the visible size of the key label. How to change

Issue with EditText in Listview softkeyboard

天大地大妈咪最大 提交于 2019-12-23 19:21:49
问题 I have a Listview with row layout contains two textviews and a edittext In my activity i use android:windowSoftInputMode="adjustResize|stateHidden" and in edittext arguments are: <EditText android:id="@+id/et_quantity_test" android:layout_width="0dp" android:layout_weight="2" android:layout_height="wrap_content" android:inputType="numberSigned" android:gravity="center_vertical|left" android:layout_gravity="center_vertical|left" android:paddingLeft="3dp" android:imeOptions="actionNext" android

Hide softkeyboard in single activity - Android

三世轮回 提交于 2019-12-23 05:14:06
问题 I have been searching the 'net for a bit here, I can't seem to stop the SoftKeyboard from appearing when an EditText gets focus, I've tried at least 3 different methods, setting the Input Type to None (think I saw that in the Android Dev Docs), and two different ways inside the onCreate method, they are: getWindow().requestFeature(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); And getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); I know I

HorizontalScrollView with EditText's scrolls when keyboard appear

▼魔方 西西 提交于 2019-12-23 04:58:16
问题 I have successfully created a list (LinearLayout) that contains multiple dynamic elements/rows. It is filled with content received by webservice. One of the elements per row is a HorizontalScrollView that contains a variable amount of EditText fields. That means that all edittexts from all rows (including a header) can scroll with that horizontalScrollView. A Scrollmanager will make sure that all horizontalScrollviews move simultaneously. So it is basically a scrollable column within a list.

Back key or Delete key of Soft Keyboard not working in 4.4 and 5.0?

非 Y 不嫁゛ 提交于 2019-12-23 04:35:44
问题 I am facing the issue of back key or del key which is not working in 4.4 and 5.0.1 devices ? When I press the back key of softkeyboard below method is not calling. Username.setOnKeyListener(controller); Password.setOnKeyListener(controller); @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if(event.getAction() == KeyEvent.KEYCODE_DEL){ getActivity().setDisableLoginButton(); } return false; } Anyone suggest me what should I do ? I am disabling the button if there's no

adjustPan and adjustResize in nested fragment

爱⌒轻易说出口 提交于 2019-12-23 02:25:24
问题 I use a ViewPager and inside the first fragment of the ViewPager I have a another fragment that is parenting a sub fragment with ScrollView in it. to make it more visual: ┌------------┐ | 1 | 1 is the ViewPager fragment | ┌---------┐| | | 2 || 2 is the fragment inside ViewPager fragment | |┌-------┐|| | ||3 ||| 3 is the sub fragment containing the ScrollView with EditText form | ||form ||| | ||here ||| | || ||| | |└-------┘|| | └---------┘| └------------┘ Issue is: when I use adjustResize it

Setting keyPreviewLayout for android virtual keyboard is causing a crash

僤鯓⒐⒋嵵緔 提交于 2019-12-23 00:53:29
问题 I have a custom virtual keyboard in android which appears when a button is clicked. If i set a keyPreviewLayout with the statement android:keyPreviewLayout="@layout/mykeypreviewlayout" and include some layout statements in res/layout/mykeypreviewlayout.xml at runtime, when a key on the custom soft keyboard is touched, the app crashes. Here are the code snippets: The following is from the main xml file. <LinearLayout android:layout_height="wrap_content" android:layout_gravity="bottom" android

Setting keyPreviewLayout for android virtual keyboard is causing a crash

天涯浪子 提交于 2019-12-23 00:53:16
问题 I have a custom virtual keyboard in android which appears when a button is clicked. If i set a keyPreviewLayout with the statement android:keyPreviewLayout="@layout/mykeypreviewlayout" and include some layout statements in res/layout/mykeypreviewlayout.xml at runtime, when a key on the custom soft keyboard is touched, the app crashes. Here are the code snippets: The following is from the main xml file. <LinearLayout android:layout_height="wrap_content" android:layout_gravity="bottom" android

Detecting Soft Keyboard Hidden State

纵饮孤独 提交于 2019-12-22 12:53:58
问题 Want to Toast a text everytime when soft keyboard state changes from shown to hidden. Here I just want to getText() from EditText and everytime I click on EditText the soft Keyboard must open and after pressing back or return the text must be shown as Toast Thanks in Advance 回答1: There is no direct listener for keyboard state detection so you need some programatic implementation as below private boolean wasKeyboardOpen = false; try { activityMainView.getViewTreeObserver()