Skip to content

Commit

Permalink
"added loading dialog"
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenDaelman committed Jun 18, 2014
1 parent 03d696a commit 1e088ad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
Binary file modified bin/OVSR.apk
Binary file not shown.
Binary file modified bin/classes.dex
Binary file not shown.
Binary file modified bin/dexedLibs/fileexplorer-3d3c3b02d97635dd0b3672a105a18d8a.jar
Binary file not shown.
Binary file modified bin/resources.ap_
Binary file not shown.
12 changes: 12 additions & 0 deletions src/com/denayer/ovsr/FTPActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.denayer.ovsr.SettingsActivity.PlaceholderFragment;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
Expand Down Expand Up @@ -44,6 +45,7 @@ public class FTPActivity extends Activity {
SharedPreferences settings;
String IP;
Intent intent;
ProgressDialog mDialog;

private ArrayList<String> rsFileList = new ArrayList<String>();

Expand Down Expand Up @@ -80,6 +82,14 @@ protected void onCreate(Bundle savedInstanceState) {
} else {
IP = settings.getString("ServerIP", getResources().getString(R.string.defaultIP));
}

mDialog = new ProgressDialog(FTPActivity.this);
mDialog.setMessage("Loading filelist.");
mDialog.setCancelable(false);
mDialog.setCanceledOnTouchOutside(false);
mDialog.show();


mThread = new Thread() {

@Override
Expand Down Expand Up @@ -109,6 +119,7 @@ public void run() {
myListView.setAdapter(myArrayAdapter);
downloadButton.setText("Download");
downloadButton.setClickable(true);
mDialog.dismiss();

}
});
Expand All @@ -119,6 +130,7 @@ public void run() {
@Override
public void run() {
downloadButton.setText("Connection error");
mDialog.dismiss();

}
});
Expand Down

0 comments on commit 1e088ad

Please sign in to comment.