Coder Social home page Coder Social logo

Comments (12)

alexblack avatar alexblack commented on September 18, 2024

I've had this problem too, the FAB obscures the last item in the list with no way to fix it

from floatingactionbutton.

makovkastar avatar makovkastar commented on September 18, 2024

The FAB has show() and hide() methods. So you may track swipe motions by yourself and then hide and show the FAB manually.

Do you know how does the FAB behave in other apps (for example by Google) when a list is not scrollable?

from floatingactionbutton.

leo-k avatar leo-k commented on September 18, 2024

In Google apps that currently use FAB (not too many yet) I haven't found a situation where the list fits within one screen. I'd be interested to see how Google deals with this situation. Of course it's possible to implement something like you describe with show()/hide(), I just thought that in an implementation of FAB that already takes care of getting FAB out of the way in the general case, that it should also handle this corner case...

from floatingactionbutton.

makovkastar avatar makovkastar commented on September 18, 2024

I think the best way to fix this issue is to add a bottom padding for your content in the list. This is how it's currently done in the dialer app in Lollipop:

device-2014-11-21-181718

from floatingactionbutton.

alexblack avatar alexblack commented on September 18, 2024

What I love about the fab is it doesn't take up space. If we reserve it
that much white space then there is no point using it.

Here's another solution:

  • the fab could be hidden by the user attempting (but failing) to scroll
    the listview.

On Fri, Nov 21, 2014 at 8:18 AM, Melnykov Oleksandr <
[email protected]> wrote:

I think the best way to fix this issue is to add a bottom padding for your
content in the list. This is how it's currently done in the dialer app in
Lollipop:

[image: device-2014-11-21-181718]
https://cloud.githubusercontent.com/assets/1076309/5145352/aed3ef0e-71aa-11e4-83ed-7af6f79a7d84.png


Reply to this email directly or view it on GitHub
#46 (comment)
.

from floatingactionbutton.

makovkastar avatar makovkastar commented on September 18, 2024

Let's stick for now with how this Google does. Will revise in future if some approach will widespread.

from floatingactionbutton.

alexblack avatar alexblack commented on September 18, 2024

I'm just realising I don't totally get this solution.

What does that screen/app look like if one more item is added to the list?
On 21 Nov 2014 08:30, "Melnykov Oleksandr" [email protected] wrote:

Let's stick for now with how this Google does. Will revise in future if
some approach will widespread.


Reply to this email directly or view it on GitHub
#46 (comment)
.

from floatingactionbutton.

makovkastar avatar makovkastar commented on September 18, 2024

It's even not a padding itself but a scrollable empty footer. So when a user scrolls a list, it's also being scrolled.
I've recorded a short sample to demonstrate this behavior:
efemg

from floatingactionbutton.

leo-k avatar leo-k commented on September 18, 2024

Perfect. Now this sounds like a viable solution. Thank you.

from floatingactionbutton.

alexblack avatar alexblack commented on September 18, 2024

Cool, thanks for sharing that.

I just looked at gmail, and noticed two things:

  1. It doesn't hide the fab, even when scrolling
  2. It looks like it uses the same padding option
  3. We've been discussing the edge case where the list items fill the screen
    exactly, but the same issue happens to the last item in the list.

I like the solution you observed!
On 21 Nov 2014 08:48, "leo-k" [email protected] wrote:

Perfect. Now this sounds like a viable solution. Thank you.


Reply to this email directly or view it on GitHub
#46 (comment)
.

from floatingactionbutton.

alexblack avatar alexblack commented on September 18, 2024

Do either of you have any tips on how to implement something like this?

I'm somewhat new to android... I tried adding bottom padding (and later margin) to my listview, but it didn't achieve the result shown above.

from floatingactionbutton.

leo-k avatar leo-k commented on September 18, 2024

In the above example it looks to me like they are using a listview footer (i.e. View full call history)... and probably adding a bottom padding to the footer layout element the size of the FAB...

from floatingactionbutton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.