What's best way to resume activity and play audio file after spawned thread completes download?

by Philip » Fri, 15 Jan 2010 07:10:48 GMT


Sponsored Links
 Why don't you simply use thread join wait and notify? Curious...




> solve this would be very much appreciated.



Other Threads

1. transparent textures...

Hi all
I am using opengl for drawing 3d stuff, but so far I've been unable to
use transparent textures...


this is what I do... does anybody knows what I am missing?
Thanks a lot!

void initGL()
{

         gl.glEnable(GL10.GL_CULL_FACE);
         gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
         gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
         gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
         gl.glEnable(GL10.GL_TEXTURE_2D);
         gl.glDisable(GL10.GL_DITHER);
         gl.glMatrixMode(GL10.GL_PROJECTION);
         gl.glLoadIdentity();
         gl.glFrustumf(-ratio, ratio, -1, 1 , 1, 50);

         gl.glTexParameterx(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_LINEAR);
         gl.glTexParameterx(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);

         gl.glFrontFace(GL10.GL_CCW);
         gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);

}

void drawGL()
{
                gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, width, 
height,
0, GL10.GL_RGBA,GL10.GL_UNSIGNED_BYTE, mPixelsBuffer);
                gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer);
                gl.glTexCoordPointer(2, GL10.GL_FIXED, 0, mTexBuffer);
                gl.glDrawElements(GL10.GL_TRIANGLES, nIndex*3,
GL10.GL_UNSIGNED_SHORT, mIndexBuffer);
}
--~--~---------~--~----~------------~-------~--~----~

2. Please help me in defining the style of my widget in my theme.

Hi,

I am tying to define the style of MyWidget in my theme.

I create a widget myself called 'MyWidget' and I want to define the
style of MyWidget in my theme.


And I have added this in my manifest file:

 <application android:label="@string/app_name" android:theme="@style/MyTheme">

This in my themes.xml file:
<resources>
  <style name="MyTheme">
   <item name="buttonStyleMyWidget">@style/MyWidget</item>
   </style>
</resources>

and this in my styles.xml file:

<?xml version="1.0" encoding="utf-8"?>
<resources>
     <style name="MyWidget">
       <item name="android:background">@drawable/btn_mywidget_bg</item>
</style>
</resources>

But android did not pick up the style of 'MyWidget' unless I
specifically put 'style='@style/MyWidget'

In other words, in my main.xml, if i specified my 'style' attribute,
my background
drawable was displayed correctly.
 <test.MyWidget android:id="@+id/mywidget" style="@style/MyWidget" />

but if I just do this:
<test.MyWidget android:id="@+id/mywidget" /> , the background drawable
is not display correctly.

Can you please tell me what am I missing?

Thank you.

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

3. How to use android:pathPattern attribute in intent filters?

4. Need some help at testing an Android game

5. seek operation during multimedia playback - opencore

6. Is there a way to make the MediaPlayer non-blocking

7. Question about defining selector drawable