1

This is a question re the android SIP (that's what we call it on WP7). Please see the clip at https://dl.dropbox.com/u/39662979/AndroidEmulator.png.

This is a demo app in the commonsware book on android development. It displays textboxes for longitude and latitude and shows a keyboard allowing the digits 0 - 9. * and # to be entered. Of course longitude often requires a negative number but how does one type the minus sign?? I've tried all of the other keys - I'm able to bring up other character sets but no minus sign.

The book shows a minus sign being entered but eluding me. thanks, Dean

Dean Blakely
  • 3,535
  • 11
  • 51
  • 83
  • StackOverflow is for programming questions. This is not really a programming question. With the US keyboard, you get a minus sign when you use `numberSigned` on an `EditText`. I do not recognize your keyboard and so cannot tell you if you can get to the minus sign on it or not. – CommonsWare Jul 27 '12 at 22:48
  • Doesn't the android:inputType="numberDecimal|numberSigned" entry for the edit field determine what SIP is displayed? should not a SIP with a minus sign show? Dean – Dean Blakely Jul 27 '12 at 23:30
  • "Doesn't the android:inputType... entry for the edit field determine what SIP is displayed?" -- it is what you request. It is up to the implementer of the input method editor to determine how to handle the request. Some input method editors have no keys (e.g., Graffiti), for example. As I do not speak Japanese, Chinese, or whatever the language is that your device or emulator is set up for, I cannot tell you whether or not there is a key on that keyboard that makes a number become negative. And, in most of the tech world, SIP is a VOIP protocol, having nothing much to do with keyboards. – CommonsWare Jul 27 '12 at 23:35
  • Sorry, this isn't making sense. I'm running the commonsware activities/launch program from the book - unmodified in the emulator. it's flashing up a keyboard where it is impossible to enter a minus sign in either field. That means the program is not working correctly. I think it should work correctly. Where am I doing wrong here? – Dean Blakely Jul 28 '12 at 00:19
  • @user1058647 - You haven't done anything wrong here. It is a pretty common problem with the android emulator that it has the "IME" keyboard configured out of the box. This is frustrating. Check out this [Link](http://stackoverflow.com/questions/2268239/why-is-my-android-emulator-keyboard-in-chinese-character-mode). It should show you how to fix the emulator. Now on to your more pressing question. There may not be an minus sign. You can't always rely on the "numberDecimal|numberSigned" that was mentioned. I have that on a production app. The Samsung Galaxy S3 keyboard doesn't have minus – Michael Stoner Aug 31 '12 at 14:41

3 Answers3

3

Had a similar issue on my Galaxy S3: The numeric keypad of the stock Samsung keyboard shows the digits 0 thru 9 plus one more key with a period and a minus sign combined: .- Took me quite a while to find that the minus sign requires a double tap, not a long press.

Markus
  • 191
  • 1
  • 7
0

It may be that your keyboard doesn't have the "-" due to your language setting. I'd recommend adding another keyboard (probably the US keyboard) via device Settings and switching to the US keyboard while you're testing.

Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
  • p.s. you can post your screenshot as a part of your question. I'd recommend editing your question and adding the screenshot. – Kyle Clegg Jul 27 '12 at 23:24
0

That means the program is not working correctly

If you run the application on a device or emulator that is configured for English, there is a key, marked with what in English is referred to as a "minus sign" (upper-right button on keypad), that can negate the number typed into the EditText:

enter image description here

You will notice that, in your screenshot, the keyboard is different:

enter image description here

In part, this is because your emulator is not configured for English. It is configured for some other language. You can tell this because some of the keys have Chinese, Japanese, or some similar character set on them.

I do not know precisely what language your device or emulator is configured for. I do not know if one of those keys either is a negation, or leads to a secondary keyboard that offers negation. My guess is that the key in the lower left corner would switch to alternate keysets, but that is just a guess.

My recommendation would be for you to configure your emulator to be for a language that you speak. Then, perhaps the keyboard will be more intelligible to you.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491