From d40f3ddaf6dd41698261284cc56fabf3a5fbdc3f Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Wed, 7 Sep 2022 11:39:28 -0700 Subject: [PATCH] text viewer loading --- .../main/java/asgardius/page/s3manager/TextViewer.java | 3 +++ app/src/main/res/layout/activity_text_viewer.xml | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/src/main/java/asgardius/page/s3manager/TextViewer.java b/app/src/main/java/asgardius/page/s3manager/TextViewer.java index a046285..8379945 100644 --- a/app/src/main/java/asgardius/page/s3manager/TextViewer.java +++ b/app/src/main/java/asgardius/page/s3manager/TextViewer.java @@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; +import android.widget.ProgressBar; import android.widget.Toast; import com.amazonaws.services.s3.model.ListObjectsRequest; @@ -29,6 +30,7 @@ public class TextViewer extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_text_viewer); filecontent = (EditText)findViewById(R.id.textShow); + final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar); String videoURL = getIntent().getStringExtra("video_url"); Thread textread = new Thread(new Runnable() { @@ -49,6 +51,7 @@ public class TextViewer extends AppCompatActivity { @Override public void run() { // Sending reference and data to Adapter + simpleProgressBar.setVisibility(View.INVISIBLE); filecontent.setText(str); } diff --git a/app/src/main/res/layout/activity_text_viewer.xml b/app/src/main/res/layout/activity_text_viewer.xml index d57867e..0cffde8 100644 --- a/app/src/main/res/layout/activity_text_viewer.xml +++ b/app/src/main/res/layout/activity_text_viewer.xml @@ -17,4 +17,14 @@ tools:ignore="MissingConstraints" tools:layout_editor_absoluteX="79dp" tools:layout_editor_absoluteY="25dp" /> + + \ No newline at end of file