mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Empty screen if no upload fix (#1940)
* Updated contribution screen to show message for no uploads by default, message gets wiped after any picture is inserted into the list * Changed string as suggested * Added margin
This commit is contained in:
parent
6bee91496e
commit
2af57fc594
4 changed files with 24 additions and 0 deletions
|
|
@ -256,6 +256,9 @@ public class ContributionsActivity
|
|||
((CursorAdapter) contributionsList.getAdapter()).swapCursor(cursor);
|
||||
}
|
||||
|
||||
if(contributionsList.getAdapter().getCount()>0){
|
||||
contributionsList.changeEmptyScreen(false);
|
||||
}
|
||||
contributionsList.clearSyncMessage();
|
||||
notifyAndMigrateDataSetObservers();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment {
|
|||
TextView waitingMessage;
|
||||
@BindView(R.id.loadingContributionsProgressBar)
|
||||
ProgressBar progressBar;
|
||||
@BindView(R.id.noDataYet)
|
||||
TextView noDataYet;
|
||||
|
||||
@Inject
|
||||
@Named("prefs")
|
||||
|
|
@ -79,6 +81,7 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment {
|
|||
waitingMessage.setVisibility(GONE);
|
||||
}
|
||||
|
||||
changeEmptyScreen(true);
|
||||
changeProgressBarVisibility(true);
|
||||
return v;
|
||||
}
|
||||
|
|
@ -95,6 +98,10 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment {
|
|||
}
|
||||
}
|
||||
|
||||
public void changeEmptyScreen(boolean isEmpty){
|
||||
this.noDataYet.setVisibility(isEmpty ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void changeProgressBarVisibility(boolean isVisible) {
|
||||
this.progressBar.setVisibility(isVisible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue