Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display keyboard without text input in react native iOS

I want to keep the keyboard displayed at the bottom by default without using a text input which the user needs to tap.

I need to keep the keyboard at the bottom at all times.

Then I need to listen to the events of the keyboard.

How can I do this?

like image 212
Emre Kenci Avatar asked Apr 18 '16 19:04

Emre Kenci


People also ask

How do I disable text input in react native?

To disable options on React Native TextInput, we can set the editable and selectTextOnFocus props to false . to set them both to false . Then we won't see any popup options displayed when we focus on the text input. editable set to false disables typing in the input.

How do you Unfocus a keyboard in react native?

To unfocus a TextInput in React Native, we can use the Keyboard. dismiss method. to set the onSubmitEditing prop to Keyboard. dismiss .

How do you dismiss a keyboard in modal react native?

Method 1: Using TouchableWithoutFeedback Component: We simply encapsulate the outermost View component of our App inside the TouchableWithoutFeedback component and set the onPress value of this component to Keyboard. dismiss.


1 Answers

The workaround I implemented was adding an invisible text box somewhere on the screen and then set it as focused manually.

like image 175
Emre Kenci Avatar answered Sep 22 '22 02:09

Emre Kenci