mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 17:11:12 +01:00
Use ContentLoadingProgressBar
This commit is contained in:
@@ -36,7 +36,6 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
@@ -58,6 +57,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.core.widget.ContentLoadingProgressBar;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LiveData;
|
||||
@@ -83,7 +83,7 @@ public class FragmentMessages extends FragmentEx {
|
||||
private TextView tvNoEmail;
|
||||
private RecyclerView rvMessage;
|
||||
private BottomNavigationView bottom_navigation;
|
||||
private ProgressBar pbWait;
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
private Group grpSupport;
|
||||
private Group grpHintSupport;
|
||||
private Group grpHintSwipe;
|
||||
@@ -704,7 +704,7 @@ public class FragmentMessages extends FragmentEx {
|
||||
tvNoEmail.setVisibility(View.GONE);
|
||||
bottom_navigation.setVisibility(View.GONE);
|
||||
grpReady.setVisibility(View.GONE);
|
||||
pbWait.setVisibility(View.VISIBLE);
|
||||
pbWait.show();
|
||||
|
||||
fab.hide();
|
||||
fabMove.hide();
|
||||
@@ -1087,12 +1087,12 @@ public class FragmentMessages extends FragmentEx {
|
||||
new BoundaryCallbackMessages.IBoundaryCallbackMessages() {
|
||||
@Override
|
||||
public void onLoading() {
|
||||
pbWait.setVisibility(View.VISIBLE);
|
||||
pbWait.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
pbWait.setVisibility(View.GONE);
|
||||
pbWait.hide();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1129,12 +1129,12 @@ public class FragmentMessages extends FragmentEx {
|
||||
@Override
|
||||
public void onLoading() {
|
||||
tvNoEmail.setVisibility(View.GONE);
|
||||
pbWait.setVisibility(View.VISIBLE);
|
||||
pbWait.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaded() {
|
||||
pbWait.setVisibility(View.GONE);
|
||||
pbWait.hide();
|
||||
if (messages.getValue() == null || messages.getValue().size() == 0)
|
||||
tvNoEmail.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -1238,7 +1238,7 @@ public class FragmentMessages extends FragmentEx {
|
||||
boolean searching = (searchCallback != null && searchCallback.isSearching());
|
||||
|
||||
if (!searching)
|
||||
pbWait.setVisibility(View.GONE);
|
||||
pbWait.hide();
|
||||
grpReady.setVisibility(View.VISIBLE);
|
||||
|
||||
if (messages.size() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user