surface.setSize() and setResizable() do not exist in Android mode. How to resize the sketch dynamic?

edited April 15 in Android Mode

In Android mode . surface.setSize()and surface.setResizable(true) do not exist..

How can I resize the sketch dynamically (Android mode)?

Thanks in advance

Unbenannt Wenn I rotate the screen, the live wallpaper does not update its size. like the pic above

Answers

  • @TrW236===

    can you put the code you are using in setup()?

  • edited April 15

    @akenaton

        public void setup(){
            canvas = createGraphics(WIDTH,HEIGHT);
            backgImg = loadImage("darkblue.png");   
            numCir = 20;
            noStroke();
            circles = new ArrayList<Circle>(numCir);
            backgColor = color(20,20,100);
            background(backgColor);
            fillCircles();
        }
    

    and

        public void settings() {
            fullScreen();
        }
    
  • edited April 15

    What are the values of WIDTH and HEIGHT? Are those values that you defined ?

    Kf

  • edited April 15

    @kfrajer yes I just draw on a smaller PGraphics, and stretch it like image(myPGrachics,0,0,displayWidth, displayHeight)

    And I just downgraded the version von Android-mode (from the newest v260 to v258). and the problem doesnt exist now. So I think its a new bug in the newest lib.

  • edited April 15

    @TrW236=== SAME QUESTION AS KFRAJER// because that is the problem, i think (and that is the reason i have asked for setup): your background color is not all (see your screen capture) blue: so, that means that after setup you are putting your PGraphics as an image with precise values.

Sign In or Register to comment.