mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-27 09:46:50 +03:00
Merge branch 'show-progress-bar-on-notes-loading'
# Conflicts: # app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java
This commit is contained in:
commit
f0b1bd0d5c
2 changed files with 14 additions and 2 deletions
|
@ -20,6 +20,7 @@ import android.view.View;
|
|||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
@ -130,6 +131,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
RecyclerView listView;
|
||||
@BindView(R.id.empty_content_view)
|
||||
RelativeLayout emptyContentView;
|
||||
@BindView(R.id.progress_circular)
|
||||
ProgressBar progressBar;
|
||||
|
||||
private ActionBarDrawerToggle drawerToggle;
|
||||
private ItemAdapter adapter = null;
|
||||
|
@ -638,6 +641,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
adapter.removeAll();
|
||||
return;
|
||||
}
|
||||
emptyContentView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
fabCreate.show();
|
||||
String subtitle;
|
||||
if (navigationSelection.category != null) {
|
||||
|
@ -660,6 +665,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap
|
|||
LoadNotesListTask.NotesLoadedListener callback = (List<Item> notes, boolean showCategory) -> {
|
||||
adapter.setShowCategory(showCategory);
|
||||
adapter.setItemList(notes);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
if (notes.size() > 0) {
|
||||
emptyContentView.setVisibility(View.GONE);
|
||||
} else {
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/empty_content_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -63,9 +64,14 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/no_notes_yet_description" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_circular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue