Open GoogleCodeExporter opened 9 years ago
On which device this is happening? iPhone/iPod 3/4/5, iPad 2/3/4?
Original comment by shai.almog
on 22 Feb 2013 at 1:49
It is happening on an iPod 5G running iOS 6.1. It also happens on an iPod 3G
running iOS 5.1.1.
I was describing behavior on the iPod 5G above. On the 3G it i a little
different. The test app I submitted works normally, however in my real app I
still have the problem. The fact that the test app works could be due to the
smaller screen size, the dialog is moved to make way for the keyboard and moved
back when the keyboard is dismissed. There is no flashing
The 3G screen size is smaller and in my app the dialog is virtually full
screen. When I click outside the input field to dismiss the keyboard the
background goes black. The dialog itself is unchanged but the list which is
normally visible through the dialog has gone. It is now just a black background
and stays that way until I close the dialog, then the list is restored.
Original comment by mwarn...@readerware.com
on 22 Feb 2013 at 3:04
Some more info which might help to track down the black screen problem:
If the edited field is too low on screen then in CodenameOne_GLViewController's
keyboardWillShow starts an animation to scroll viewFrame to fit the field on
screen. And that is the point where you can reproduce - rotate device during
the animation and the screen flashes black for a moment.
Tested with iPhone 4 running iOS 7.
Original comment by jaanus_h...@hotmail.com
on 28 Oct 2013 at 1:22
A solution which helped me to avoid black-flashing when keyboard is dismissed
after editing fields which are so low that frame scrolling is needed.
All I needed to do was to stop frameBuffer drawing while the animation
triggered from keyboard hiding is running.
So I introduced a helper BOOL variable DRAWING_IS_TURNED_OFF in
CodenameOne_GLViewController and checked in EAGLView.m's method
- (BOOL)presentFramebuffer
that the method would not do anything when the DRAWING_IS_TURNED_OFF is true.
That is the current condition becomes:
if (![CodenameOne_GLViewController instance].DRAWING_IS_TURNED_OFF && context) {
And edit the end of the CodenameOne_GLViewController.m's method
- (void)keyboardWillHide:(NSNotification *)n
to this:
//use an extra variable to turn of...
self.DRAWING_IS_TURNED_OFF = YES;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:0.3];
[self.view setFrame:viewFrame];
//and add animation end notification
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
[UIView commitAnimations];
and add a method to turn off the variable at the end of the animation:
- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished
context:(void *)context
{
[CodenameOne_GLViewController instance].DRAWING_IS_TURNED_OFF = NO;
repaintUI();
}
Original comment by jaanus_h...@hotmail.com
on 13 Mar 2014 at 10:15
Original issue reported on code.google.com by
mwarn...@readerware.com
on 22 Feb 2013 at 10:09Attachments: