GithubHelp home page GithubHelp logo

FAB position not exactly correct about fab HOT 2 CLOSED

scalified avatar scalified commented on September 27, 2024
FAB position not exactly correct

from fab.

Comments (2)

vbaidak avatar vbaidak commented on September 27, 2024

Hi asbozh,

Thank you.
This is the desired behavior.

If you refer ActionButton documentation you can find there an explanation of the Shadow Responsive Effect, which is enabled by default:

Note, that having Shadow Responsive Effect enabled leads to increasing of the ActionButton general view size. In this case view size calculated based on the maximum value of the shadow radius. This means, that event if there is a place near the ActionButton unfilled, it is actually used by Shadow Responsive Effect

That is, if you have it enabled the additional margin space is added. It is used by Shadow Responsive Effect, so that when shadow is increasing (PRESSED state) these spaces are filled with shadow.

If there were no space, in case when ActionButton is pressed and Shadow Responsive Effect enabled, it will be moved in an unexpected way (instead of just increasing the shadow).

So far as there is no possibility to draw the shadow outside the View this is the only solution to implement Shadow Responsive Effect for pre-Lollipop devices.

May be in future Google will provide a more convenient way to apply elevation using compat library, but this is not yet available.

So in your case I suggest you either to disable Shadow Responsive Effect or change the offset values (like in your screens).

from fab.

asbozh avatar asbozh commented on September 27, 2024

Thanks.

from fab.

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.