I'm writing an app for Android 2.3.3 and all of a sudden the emulator no longer takes responses from my physical keyboard. It also refuses to backspace or type numbers with the soft/emu keyboard. It was working fine for the last few hours then all of a sudden... Poof!
I've tried deleting and recreating my emulator, restarting Eclipse, etc. Nothing seems to work and being able to type numbers is crucial to finishing my app. This is what I've been typing in:
<EditText
android:id="#+id/url"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:singleLine="true"
android:hint="#string/stream_url" />
Possible fix: just try to restart your computer. I've had this happen to me before. See what happens. If that doesn't help, try to create a new app with just a single text input and see if you can now type. Also, try to change the text input keyboard by long clicking the editText and changing the input.
Related
My Android emulator crashes whenever I press keys on the pc keyboard or hit the emulator side buttons. the only part that works is the emulator mobile screen. This doesn't happen to just one device but to all emulators I use. This is really annoying cause whenever I press any key on the keyboard while the emulator screen is active it will instantly crash. But keystrokes won't crush it when text input is active on the emulator screen. The operating system I use is ubuntu but Windows fix is also useful.
I need help from someone who has managed to solve this problem before.
I'm pretty sure I got this error before too. Whenever I pressed a button, the emulator would just say "Saving State..." and just closes. The only solution I found to fix this was to delete the emulator and create a new one. It's not the most effective solution, but I couldn't find any other solutions.
I have been using the physical keyboard on the Android Emulator for a while, but now something is wrong and I get strange symbols when I press any character; it does not matter which keyboard (en/es/fr) is displayed on the screen. Does anyone know why this is happening?
For mac
Move your cursor to end.
Use Option + Shft + Left arrow key to select whole text.
Press backspace to delete it and it will automatically switch back to normal english characters.
Try using this shift+alt+o. This helped me solve the issue.
Cold starting the emulator fixed things for me.
At the end, I uninstalled and installed the emulator again, and now it works fine. I think that should be there another solution, but so far it's the only thing that keep the keyboard working normally.
I was using the accepted answer but using a special shortcut every time was getting annoying. So I poked around a bit and found the permanent solution. Go to the settings on the android emulator keyboard. (You can long press the , character on the Gboard.) Once there, go to Advanced and disable Emoji with the physical keyboard. Cold boot and you should be good to go.
Another solution would be to disable the soft keyboard from bottom down icon.
I start my login activity and I use in Espresso test:
onView(withId(R.id.username)).perform(typeText("USERNAME"));
I expect the text in the field to be "USERNAME", but sometimes I get "SERNAME", others "UERNAME".
Most of the times it works but sometimes it fails, specially after rebooting the phone.
Here is the sample code to reproduce the bug:
https://github.com/neoranga55/CleanGUITestArchitecture
The test phone uses Swift keyboard with double language typing enabled. Apparently this causes the first appearance of the keyboard after phone boot to be slow but also auto-correct in a weird way the first letters of a word typed by Espresso.
Solution: always use default system keyboard on testing device/emulator and make sure a software keyboard is enabled to avoid this other issue.
You can also try replaceText(). It should not be affected by the slow IME:
onView(withId(R.id.username)).perform(replaceText("USERNAME"));
I'm new to Android development. For that reason, I apologize if this is a dumb question. I have honestly tried to figure this out and read a number of related questions without any success.
I have a basic app running in . From the screenshot, you can see how the keyboard focused on numbers displays. I just want to show the basic qwerty-esque keyboard. For the life of me, I can't figure out how to do it. Currently, I've set the imeOption to normal thinking that would do it. I also tried setting the inputType to 'normal' without any luck. Here's the relevant pieces of my Android Layout file.
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:imeOptions="normal"
android:inputType="text"
...
/>
What am I doing wrong? How do I show the basic qwerty-style keyboard in Android? Thank you!
As TanjaV said, this keyboard is for devices with a physical keyboard where the avd will not change it regardless of your input type.
Change your AVD devices to something such as Nexus4, or Nexus One (if you want older model), then you should see the keyboard changing.
I have tried
android:inputType="textFilter"
android:inputType="textNoSuggestions"
x.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
android:inputType="textVisiblePassword"
I can see there are a lot of things to try
Android programmatically disable autocomplete/autosuggest for EditText in emulator
Is there any method that works on all devices? For instance those commands above don't work on my device, yet work for other people.
x.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
This works, even though the xml version does not. Probably won't work on all device I install it on. Weird issue.