Comments (12)
@magneticflux-
The 1.1.2 confetti library release contains the pull request you opened time ago. Can you merge it and add the missing code?
from weatherview.
@aboutgaurav
Thank you for being interested in WeatherView library.
I will investigate about this strange bug. Can you provide me your code?
from weatherview.
@MatteoBattilana Thank you for quick response.
Snippet for screenshot:
for(int i = 0; i < 12; i++) {
frameLayout.setDrawingCacheEnabled(true)
Bitmap bm = frameLayout.getDrawingCache();
try {
File file = new File(Environment.getExternalStorageDirectory().getPath() +
"/Cread/Short/short_pic" + i + ".jpg");
file.getParentFile().mkdirs();
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
FileOutputStream out = new FileOutputStream(file);
bm.compress(Bitmap.CompressFormat.JPEG, 85, out);
out.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
//Disable drawing cache
frameLayout.setDrawingCacheEnabled(false);
}
Code for Snow and Rain animation:
//snow animation
whetherView.setWeatherData(PrecipType.SNOW);
//rain aniamtion
whetherView.setWeatherData(PrecipType.RAIN);
from weatherview.
Facing the same bug. Especially, in rain mode, the rain doesn't appear in screenshots. Works fine in snow mode.
from weatherview.
@aboutgaurav @AvneeshKhanna
Could you provide the versions of Android, Android Support libraries, and WeatherView you are using?
from weatherview.
Android version: Jelly Bean (4.3.1)
Support Library: 26.1.0
WeatherView : 2.0.3
from weatherview.
I'm unable to reproduce this on an Android 4.3.1 emulator. What model of phone are you using to test?
from weatherview.
Tested on following devices:
-HM 1s xiaomi
-OnePlus 3t
-OnePlus 5
And i am using above mentioned code to take the screenshot.
from weatherview.
I am able to reproduce this behavior. It appears that the motion blur effect is responsible. Because the motion blur effect is based on the previous onDraw
call, having it redraw instantly after a previous draw makes the raindrops have 0 length.
I'm working on a better method of rendering the particles with motion information.
from weatherview.
@magneticflux-
Thanks for the effort.
Let me know when you fix this.
from weatherview.
jinatonic/confetti#41 has been merged, so I'll update WeatherView with this fix as soon as they release a version that includes my contributions.
from weatherview.
Thanks
from weatherview.
Related Issues (17)
- Demo app doesn't run on API levels < 21 HOT 1
- Restore application ID
- Getting this error when include weather view in other activities xml. HOT 29
- [Library][Manifest] android:allowBackup="true" HOT 4
- Snowfall size HOT 4
- Improvement: add gravity HOT 6
- All blank HOT 3
- why did you switch from Leonids to Confetti? HOT 2
- Custom Rain or change droplet size? HOT 4
- No wiki and also no proper guide to how to use. HOT 4
- Add Java example into README HOT 1
- How to use in a Java Project HOT 1
- Memory will continue to rise HOT 3
- Bug with ViewPager2
- Use Gradle dependency on Leonids library HOT 3
- Abide by parent view clipping requests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weatherview.