Git Product home page Git Product logo

Comments (12)

MatteoBattilana avatar MatteoBattilana commented on May 11, 2024 1

@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.

MatteoBattilana avatar MatteoBattilana commented on May 11, 2024

@aboutgaurav
Thank you for being interested in WeatherView library.
I will investigate about this strange bug. Can you provide me your code?

from weatherview.

aboutgaurav avatar aboutgaurav commented on May 11, 2024

@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.

AvneeshKhanna avatar AvneeshKhanna commented on May 11, 2024

Facing the same bug. Especially, in rain mode, the rain doesn't appear in screenshots. Works fine in snow mode.

@MatteoBattilana

from weatherview.

magneticflux- avatar magneticflux- commented on May 11, 2024

@aboutgaurav @AvneeshKhanna
Could you provide the versions of Android, Android Support libraries, and WeatherView you are using?

from weatherview.

aboutgaurav avatar aboutgaurav commented on May 11, 2024

Android version: Jelly Bean (4.3.1)
Support Library: 26.1.0
WeatherView : 2.0.3

from weatherview.

magneticflux- avatar magneticflux- commented on May 11, 2024

I'm unable to reproduce this on an Android 4.3.1 emulator. What model of phone are you using to test?

from weatherview.

aboutgaurav avatar aboutgaurav commented on May 11, 2024

Tested on following devices:
-HM 1s xiaomi
-OnePlus 3t
-OnePlus 5

And i am using above mentioned code to take the screenshot.

from weatherview.

magneticflux- avatar magneticflux- commented on May 11, 2024

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.

aboutgaurav avatar aboutgaurav commented on May 11, 2024

@magneticflux-
Thanks for the effort.
Let me know when you fix this.

from weatherview.

magneticflux- avatar magneticflux- commented on May 11, 2024

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.

aboutgaurav avatar aboutgaurav commented on May 11, 2024

Thanks

from weatherview.

Related Issues (17)

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.