GithubHelp home page GithubHelp logo

Comments (10)

torinnguyen avatar torinnguyen commented on July 23, 2024 1

@ascmp @stetro I have another workaround by adding these 2 to my FAB
app:fab_elevationCompat="0dp" //this fixes the clipping issue mentioned here
android:layout_margin="3dp" //this fix another type of clipping, should be equals to arcWidth
However, a side effect is that the shadow of my FAB is removed :(

So I have to create another layout for v19 and above with fab_elevationCompat > 0

Here is my layout xml for < v19

<com.github.jorgecastilloprz.FABProgressCircle
        android:id="@+id/fabProgressCircle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@id/main_layout"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="@dimen/medium_space"
        android:layout_marginEnd="@dimen/medium_space"
        android:layout_marginRight="@dimen/medium_space"
        app:arcColor="@color/app_primary_color"
        app:arcWidth="3dp"
        app:roundedStroke="true">

        <com.github.clans.fab.FloatingActionButton
            android:id="@+id/btn_big_red_location"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="3dp"
            android:src="@mipmap/ic_focusing"
            app:fab_elevationCompat="0dp"
            app:fab_colorNormal="@color/app_primary_color"
            app:fab_colorPressed="@color/app_primary_color_dark"
            app:fab_colorRipple="#99FFFFFF"
            app:fab_shadowColor="#55000000"
            app:fab_shadowRadius="4dp"
            app:fab_shadowXOffset="1dp"
            app:fab_shadowYOffset="3dp"
            app:fab_showShadow="true" />
    </com.github.jorgecastilloprz.FABProgressCircle>

from fabprogresscircle.

ascmp avatar ascmp commented on July 23, 2024

I experience the very same glitch in 4.4.4, with Support lib FAB.
Very annoying as frustrating.

from fabprogresscircle.

ascmp avatar ascmp commented on July 23, 2024

@stetro I found a workaround for it, although the glitch should be fixed at the source. Basically I made a copy of my Support's FAB wrapped by a FrameLayout (which the ProgressCircle extends), and I use a ViewFlipper to switch to the progress circle one only just before I show() the animation, and switch back as soon as I want to hide() the animation:

<ViewFlipper
    android:id="@+id/view_flipper"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <FrameLayout
        android:id="@+id/frame_non_spinning"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/button_non_spinning"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </FrameLayout>

    <com.github.jorgecastilloprz.FABProgressCircle
        android:id="@+id/frame_spinning"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <android.support.design.widget.FloatingActionButton
            android:id="@+id/button_spinning"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </com.github.jorgecastilloprz.FABProgressCircle>
</ViewFlipper>

from fabprogresscircle.

torinnguyen avatar torinnguyen commented on July 23, 2024

@ascmp I tried your solution, but when the FABProgressCircle is shown, the original clipping problem still exists, doesn't it?

from fabprogresscircle.

ascmp avatar ascmp commented on July 23, 2024

@torinnguyen no, not for me at least. The clipping disappeared, but it could be because of some other properties I have set.

Let me be verbose: I was experiencing that clipping problem as in the picture when the FABProgressCircle was not animated (can't recall now if it appeared for me once you animated it at least once or not), and still I could see that dirtiness. Therefore my ugly workaround to show the FABProgressCircle only during the animation period, whereas the animation itself covers the clipping effect. Before and after, switching to the normal FAB guarantee that the clipping is removed from the UI.

from fabprogresscircle.

nak411 avatar nak411 commented on July 23, 2024

Any update on this yet? Seems like this project hasn't been worked on for a while.

from fabprogresscircle.

ascmp avatar ascmp commented on July 23, 2024

@nak411 @JorgeCastilloPrz wondering the same here; I guess the developer doesn't have the time to neither update this project, nor to fix the already open bugs. My only hope is design lib will bring this animation ootb at one point.

from fabprogresscircle.

PanCrucian avatar PanCrucian commented on July 23, 2024

same issue

from fabprogresscircle.

SjoerdvGestel avatar SjoerdvGestel commented on July 23, 2024

same issue

from fabprogresscircle.

SjoerdvGestel avatar SjoerdvGestel commented on July 23, 2024

could work around the issue with setting the color to transparent when hidden but the needed pull request (setting color at runtime) is not merged and open since 2016...

from fabprogresscircle.

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.