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. Any graphing frameworks/APIs available?

With android removing the Swing and AWT libraries from Java, I was
wondering what solutions have been developed to display simple bar
histograms, line graphs and other simple data visualizations charts in
Android?  Have any graphing libraries adapted or developed to make
simple line, bar and histograms for the community?

I've seen some solutions bandied about having people "just pull down a
google chart with a HTTP get" which seems like a fine workaround.
However, our eventual expected application usage is in a poor
connectivity situation where network usage is expensive (unlocked
phones in resource poor settings).


2. Post Bitmap over Http


I need to send a bitmap to a server. I've written some code, however,
I got stuck on the part where I need to transform my bitmap into byte
[]. Here is my code:

public void updateBitmap(Bitmap bm){
                URL url = null;
                HttpURLConnection conn = null;
                try {
                        url = new URL("http://www.myurl.com?");
                } catch (MalformedURLException e) {
                try {
                        conn = (HttpURLConnection) url.openConnection
                } catch (IOException e) {
                try {
                } catch (ProtocolException e) {
                conn.addRequestProperty("user_id", user.getUsername
                conn.addRequestProperty("pass", user.getPassword());
                conn.addRequestProperty("id", pinId);

               OutputStream os = null;
                try {
                        os = conn.getOutputStream();
                } catch (IOException e) {

                // Encode bitmap and flush the os


Could you advice me on how to complete my code? Thank you.

3. WebView loadUrl using Post Method

4. Problem adding open AP to preferred ap-list.

5. How to register a ContentProvider

6. Error using graphics in XML-Based UI

7. Requests: doc/FAQ fix & addition to SDK samples