mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
resolves #1078 - Empty content screen icon colors
This commit is contained in:
parent
5f61418fc1
commit
51c2f1d83d
5 changed files with 25 additions and 8 deletions
|
@ -171,7 +171,8 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
|
|||
listFragment.setMessageForEmptyList(
|
||||
R.string.file_list_empty_headline,
|
||||
R.string.file_list_empty_moving,
|
||||
R.drawable.ic_list_empty_create_folder
|
||||
R.drawable.ic_list_empty_create_folder,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
listFragment.setEmptyListLoadingMessage();
|
||||
|
|
|
@ -627,13 +627,27 @@ public class ExtendedListFragment extends Fragment
|
|||
}
|
||||
|
||||
/**
|
||||
* displays an empty list information with a headline, a message and an icon.
|
||||
* displays an empty list information with a headline, a message and a not to be tinted icon.
|
||||
*
|
||||
* @param headline the headline
|
||||
* @param message the message
|
||||
* @param icon the icon to be shown
|
||||
*/
|
||||
public void setMessageForEmptyList(@StringRes final int headline, @StringRes final int message, @DrawableRes final int icon) {
|
||||
public void setMessageForEmptyList(@StringRes final int headline, @StringRes final int message,
|
||||
@DrawableRes final int icon) {
|
||||
setMessageForEmptyList(headline, message, icon, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* displays an empty list information with a headline, a message and an icon.
|
||||
*
|
||||
* @param headline the headline
|
||||
* @param message the message
|
||||
* @param icon the icon to be shown
|
||||
* @param tintIcon flag if the given icon should be tinted with primary color
|
||||
*/
|
||||
public void setMessageForEmptyList(@StringRes final int headline, @StringRes final int message,
|
||||
@DrawableRes final int icon, final boolean tintIcon) {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -642,7 +656,9 @@ public class ExtendedListFragment extends Fragment
|
|||
mEmptyListHeadline.setText(headline);
|
||||
mEmptyListMessage.setText(message);
|
||||
|
||||
mEmptyListIcon.setImageDrawable(DisplayUtils.tintDrawable(icon, R.color.primary));
|
||||
if (tintIcon) {
|
||||
mEmptyListIcon.setImageDrawable(DisplayUtils.tintDrawable(icon, R.color.primary));
|
||||
}
|
||||
|
||||
mEmptyListIcon.setVisibility(View.VISIBLE);
|
||||
mEmptyListProgress.setVisibility(View.GONE);
|
||||
|
@ -661,7 +677,8 @@ public class ExtendedListFragment extends Fragment
|
|||
setMessageForEmptyList(
|
||||
R.string.file_list_empty_headline,
|
||||
R.string.file_list_empty,
|
||||
R.drawable.ic_list_empty_folder
|
||||
R.drawable.ic_list_empty_folder,
|
||||
true
|
||||
);
|
||||
} else if (searchType == SearchType.FILE_SEARCH) {
|
||||
setMessageForEmptyList(R.string.file_list_empty_headline_server_search,
|
||||
|
|
|
@ -99,7 +99,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
|
|||
setSwipeEnabled(false); // Disable pull-to-refresh
|
||||
setFabEnabled(false); // Disable FAB
|
||||
setMessageForEmptyList(R.string.file_list_empty_headline, R.string.local_file_list_empty,
|
||||
R.drawable.ic_list_empty_folder);
|
||||
R.drawable.ic_list_empty_folder, true);
|
||||
Log_OC.i(TAG, "onCreateView() end");
|
||||
return v;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class UploadListFragment extends ExpandableListFragment {
|
|||
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
|
||||
setMessageForEmptyList(
|
||||
R.string.upload_list_empty_headline, R.string.upload_list_empty_text_auto_upload,
|
||||
R.drawable.ic_list_empty_upload
|
||||
R.drawable.ic_list_empty_upload, true
|
||||
);
|
||||
setOnRefreshListener(this);
|
||||
return v;
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
android:layout_height="72dp"
|
||||
android:contentDescription="@string/file_list_folder"
|
||||
android:src="@drawable/ic_list_empty_folder"
|
||||
android:tint="@color/primary"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ProgressBar
|
||||
|
|
Loading…
Reference in a new issue