Image not refreshed

I have a bitmap as a background image inside an overlap group. I have a folder on my phone containing about 20 images under the main Kustom app folder. I have set up a flow that gets triggered manually to randomly pick an image from the folder and set it into a global var. The background bitmap is set to that global variable. The flow is triggered on tap of button on the main page.
The flow works fine. When I press the button it changes the global var to a new random image, but often times the main background image doesn’t refresh. It’s stuck on the old image.
I noticed that it would load the new backgound image after I press another button that triggers an animation on that background group. Otherwise, it doesn’t change.
It also works for a short while if I clear the klwp cache. But after a short while, it’s back again.

Also noticed that my clock in a different group sometimes isn’t update unless I interact with something on the screen.

I’m on version 3.8 on galaxy s25 ultra.

@Viet001 :

Hi there,

I tried to create a KLWP preset based on your description here. The result is the background image is always changed by the trigger.

Screencast: TIP • Random Background

If it is not the same as yours, please share some screenshots of your KLWP preset with us so that we can help you troubleshoot the issue.

You can upload/attach the screenshot cukes here, or alternatively you can upload them to your Google Drive and share them with us here.

I hope this would help.
Did you find the most helpful response to your issue?
Please kindly press the :check_box_with_check: Solution button to mark it as the solution.
This would help others with the similar issue.

:smiling_face::+1:

Here’s a link to 2 videos _ one showing the problem and the other showing the setup.

Vids

1 Like

Hi @Viet001 ,

I would suggest the following things to achieve something similar to your preset.

  1. Set the background of the preset (the Background tab) to: image (from global variable)
  2. Create a Shape object for the blurry panel.

VoCo 250828-001

I hope this would help.
:smiling_face::+1:

But wouldn’t that mean I would lose the transition background animation?

Hmm…

What did you mean by transition background animation?

I meant how do you add any animation on the background image if you set the background under the Background tab as suggested?
The way I have it now (as can be seen in the video), the background image scales in slightly when I open one of the pages (music, calendar, news..).

Hi there,

I tried again to make another preset that hopefully similar to your preset.

TIP • Random Background 002

Is that what you expect?

The main issue is that when I press the button to load a new random image, the image doesn’t update right away. Instead, the new background only appears after I interact with something else (like opening another page such as Music or Calendar) and then return to the main page. Ideally, the background should change immediately when I press the button, but it doesn’t.

What’s odd is that this doesn’t happen consistently. If I load a preset and save it, the background refresh works correctly for the first 5–10 image changes. After that, the problem starts again.

I’m thinking about trying the approach you showed in your latest video, though I’m not sure exactly what settings you used there.

Hi @Viet001 ,

I simply create these 2 Overlap Group objects:

  • Background ➞ a container for a Shape object with zoomed in/out animation.
  • Blurred Background ➞ a container for a Shape object with zoomed in/out animation.

The difference between those 2 Overlap Groups is that in the Blurred Background, the texture of the Shape object is set to blur at 60%.

Also, add a Shape object for the masking for the Blurred Background.

I hope this would help.
:smiling_face: :+1:

I tried that. I now have a separate group for the background and moved the blur image into its own group. Now, the background image refreshes properly on trigger. However, the blur image doesn’t refresh :(. So I think the issue has always been with the blur image. Not sure if it has anything to do with having too many images in the folder (~15), or perhaps something to do with the sizes of the images? I don’t know anymore.

But then, also a simple thing such as a clock on the screen is also not refreshing properly. See the video capture in this link. It’s over an hour behind the actual time. It only updates after I trigger some animation.

Hi there,

The number of image files does not have big performance impact of the preset. But the image size kind of has the impact, the bigger the image file size, the longer it loads.

In regards to the clock, I would suggest you too check the Timezone settings on your editor.

Also, check the selected timezone on the objects/elements that has timezone setting (check the TZone property on the Layer tab) like: Overlap Group, Stack Group, and Komponent. It might be possible that somehow the timezone is different.

Usually, the time difference is caused by indirect timezone.

I hope this would help.
:smiling_face::+1:

If you would like me to check your preset, you can share your preset with me in private.

I’ll check it and once it’s solved, I will delete the preset file.

:smiling_face::+1:

How do I share with you in private?

Hi there,

You can upload your file to your Google Drive, then share it with me.

:smiling_face::+1:

Ok. I sent it to you.
You’d need to have a folder in
/Kustom/Pictures/Home with all the images. I have about 15 or so images. They’re about 1-2Mb each.

The problem seems to have gone away, at least for the time. Not exactly sure why. The only thing I changed was with a color picker formula for a gradient shape sitting on top of the blur image. I’ll send to you if it comes back for some reason.