mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Added body loading spinner
This commit is contained in:
parent
5e3efe967b
commit
2bf32e2748
2 changed files with 17 additions and 0 deletions
|
@ -84,6 +84,7 @@ public class FragmentMessage extends FragmentEx {
|
|||
private TextView tvError;
|
||||
private View vSeparatorBody;
|
||||
private TextView tvBody;
|
||||
private ProgressBar pbBody;
|
||||
private FloatingActionButton fab;
|
||||
private BottomNavigationView bottom_navigation;
|
||||
private ProgressBar pbWait;
|
||||
|
@ -125,6 +126,7 @@ public class FragmentMessage extends FragmentEx {
|
|||
tvError = view.findViewById(R.id.tvError);
|
||||
vSeparatorBody = view.findViewById(R.id.vSeparatorBody);
|
||||
tvBody = view.findViewById(R.id.tvBody);
|
||||
pbBody = view.findViewById(R.id.pbBody);
|
||||
fab = view.findViewById(R.id.fab);
|
||||
bottom_navigation = view.findViewById(R.id.bottom_navigation);
|
||||
pbWait = view.findViewById(R.id.pbWait);
|
||||
|
@ -263,6 +265,7 @@ public class FragmentMessage extends FragmentEx {
|
|||
grpAddresses.setVisibility(View.GONE);
|
||||
grpAttachments.setVisibility(View.GONE);
|
||||
grpMessage.setVisibility(View.GONE);
|
||||
pbBody.setVisibility(View.GONE);
|
||||
bottom_navigation.setVisibility(View.GONE);
|
||||
tvCount.setVisibility(View.GONE);
|
||||
tvError.setVisibility(View.GONE);
|
||||
|
@ -343,6 +346,7 @@ public class FragmentMessage extends FragmentEx {
|
|||
Bundle args = new Bundle();
|
||||
args.putLong("id", message.id);
|
||||
|
||||
pbBody.setVisibility(View.VISIBLE);
|
||||
new SimpleTask<Spanned>() {
|
||||
@Override
|
||||
protected Spanned onLoad(Context context, Bundle args) throws Throwable {
|
||||
|
@ -357,6 +361,7 @@ public class FragmentMessage extends FragmentEx {
|
|||
tvBody.setText(body);
|
||||
grpMessage.setVisibility(View.VISIBLE);
|
||||
fab.setVisibility(free ? View.GONE : View.VISIBLE);
|
||||
pbBody.setVisibility(View.GONE);
|
||||
}
|
||||
}.load(FragmentMessage.this, args);
|
||||
|
||||
|
|
|
@ -248,6 +248,18 @@
|
|||
android:textIsSelectable="true" />
|
||||
</ScrollView>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbBody"
|
||||
style="@style/Base.Widget.AppCompat.ProgressBar"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/scroll"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/scroll" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Add table
Reference in a new issue