Android custom control Series 5: Custom colorful water ripple effects, android water ripple
Respect originality! Reprinted please indicate the source: http://blog.csdn.net/cyp331203/article/details/41114551
Today, we use Android custom controls to achieve an interesting eff
In the previous article we talked about the custom ripple water ripple effect, first to review the effect it!After watching the feeling there is no problem, I feel very satisfied at the beginning, then, we take the Android 5.0 comes with the effect to compareHave you found a different place? Click in the middle of the time is not see what the difference, but clic
Android released the preview version of Android m last week. But presumably Android5.0 a lot of cool effects, most developers have not used, that is not to say the majority of users.This article describes one of the cool effects in Android5.0, click on the Water Ripple Diffusion effect (Ripple Effect).The implementatio
This year's Spring Festival party did not see the fun, was paid to add an episode of treasure, friends are in that number of time to stop a thump, wow, I'm a professional blessing, impossible, haha. So what is the function of the performance based on how the program code is implemented? The following cloud-Habitat Community Small series to share this tutorial to help you learn the Android ripple spread effe
Android has added a ripple effect to the button by default in version 5.0, and it can be easily implemented on other controls. Ripple effects can be divided into two types, one with the boundary ripples, the other with no boundary ripples. The so-called boundary, that is, the effect of ripples will not exceed the size of the control, another borderless effect, th
Android custom control: Android L control click the implementation of water ripple (source code + Demo), androiddemo
Implementation idea comes fromSingwhatiwanna
Http://blog.csdn.net/singwhatiwanna/article/details/42614953
Demo:
I. Control Process:
The general principle is as follows: You can draw pictures by yourself if there are some deviations.
RevealLayout
ontouchevent to receive. If the ontouchevent passed to the top also returns false, the event "disappears" and the next event is not received. 3. Why use GETRAWX and Getrawy to obtain coordinates in dispatchtouchevent ()Getx and gety get the coordinates relative to the clicked view, and Getrawx gets the coordinates relative to the screen. And we want to see the ripple effect of water, should be from the screen relative to the point is clicked to diffu
. * * public class Waveview extends View {private float Minitialradius;/////Initial ripple radius private float mmaxradiusrate = 0.85f;//
If Mmaxradius is not set, Mmaxradius = Minimum length * mmaxradiusrate; private float Mmaxradius; Maximum ripple radius private long mduration = 2000; A ripple from creation to vanishing duration private int mspeed = 500;
is achieved by changing the offset, the specific code in the Startloading () method, where the use of Porterduffxfermode mode.xor or, According to the name, it is shown that the part is not intersected, and the purpose is to remove the water ripple in the SAG;2. Combination of water ripples and prototype backgroundsHere is the mode.src_atop in Porterduffxfermode, which shows the portion of the layer below which intersects the layer below (the Blue wa
In some music applications, often show the ups and downs of the ripple information, these ripple image to convey the voice information, can enhance the user experience, then how to achieve it? You can use the visualizer class to get the currently playing sound information and draw it on the canvas, using a ripple display. Let me explain how to use it.
Main
(1
Not much to say, we first look at the effect:
Hi Predecessors Search Preview
This is the "Hi Seniors" Search Preview, where you can download the app to see more results:
Http://www.wandoujia.com/apps/com.superlity.hiqianbei
Lsearchview
This is a MD-style search box that integrates ripple animations and search loading, and it's easy to use if you need a search control like this: Https://github.com/o
1. Under the drawable file, create a new seletor, as the background of the button, here I use the shape of two rounded cornersXML version= "1.0" encoding= "Utf-8"?>selectorxmlns:android= "Http://schemas.android.com/apk/res/android">Itemandroid:drawable= "@drawable/shape_btn_cycle_normal"/> Itemandroid:state_pressed= "true"android:drawable= "@drawable/shape_btn_cycle_press"/>selector>Shape_btn_cycle_normalXML version= "1.0" encoding= "Utf-8"?>Shapex
be in rect rect = Region.getbounds (); LOG.I ("Wangjitao", "right:" + Rect.right + ", Top:" + rect.bottom); if (Rect.top The effect is as follows: OK, now our coordinates are exactly right, no problem, fix it.In fact, there is a better extension of the small effect, as follows:1, provide just came in when the swollen effect 2, the ship's water ripple when the direction of the ship with the
Android custom component series [14]-Android5.0 button ripple effect, androidandroid5.0
Today, instructor Ren published an article about the ripple effect pressed by the button in Android5.0 to achieve the "Implementation of Water ripple click effect in Android L". Out of cu
Water-like ripple ball progress bar Controller, Android to achieve high-end atmosphere of the mainstream special effects for everyone to reference, the specific content as follows
Effect Chart:
Circleview
This is mainly the realization of center circle and water wave effect
Package Com.lgl.circleview;
Import Android.content.Context;
Import Android.graphics.Canvas;
Import Android.graphics.Color;
Im
, Height/2, Width/2, Circlepaint); The following operations are done in this circular canvas//change the starting coordinates based on progressY-Value StartPoint. y = (int) (Height-(Progress/100.0 * height)); Origin Path. MoveTo (StartPoint. x, StartPoint. Y); Int J =1; Looping a sinusoidal loop once for half a period for (int i =1; I 2 = =0) {Path. Quadto (StartPoint. x + (Cycle * j), StartPoint. Y + waveheight, StartPoint. x + (Cycle *2) * I, StartPoint. Y); } else {Path. Quadto (StartPoint. x
Today, the teacher published an article about the Android5.0 button Press ripple effect realization of "Android l water Ripple Click effect Realization", out of curiosity i downloaded the source code to see the effect, just have a Nexus mobile phone, I have a practical effect to see a bit, Find some places and the actual effect slightly different, refer to the te
Android special effect album (10)-click the ripple effect to achieve clear logic and simple implementationAndroid special effect album (10)-click the ripple effect to achieve clear logic and simple implementation
What I did this time is a bit similar to the previous article, that is, using simple logic to implement some interesting special effects. Recently, I
Look at the effect chart first.
In fact, to achieve this effect is very simple, as long as drawable drawablev21 two folders is good.
Selector in ordinary circumstances:
The selector in V21:
Here ripple is the color pressed water ripple color, add one inside item , this item will become the background.
note that do not add transparent to item do the background, one is meani
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.