Git Product home page Git Product logo

android-ripple-background's People

Contributors

skyfishjy avatar xujinyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-ripple-background's Issues

how to keep ripple effect color to view

hey awesome library i use it it works perfectlly but i wonder if it is possible to ripple effects end it stays same color not reset the color can you help me with this

how to set rb_duration value dynamically

hi
I made a applicaion with android-ripple-background, and i have two questions.

  1. I‘m wordering how to set "rb_duration" dynamically
    2.The attribute “app:rb_strokeWidth” in xml doesn't work
                                                                    best regards

How to make ripples point Inwards

Hi,
In my case, I also need to make the ripples animate inwards (Animate towards the center) in order to show that the view is receiving content
How can i achieve this?
Thanks

Doesn't work in BottomSheetDialogFragment

Tried to make it work inside a BottomSheetDialogFragment. But nothing happens when the bottom sheet is displayed.

Here is my code -

public class CountActionListDialogFragment extends BottomSheetDialogFragment {

    @SuppressLint("RestrictedApi")
    @Override
    public void setupDialog(@NonNull final Dialog dialog, int style) {
        super.setupDialog(dialog, style);
        View contentView = View.inflate(getContext(), R.layout.count_bottom_sheet, null);
        dialog.setContentView(contentView);
        try {
            final RippleBackground rippleBackground= Objects.requireNonNull(getActivity()).findViewById(R.id.rippleAnimation);
            rippleBackground.startRippleAnimation();
            ImageView imageView=Objects.requireNonNull(getActivity()).findViewById(R.id.centerImage);
            imageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    rippleBackground.startRippleAnimation();
                }
            });
        } catch (NullPointerException ignored) { }
    }

}

And bottom_sheet.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    <com.skyfishjy.library.RippleBackground
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="400dp"
        android:id="@+id/rippleAnimation"
        app:rb_color="@color/colorAccent"
        app:rb_radius="32dp"
        app:rb_rippleAmount="4"
        app:rb_duration="3000"
        app:rb_scale="6">
        <ImageView
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_centerInParent="true"
            android:id="@+id/centerImage"
            android:src="@drawable/ic_check_circle_green_24dp" />
    </com.skyfishjy.library.RippleBackground>

</LinearLayout>

Might be similar to #32

Thanks in advance!

RippleAnimation not working on Release mode

I just added this RippleAnimation on my project and everythinh was working just fine until I changed from debug to release mode. In the code nothing has changed about this Ripple library, I am using this way:

<com.skyfishjy.library.RippleBackground
    android:layout_width="150dp"
    android:layout_height="150dp"
    android:id="@+id/ripple_effect"
    app:rb_color="#336633"
    app:rb_radius="20dp"
    app:rb_rippleAmount="3"
    app:rb_duration="3000"
    app:rb_scale="3">

    <Button
        android:id="@+id/viewButton"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:text="+"
        android:textSize="30sp"
        android:textColor="@android:color/white"/>

</com.skyfishjy.library.RippleBackground>

Do I need to change anything on release mode?
On release mode, this button is blinking randomly but keeps dissapeared if it is not touched

Reposition ripple source

I'd like to be able to move the source location from the center to the left side but still have it ripple all the way to the right.

Push Notification Stops the ripple Animation. Running on Nokia 5.1 - Android 8.1.0

I have implemented this library for quite a long time and it is a good ripple for ripple animation. Recently, I found the Bug, while running the Application on a particular Device, which in my case is Nokia 5.1 running on Android 8.1.0.

The Bug, When I start the ripple animation if any push notification comes to my device it automatically stops the Ripple animation. I thought it is a bug on all the devices running on Android 8.1.0 or above but it runs perfectly on other devices running 8.1.0 and even the Pixel running on 9.0.0. I believed this has something to do with the memory of the device. I will upload the stack trace of the memory monitor later. But consider this a legit issue. Please try to fix it.

ScreenSizes

Hi, do you think is possible to resize the animation object when the screenSize change?

Support for latest API level

Hello,

We are currently using your library in one of our applications. Actually we need a favour from your side. According to the Google Play Policy, all apps have to provide support for at least API level 26. It seems like yours is not as per the new google play policy. We are targeting API level 28. So can you please provide us support for API level 28 in your current repository?

Why not use nineoldandroids?

For some reasons of animations that are only supported by api-level 11.?
I know it. My suggestion is nineoldandroids, and api-level 9 is at least OK.

Android Version 4.0?

Hi,

I am just wondering something and wanna ask to you. Can this library be used on android version 4.0?

Thank you.

How can i change scale dynamically.

Hi friend,

please provide a scale parameter. we change set scale at run time.
my project requirement is reduce size of ripple on scroll .

rippleStrokeWidth not used in Stroken Ripple Type

@@ -79,8 +79,10 @@ public class RippleBackground extends RelativeLayout{
         if(rippleType==DEFAULT_FILL_TYPE){
             rippleStrokeWidth=0;
             paint.setStyle(Paint.Style.FILL);
-        }else
-        }else{
-            paint.setStrokeWidth(rippleStrokeWidth);
           paint.setStyle(Paint.Style.STROKE);
-        }
       paint.setColor(rippleColor);

Blinking issue

HTC evo 3D X515m android 4.0.3

The circle blink on this phone version, any idea why ?

stroke width

Hey thank you very much for this great library.
As anyone have an update on the issue with stroke width not changing?
thank you!

Change ripple color programmatically

Hi, as the title said, could we change the ripple color programmatically?
I have clone your project and tried to make it, but it's not working. Could you help?
Thanks.

rippleStrokeWidth parameter not working

Hi,

I am currently implementing this library but it seems that the rippleStrokeWidth parameter is not working.

Here my implementation:

<com.skyfishjy.library.RippleBackground
                android:layout_width="match_parent"
                android:layout_height="140dp"
                android:layout_marginTop="330dp"
                android:id="@+id/start_content"
                app:rb_color="#000"
                app:rb_radius="42dp"
                app:rb_rippleAmount="5"
                app:rb_type="strokeRipple"
                app:rb_strokeWidth="4dp"
                app:rb_duration="2000"
                app:rb_scale="1.5">

                <ImageView
                    android:id="@+id/startButton"
                    android:layout_width="84dp"
                    android:layout_height="84dp"
                    android:layout_centerInParent="true"
                    android:src="@drawable/start_button"/>
            </com.skyfishjy.library.RippleBackground>

Any idea why ?

Animation in Marshmallow devices got stuck

Animation works nice in below lolipop devices, but in marshmallow devices it show very slow animation and stuck(looks like hang) and then again start animation, then again little stuck and this way animation work in marshmallow device.

Change ripple source.

I'd like to change the ripple source to another area of the screen other than center. How would I go about doing this?

How to set Listener when Ripple ended?

hello Skyfishjy,
it is a beautiful ripple library thank you for made it.
I am trying to create a listener when the ripples ended, is there a way to figure it?

How to start the ripple from an angle

Hi I'm using your beatufil library on a button that is placed on the lower right angle of the screen: I would like to make the ripple start from that point, but on the contrary I tap on the button and the ripple always start from center..

Thanks a lot..

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.