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
change.

-- 



Other Threads

1. startActivity(intent) from Tab click works but Intent to class does not

I'm pretty new to android and i'm having an issue with a Tab UI
situation.  I have a "Entry" activity which has a bunch of tabs.  when
a tab is clicked I've configured the setContent to use intents; so the
tabs switch the activities correctly.  The issue is when I start a
specific tab like this:

mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator
(this.getResources().getString(R.string.TAB_1)).setContent(new Intent
(this, Exercise.class)));

The content shows up correctly but the onTouch events do not get
captured.

If I do this (on the tab click) everything works correctly:

final Intent exercise = new Intent(Entry.this, Exercise.class);
Entry.this.startActivity(exercise);

but my tabs at the top are lost....

what am I doing wrong?  I'm sure I've missed something simple.
--~--~---------~--~----~------------~-------~--~----~

2. How to launch ACTION_SENDTO intent with Intent.EXTRA_STREAM parameter

Hi,

My application is able to launch ACTION_SEND_TO with the following code:
Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                                                        "mailto", 
"testem...@gmail.com", null));
startActivity(intent4);

But when try to attach JPEG file with the Intent

        Intent intent4 = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                                                        "mailto", 
"testem...@gmail.com", null));
String mimeType = Bitmap.CompressFormat.JPEG.name();

intent4.setType(mimeType);
                                        
System.out.println (" mTempFile" + mTempFile);
                                        
intent4.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+ mTempFile));

I have checked the file at "file://"+ mTempFile does exist.

But I get this exception:

Caused by: android.content.ActivityNotFoundException: No Activity
found to handle Intent { action=android.intent.action.SENDTO type=JPEG
(has extras) }
E/AndroidRuntime( 1806):        at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1484)
E/AndroidRuntime( 1806):        at
android.app.Instrumentation.execStartActivity(Instrumentation.java:1454)
E/AndroidRuntime( 1806):        at
android.app.Activity.startActivityForResult(Activity.java:2656)
E/AndroidRuntime( 1806):        at
android.app.Activity.startActivity(Activity.java:2700)

--~--~---------~--~----~------------~-------~--~----~

3. does android runs on OMAP5912 board ?

4. Re : Re : Re : Sharing data between an Android service and an application.

5. startActivity(intent) and ActivityNotFoundException

6. Hierarchy Viewer is not working on 1.5 sdk

7. porting android on imx31 platform