skyfishjy / android-ripple-background Goto Github PK
View Code? Open in Web Editor NEWA beautiful ripple animation for your app
License: MIT License
A beautiful ripple animation for your app
License: MIT License
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
hi
I made a applicaion with android-ripple-background, and i have two questions.
best regards
Not working on samsung devices is any configuration needed.
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
Is it possible to use gradient color instead of a single solid color?
Hello, is there some way to do that?
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!
startRippleAnimation() 循环遍历 RippleView 销毁创建的view解决问题
Edges of ripples are so blur. Kindly tell me how to show sharp edges
Is there any way to stop animation smooth?
I want to place this animation to google map marker
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
The center circle where the ripple originates is pretty large and I'd like to make it smaller.
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.
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.
In some phone, after RippleBackground.stopRippleAnimation(), the rippleView still visible.
Is there a way to chande rb_color attribute not from xml?
Hi,
Can you support changing attributes programmatically.
Thanks
Hi, do you think is possible to resize the animation object when the screenSize change?
I tried multiple ways but I couldn't get exactly the diamond shape.
I am using
canvas.drawArc
method, but couldn't get the exact Diamond shape.
can't set app:rb_radius dynamically, please help.
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?
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.
Is it possible to show ripple animation during drag and drop ?
Hi,
I am just wondering something and wanna ask to you. Can this library be used on android version 4.0?
Thank you.
after you follow in README and follow step 1 and 2, there will be that error. what should i do
Hi friend,
please provide a scale parameter. we change set scale at run time.
my project requirement is reduce size of ripple on scroll .
@@ -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);
HTC evo 3D X515m android 4.0.3
The circle blink on this phone version, any idea why ?
I have a fragment that inflates the layout that contains a RippleBackground view in xml, and for OS version < 6.X the margins are flickering.
How can i control Radius by Code?
Hey thank you very much for this great library.
As anyone have an update on the issue with stroke width not changing?
thank you!
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.
hi, i change duration attribute to 8000 but animation speed not changed
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 not working on fresh app install on 4.0 devices. But when i kill the app and relaunch, animation works perfectly. This is really weird.
I need control rippleSpeed in code
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.
Ripple works in activity But does not work in Fragment.
please help me.
I'd like to change the ripple source to another area of the screen other than center. How would I go about doing this?
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?
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..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.