Languages

Menu
Sites
Language
How to show the keypad without edit area or edit field?

Is there a way to show the keypad without showing edit area or edit filed?

I put an edit area(field) offscreen but keypad is also not shown... :(

Edited by: Chris Jin on 26 Nov, 2013

Responses

11 Replies
Alex Ashirov

Hi,

AFAIK, simplest way to do this is to create extremely small EditField as suggested in the topic below:

https://developer.tizen.org/forums/web-application-development/virtual-device-keyboard-api

“I use Tizen::Ui::Controls::EditField with very small Tizen::Graphics::Rectangle(0, 0, 1, 1) on Construct() and then ShowKeypad()/HideKeypad() when required.”

Chris Jin

Thanks Alex,

 

I tried to do that, but the screen is cleared with black color when I show the keypad.

How can I prevent the black screen?

I want to display my contents instead of the edit area at the top area of screen and to show keypad at the bottom of screen.

Alex Ashirov

Do you construct your EditField with INPUT_STYLE_OVERLAY or INPUT_STYLE_FULLSCREEN?

Yes sure, there is sample code in the documentation under  (Tizen::Ui::Controls::Keypad Class Reference )

 

 

Alex Ashirov

Right. This class allows to display the keypad without EditField. But as far as I understand it covers all the screen with its own edit field. Am I wrong? Actually, I didn't use it before.

Yeah, full screen only AFAIK

For Overlay (half screen), you need editfield or editarea .. maybe if you cover the editfield with another UI like EditField -> Label as background image -> then the rest of UI ... it works and shows the overlay keypad when Editfield get selected in coding

 

 

Or maybe you hide the editfield when the keypad will show (keypad listener)

Or Maybe just have hidden editfield and set it selected in coding ...

I have no tried it before but I think it is possible

 

Alex Dem

Hi, all
Here just one more minor suggestion:

You could construct small EditArea and place it on form below (where keypad will overlays EditArea ) and hide EditArea after,
So you could add in OnInitializing():
 pEditarea->Construct(Rectangle(0, 700, 1 , 1),INPUT_STYLE_OVERLAY);
 pEditarea->SetShowState(false);

And show keypad this way:
 pEditarea->SetShowState(true);
 pEditarea->ShowKeypad();
and hide this way:
 pEditarea->SetShowState(false);
 pEditarea->HideKeypad();

You will avoid constant 1x1 EditField in this case. Unfortunatelly if ShowState=false you are unable to use ShowKeyPad/HideKeypad methods for EditArea.
Alexey.

bharath reddy donapaati

You can actually show keypad without any edit filed or edit area. All you have to do is bind to InputMethod instance and call ShowKeyPad() and HideKeyPad() methods when required.

Go through the InputMethod class in the documentation. There also is a sample program which shows keypad when a button has gained focus. In your case you have to handle when to show and hide keypad.

bharath reddy donapaati

Pardon me about the previous comment. Class is InputConnection not InputMethod .
 

Alex Dem

Thank you for info,
here is code which should implement required feature:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/classTizen_1_1Ui_1_1InputConnection.html
Alexey.