mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 10:49:04 +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);
|
setChoiceModeAsMultipleModal(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
mFabMain = getActivity().findViewById(R.id.fab_main);
|
mFabMain = requireActivity().findViewById(R.id.fab_main);
|
||||||
ThemeUtils.tintFloatingActionButton(mFabMain, requireContext());
|
|
||||||
ThemeUtils.drawableFloatingActionButton(mFabMain, R.drawable.ic_plus, requireContext());
|
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");
|
Log_OC.i(TAG, "onCreateView() end");
|
||||||
return v;
|
return v;
|
||||||
|
@ -1758,6 +1761,11 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
||||||
* @param visible Desired visibility for the FAB.
|
* @param visible Desired visibility for the FAB.
|
||||||
*/
|
*/
|
||||||
void setFabVisible(final boolean visible) {
|
void setFabVisible(final boolean visible) {
|
||||||
|
if (mFabMain == null) {
|
||||||
|
// is not available in FolderPickerActivity
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(() -> {
|
getActivity().runOnUiThread(() -> {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
@ -1803,6 +1811,11 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
||||||
* @param enabled Desired visibility for the FAB.
|
* @param enabled Desired visibility for the FAB.
|
||||||
*/
|
*/
|
||||||
public void setFabEnabled(final boolean enabled) {
|
public void setFabEnabled(final boolean enabled) {
|
||||||
|
if (mFabMain == null) {
|
||||||
|
// is not available in FolderPickerActivity
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(() -> {
|
getActivity().runOnUiThread(() -> {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
|
Loading…
Reference in a new issue