Orientation change and setRender

by qwesthead » Fri, 20 May 2011 15:38:29 GMT

Sponsored Links
 I've a region on an activity that uses GLSurfaceView. When the
Activity is resumed, I call the setRenderer and then the content of
the screen. They work fine. But, the problem arise when I change
orientation (configurationChange.) Upon orientation change, I need to
change the layout. After orientation change, surfaceChanged is getting
called. However, even when I call GLSurfaceview.requestrender,
Renderer.onDrawFrame is not getting called.
What are all the things I need to do when there is an orientation


Other Threads

1. NullPointerException : String imageFileName = myFile.imageFileName.toString(); when imageFileName is null

It couldn't have been working before 1.5. The only way to safely
convert an object to a String without a NullPointerException is to use
a StringBuilder/StringBuffer or use a String concatenation:

String imageFileName = "" + myFile.imageFileName;

Or better yet, explicitly check for null :)

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


2. ContentProvider queries, Contacts and the SDK docs

Hi All,

A couple of questions. First thing I was wondering is where to log
bugs in the docs.
The ContentProvider query() docs are missing selectionArgs in the
example code. It also
uses the deprecated addId instead of ContentUris.withAppendedId().

With regards to the selection options - how exactly can these handle?
I've seen a couple
of places where a something + "='" + somevalue "'" is used, but I'm
specifically wondering
if it can handle IN clauses or if there's some form of or statement I
can use to check for
a variety of values in a particular column rather than just the one.

Last question is about the Contacts PERSON_ID and how long-lived that
is. It is guaranteed
to never change (though may be removed obviously). Well not truly
guaranteed but will only
cycle after it runs out of unused integers. Or may they change value
as contacts are removed?


Alan .

3. NullPointerException : String imageFileName = myFile.imageFileName.toString(); when imageFileName is null

4. Question for SDK developers - behavior of setFeatureInt

5. Issue w/ extending MapActivity and eclipse error saying that it is not extended

6. build-essential on Mandriva virtual machine

7. ALSA proble