how to show dialog with only the progress image

by Atif Gulzar » Thu, 13 Aug 2009 16:12:48 GMT


Sponsored Links
 create a simple layout xml which has progressbar in it and set the
contetview of dialog to this layout.


--
Best Regards,
Atif Gulzar

I  Unicode, zln 







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



Other Threads

1. prepare() fails when trying to record video

Hi, tried to make a simple camcorder application based on the
VideoCamera in the default apps. My main problem is that the prepare()
call always fail.
I am pretty sure I set all the settings in the MediaRecorder correctly
and in the right order.
..
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
recorder.setOutputFile("/sdcard/video_test.mp4");
..
when surface is created i do:
recorder.setPreviewDisplay(holder.getSurface());
if (recorder != null) {
        try {
                recorder.prepare();
        } catch (IllegalStateException e) {
                Log.e("IllegalStateException", e.toString(), e);
        } catch (IOException e) {
                Log.e("IOException", e.toString(), e);
        }
}

However, the prepare always fail. When I view logcat I see the
following error:
E/MediaRecorder(  222): prepare failed: -2147483648

E/IOException(  223): java.io.IOException: prepare failed.
E/IOException(  223): java.io.IOException: prepare failed.
E/IOException(  223):   at android.media.MediaRecorder._prepare(Native
Method)
E/IOException(  223):   at android.media.MediaRecorder.prepare
(MediaRecorder.java:375)
E/IOException(  223):   at
com.mycompany.CamcorderPreview.surfaceCreated(CamcorderPreview.java:
41)
E/IOException(  223):   at android.view.SurfaceView.updateWindow
(SurfaceView.java:352)
E/IOException(  223):   at android.view.SurfaceView.dispatchDraw
(SurfaceView.java:259)
E/IOException(  223):   at android.view.ViewGroup.drawChild
(ViewGroup.java:1484)
E/IOException(  223):   at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
E/IOException(  223):   at android.view.ViewGroup.drawChild
(ViewGroup.java:1484)
E/IOException(  223):   at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
E/IOException(  223):   at android.view.View.draw(View.java:5841)
E/IOException(  223):   at android.widget.FrameLayout.draw
(FrameLayout.java:352)
E/IOException(  223):   at android.view.ViewGroup.drawChild
(ViewGroup.java:1486)
E/IOException(  223):   at android.view.ViewGroup.dispatchDraw
(ViewGroup.java:1228)
E/IOException(  223):   at android.view.View.draw(View.java:5841)
E/IOException(  223):   at android.widget.FrameLayout.draw
(FrameLayout.java:352)
E/IOException(  223):   at com.android.internal.policy.impl.PhoneWindow
$DecorView.draw(PhoneWindow.java:1847)
E/IOException(  223):   at android.view.ViewRoot.draw(ViewRoot.java:
1217)
E/IOException(  223):   at android.view.ViewRoot.performTraversals
(ViewRoot.java:1030)
E/IOException(  223):   at android.view.ViewRoot.handleMessage
(ViewRoot.java:1482)
E/IOException(  223):   at android.os.Handler.dispatchMessage
(Handler.java:99)
E/IOException(  223):   at android.os.Looper.loop(Looper.java:123)
E/IOException(  223):   at android.app.ActivityThread.main
(ActivityThread.java:3948)
E/IOException(  223):   at java.lang.reflect.Method.invokeNative
(Native Method)
E/IOException(  223):   at java.lang.reflect.Method.invoke(Method.java:
521)
E/IOException(  223):   at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/IOException(  223):   at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:540)
E/IOException(  223):   at dalvik.system.NativeStart.main(Native
Method)

The sdcard/video_test.mp4 file is created in the process but is of
size 0. I tried to see what could be wrong in the native mediarecorder
class but didn't get any wiser.

(Im using a couple of days old cupcake and an ADP1.)

Any ideas appreciated!

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

2. easy stuff please reply

hello guys i am writing the data in text file with help of

 fos = new FileOutputStream(file);
               out1 =new OutputStreamWriter(fos);
               out=new DataOutputStream(fos);
               String Dpass = new String ("1008");

               out.writeChars(Dpass);

but in file due to char it is leaving space after each charactor.so
how should i store so the will be no sapce.


also which api should i used to delete containt of the file?

thank you
--~--~---------~--~----~------------~-------~--~----~

3. Youtube request - search

4. Any else having problems with Market publishers site?

5. Text View

6. nfs

7. Itemized overlay and Hellomapview