Redo "r28369, Android load progress screen". git+svn lost the actual code changed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28372 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d7bb580b50
commit
1a2851c298
2 changed files with 7 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
|||
package org.rockbox;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
@ -42,6 +43,11 @@ public class RockboxActivity extends Activity
|
|||
,WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
final Intent intent = new Intent(this,
|
||||
RockboxService.class);
|
||||
loadingdialog = new ProgressDialog(this);
|
||||
loadingdialog.setMessage("Rockbox Loading. Please wait...");
|
||||
loadingdialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
||||
loadingdialog.setCancelable(false);
|
||||
loadingdialog.show();
|
||||
startService(intent);
|
||||
/* Now it gets a bit tricky:
|
||||
* The service is started in the same thread as we are now,
|
||||
|
@ -67,6 +73,7 @@ public class RockboxActivity extends Activity
|
|||
runOnUiThread(new Runnable()
|
||||
{ @Override
|
||||
public void run() {
|
||||
loadingdialog.dismiss();
|
||||
setContentView(RockboxService.fb);
|
||||
RockboxService.fb.invalidate();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import java.util.zip.ZipFile;
|
|||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.ProgressDialog;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
|
|
Loading…
Reference in a new issue