Found the reason for blinking views: the top RelativeLayout collided with 
the ActionBar, which is automatically added to the layout since Honeycomb 
and has effect even if it is not visible. Although I do not understand 
what's really going on, I found a way to get rid of the ActionBar, as not 
needed (by googeling of course).
Here is the solution, that makes it disappear and also works for older 
versions of Android that do not support ActionBars.
In the Activity hosting my SurfaceView I modified:

   @Override
   public void onStart(){
       super.onStart();
       if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
           ActionBar actionbar;
           actionbar = getActionBar();
           actionbar.hide();
       }
       ...
}


Am Mittwoch, 8. August 2012 19:19:40 UTC+2 schrieb bbbill:
>
> Hi All,
> on my Android Tab (TF 101g with keyboard dock, Android 4.03) 
> I observe some strange blinking I cannot explane.
> The whole screen is being controlled by a Relative Layout containing 
> another Realive Layout with some view elements on top position, followed by 
> a SurfaceView with a grafic canvas and below that some other views, one of 
> them an EditView for number entry.
> When I run my application on that device being undocked, i.e. without the 
> hard keyboard, and hold it in landscape orientation, first the soft 
> keyboard appears and all view elements get shifted topwards. Then, after I 
> closed down the keyboard,  all view elements return to their original 
> position, *while those within the RelativeLayout above the SurfaceView 
> start blinking continuously*.
> Even Part of the application title and Icon get overwritten in black an 
> reappear on a half second rate.
> When I replugg the device into the keyboard dock, blinking stopps 
> immediately.
> Neither does this occur, when I hold the undocked device in portrait 
> orientation.
> There seems to be a certain dependency on the EditView below the 
> SurfaceView. At least the blinking rate goes down, when this is disabled.
> I have the same application running on a smart phone (Alcatel OT918D, 
> Android 2.3.6) and there is no such issue at all.
> (On the smart phone the EditView is not visible in landscape orientation, 
> because it does not fit within the display. Is this of any importance at 
> all?)
>
> The containing views xml-file is attached.
>
> Any helpful hints gratefully apreciated
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to