Comments (12)
I've had this problem too, the FAB obscures the last item in the list with no way to fix it
from floatingactionbutton.
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.
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.
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:
from floatingactionbutton.
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.
Let's stick for now with how this Google does. Will revise in future if some approach will widespread.
from floatingactionbutton.
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.
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:
from floatingactionbutton.
Perfect. Now this sounds like a viable solution. Thank you.
from floatingactionbutton.
Cool, thanks for sharing that.
I just looked at gmail, and noticed two things:
- It doesn't hide the fab, even when scrolling
- It looks like it uses the same padding option
- 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.
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.
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)
- The color doesn't change HOT 5
- Modifying the sensitivity of fab animation
- Cannot work with SwipeRefreshLayout HOT 1
- Transparent Nav bar
- Can not resolve symbol FloatingActionButton HOT 1
- Crash and tips above:
- shadow not appearing
- floatingactionbutton cannot show.when i scroll down slowly? HOT 1
- Collapsing android fab show false
- Thank
- Adding custom animations to FAB xml
- Overlaps admob adview with listview inside FrameLayout
- how to implement this animation for floating button?
- FloatingActionButton removeAttachedScrollview
- How to take off the border HOT 1
- Why the attacheToxxView requires an object, rather interface or android base class.
- java.lang.NoSuchFieldError: FloatingActionButton_fab_colorNormal
- 国旗图标下载地址可以发出来一下吗
- support HOT 1
- Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from floatingactionbutton.