Android: Snackbar overlaps FAB

Created on 16 Apr 2018  Â·  7Comments  Â·  Source: nextcloud/android

Actual behaviour

  • Snackbar overlaps FAB

screenshot_nextcloud_20180416-132905

Expected behaviour

Steps to reproduce

  1. create folder
  2. long press it
  3. delete it
  4. Snackbar appears

Environment data

Android version:
Lineage OS 15.1 (matches android 8.1)
Device model:
Nexus 5X
Stock or customized system:
Lineage OS
Nextcloud app version:
3.0.3
Nextcloud server version:
13

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

approved bug

All 7 comments

I had a similar issue in the android notes app that could simply be solved by switching from LinearLayout to CoordinatorLayout.

Thanks for the report @stefan-niedermann

@tobiasKaminsky I remember you did fix this (at least for some Snackbars). If I also remember correctly we couldn't use the coordinator layout due to the way the min FABs have been implemented but since they vanish when we merge the bottom sheet PR we could then re-check if we can go for the CoordinatorLayout now :)

Thanks for reporting, Stefan. (nice to met you in person during Hackweek!)
@AndyScherzinger indeed, let us first merge your bottom sheet PR and then have a look if the problem still occurs.

@tobiasKaminsky the problem should still occur but I guess it'll then be easier to move on to a coordinator layout :)

This is ultra tricky to solve... because Stefan's approach doesn't work in our case. :(
To make this work we need to also use a coordinatorlayout (the easy part) but:
Our snackbar is triggered from the activity not the fragment using a generic implementation we wrote which puts the snackbar into android.R.id.content (via the activity). While we would have to put the snackbar into the id of the coordinator layout (where the FAB is within the fragments layout...).

So in order to get this working we would have to change quite some code and get this mess cleaned up. Maybe this can be implemented in an easier way after @ardevd's PR for moving on to MVP has been done _and_ applied to the file display parts in the code base.

I would not spend to much energy in fixing this.
If we, at some point, will change to coordinators layout and/or split the whole UI/fragments, then this can also be tackled.

Another try…

Removing https://github.com/nextcloud/android/blob/a9dc3f578743f3484b6a2d0ee6e848a51e1fb40a/src/main/res/layout/files.xml#L69

leads to our desired behavior.
But then FAB is not hidden while scrolling…

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndyScherzinger picture AndyScherzinger  Â·  3Comments

JSoko picture JSoko  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

markbryanduncan picture markbryanduncan  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments