08-31-2009, 10:18 AM
Join Date: Aug 2009
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | Custom Control Height Problem
Please Login to Remove!
I have a custom control that extends Field.
I initialize it with the calculated width and height for the place it should be using the following code:
SeparatorField sf = new SeparatorField();
int top = sf.getTop() + sf.getHeight();
int ctrlHeight = this.getContentRect().height - top;
this.myCtrl = new MyListField (ctrlWidth, ctrlHeight);
In the control itself I have
protected void layout(int width, int height)
setExtent( this.width, this.height );
The problem is with VirtualKeyboard. When It's shown I can get its height to subtract it from calculation and my control occupies half of the screen. When the keyboard is hidden everything is ok.
I feel like I'm doing something very wrong but I don't have a clue what it is. Please help!