mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 14:45:47 +03:00
fix tests
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
bd5c9dfa1e
commit
38c28332e2
1 changed files with 16 additions and 3 deletions
|
@ -290,9 +290,12 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
setChoiceModeAsMultipleModal(savedInstanceState);
|
||||
}
|
||||
|
||||
mFabMain = getActivity().findViewById(R.id.fab_main);
|
||||
ThemeUtils.tintFloatingActionButton(mFabMain, requireContext());
|
||||
ThemeUtils.drawableFloatingActionButton(mFabMain, R.drawable.ic_plus, requireContext());
|
||||
mFabMain = requireActivity().findViewById(R.id.fab_main);
|
||||
|
||||
if (mFabMain != null) { // is not available in FolderPickerActivity
|
||||
ThemeUtils.tintFloatingActionButton(mFabMain, requireContext());
|
||||
ThemeUtils.drawableFloatingActionButton(mFabMain, R.drawable.ic_plus, requireContext());
|
||||
}
|
||||
|
||||
Log_OC.i(TAG, "onCreateView() end");
|
||||
return v;
|
||||
|
@ -1758,6 +1761,11 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
* @param visible Desired visibility for the FAB.
|
||||
*/
|
||||
void setFabVisible(final boolean visible) {
|
||||
if (mFabMain == null) {
|
||||
// is not available in FolderPickerActivity
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (visible) {
|
||||
|
@ -1803,6 +1811,11 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
* @param enabled Desired visibility for the FAB.
|
||||
*/
|
||||
public void setFabEnabled(final boolean enabled) {
|
||||
if (mFabMain == null) {
|
||||
// is not available in FolderPickerActivity
|
||||
return;
|
||||
}
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
if (enabled) {
|
||||
|
|
Loading…
Reference in a new issue