mirror of
https://github.com/nextcloud/android.git
synced 2024-11-30 18:21:10 +03:00
Merge pull request #936 from nextcloud/fix-fab-changing-from-background
Fix fab stuff
This commit is contained in:
commit
9f6338adec
1 changed files with 12 additions and 5 deletions
|
@ -601,11 +601,18 @@ public class ExtendedListFragment extends Fragment
|
|||
*
|
||||
* @param enabled Desired visibility for the FAB.
|
||||
*/
|
||||
public void setFabEnabled(boolean enabled) {
|
||||
if (enabled) {
|
||||
mFabMain.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mFabMain.setVisibility(View.GONE);
|
||||
public void setFabEnabled(final boolean enabled) {
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (enabled) {
|
||||
mFabMain.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mFabMain.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue