Skip to content

Commit f3fe407

Browse files
committed
working on progress bar
1 parent f3798eb commit f3fe407

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/redcross/openmapkit/deployments/DeploymentDetailsActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import android.support.v7.widget.Toolbar;
1010
import android.view.View;
1111
import android.widget.ExpandableListView;
12+
import android.widget.ProgressBar;
1213
import android.widget.TextView;
1314

1415
import org.json.JSONObject;
@@ -22,6 +23,7 @@ public class DeploymentDetailsActivity extends AppCompatActivity implements View
2223

2324
private FloatingActionButton fab;
2425
private TextView progressTextView;
26+
private ProgressBar progressBar;
2527

2628
private enum DownloadState {
2729
FRESH, DOWNLOADING, CANCELED, ERROR, COMPLETE
@@ -59,6 +61,9 @@ protected void onCreate(Bundle savedInstanceState) {
5961
progressTextView = (TextView)findViewById(R.id.progressTextView);
6062
progressTextView.setText(deployment.fileCount() + " files. Total Size: " + deployment.totalSizeMB());
6163

64+
// progressBar = (ProgressBar)findViewById(R.id.progressBar);
65+
// progressBar.setMax(100);
66+
6267
/**
6368
* SETUP FOR EXPANDABLE LIST VIEW FOR MBTILES AND OSM FILES
6469
*/
@@ -155,6 +160,7 @@ public void onDeploymentDownloadProgressUpdate(String msg, long bytesDownloaded)
155160
progressTextView.setText(msg);
156161
progressTextView.setTextColor(getResources().getColor(R.color.black));
157162
progressTextView.setTypeface(null, Typeface.NORMAL);
163+
// progressBar.setProgress((int)bytesDownloaded);
158164
}
159165

160166
@Override

0 commit comments

Comments
 (0)