mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Merge pull request #5187 from nextcloud/fab
FAB: show disabled correctly again
This commit is contained in:
commit
4cb800ea13
1 changed files with 6 additions and 2 deletions
|
@ -27,6 +27,7 @@ package com.owncloud.android.ui.fragment;
|
|||
import android.animation.LayoutTransition;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
|
@ -608,10 +609,13 @@ public class ExtendedListFragment extends Fragment implements
|
|||
getActivity().runOnUiThread(() -> {
|
||||
if (enabled) {
|
||||
mFabMain.setEnabled(true);
|
||||
ThemeUtils.tintDrawable(mFabMain.getBackground(), ThemeUtils.primaryColor(getContext()));
|
||||
int primaryColor = ThemeUtils.primaryColor(getContext());
|
||||
mFabMain.setBackgroundTintList(ColorStateList.valueOf(primaryColor));
|
||||
mFabMain.setRippleColor(primaryColor);
|
||||
} else {
|
||||
mFabMain.setEnabled(false);
|
||||
ThemeUtils.tintDrawable(mFabMain.getBackground(), Color.GRAY);
|
||||
mFabMain.setBackgroundTintList(ColorStateList.valueOf(Color.GRAY));
|
||||
mFabMain.setRippleColor(Color.GRAY);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue