开发者

Android:I need a slide in calculator type soft keypad a la iphone

开发者 https://www.devze.com 2023-01-18 09:47 出处:网络
I\'m attempting to replicate on android an iphone app my company had developed externally. My need is simple but it seems hard to achieve under android. I have three numeric edittext inputs. Each sh

I'm attempting to replicate on android an iphone app my company had developed externally.

My need is simple but it seems hard to achieve under android. I have three numeric edittext inputs. Each should take only decimal numeric values. So numbers 0-9 and "." or ",". On the iphone this was achieved by a slide in calculator style keypad with one of the buttons a "GO" button that when pressed hides the keypad and, if all the inputs have valid values triggers a calculation that displays values on the screen.

I've tried the android phone input type and this is very close to what I want but I have no idea how to replicate the go button. I have put a calculate button on the main interface itself but I can't get the keyboard to go again once it is opened.

So can I either

A. Modify the layout of the phone keypad in some way to change one of the buttons to be GO (Calculate) and intercept the keypress or

B. Do I have to create my own keypad in which case how do I go about sliding it in and out over the top of the current view?

thanks开发者_如何转开发 guys


See android:imeActionId and android:imeActionLabel for your GO button.

0

精彩评论

暂无评论...
验证码 换一张
取 消