add loading animation
This commit is contained in:
parent
b763025105
commit
a9012cbbcc
4 changed files with 29 additions and 0 deletions
|
@ -10,6 +10,7 @@ import android.content.Intent;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentials;
|
||||
|
@ -48,6 +49,7 @@ public class BucketSelect extends AppCompatActivity {
|
|||
s3client.setS3ClientOptions(s3ClientOptions);
|
||||
|
||||
recyclerView = findViewById(R.id.blist);
|
||||
final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
|
||||
|
||||
// layout for vertical orientation
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
|
@ -79,6 +81,7 @@ public class BucketSelect extends AppCompatActivity {
|
|||
public void run() {
|
||||
// Sending reference and data to Adapter
|
||||
Adapter adapter = new Adapter(BucketSelect.this, Img, Name);
|
||||
simpleProgressBar.setVisibility(View.INVISIBLE);
|
||||
|
||||
// Setting Adapter to RecyclerView
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
|
|
@ -9,6 +9,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentials;
|
||||
|
@ -60,6 +61,7 @@ public class ObjectSelect extends AppCompatActivity {
|
|||
s3client.setS3ClientOptions(s3ClientOptions);
|
||||
|
||||
recyclerView = findViewById(R.id.olist);
|
||||
final ProgressBar simpleProgressBar = (ProgressBar) findViewById(R.id.simpleProgressBar);
|
||||
|
||||
// layout for vertical orientation
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
|
@ -146,6 +148,7 @@ public class ObjectSelect extends AppCompatActivity {
|
|||
public void run() {
|
||||
// Sending reference and data to Adapter
|
||||
Adapter adapter = new Adapter(ObjectSelect.this, Img, Name);
|
||||
simpleProgressBar.setVisibility(View.INVISIBLE);
|
||||
|
||||
// Setting Adapter to RecyclerView
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
|
|
@ -14,4 +14,16 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:layout_editor_absoluteX="-27dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/simpleProgressBar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:background="@color/design_default_color_background"
|
||||
android:padding="20dp"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:indeterminate="true" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -15,4 +15,15 @@
|
|||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:layout_editor_absoluteX="-27dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/simpleProgressBar"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:background="@color/design_default_color_background"
|
||||
android:padding="20dp"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:indeterminate="true" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in a new issue