2024-01-03 06:49 AM
Hi,
I'm looking at customising the circle progress.
I was able to add this as the background image
and added a single dot as the image to rotate.
Any idea on how to rotate the dots and make it disappear?
Solved! Go to Solution.
2024-01-16 05:16 AM
You are very welcome.
I think having two different circle progresses would be easier to handle. However, if you prefer to do it in code, you can use these two functions:
// To change the background
circleProgress.setBackground(touchgfx::Bitmap( /* Bitmap ID of the background */ ));
// To change the progress image
circleProgressPainter.setBitmap(touchgfx::Bitmap( /* Bitmap ID of the progress image */));
Keep in mind that you need to change the attributes of the progress to show it properly.
You can read more circle progress here .
I hope this helps
2024-01-09 03:06 AM
Hello @KNara.2 ,
There is a Progress Indicator example on TouchGFX which contains a circular indicator similar to the one you desire.
Please consider checking it for inspiration and if you still need help, don't hesitate to ask.
2024-01-15 09:50 PM
Thanks that was useful.
I'm looking at implementing a circle progress where in at the first iteration I have one background image and one progress image, in the next iteration I want to swap these two images.
Any leads on how this can be achieved?
Should I use 2 circle progress and call them in loop one after another?
Is there a feature called reverse for circle progress, just like the animated images have?
Please guide.
Thanks.
2024-01-16 05:16 AM
You are very welcome.
I think having two different circle progresses would be easier to handle. However, if you prefer to do it in code, you can use these two functions:
// To change the background
circleProgress.setBackground(touchgfx::Bitmap( /* Bitmap ID of the background */ ));
// To change the progress image
circleProgressPainter.setBitmap(touchgfx::Bitmap( /* Bitmap ID of the progress image */));
Keep in mind that you need to change the attributes of the progress to show it properly.
You can read more circle progress here .
I hope this helps
2024-01-18 07:00 AM - edited 2024-01-18 07:55 AM
Thanks for all the guidance @Mohammad MORADI ESFAHANIASL
I used touchgfx_printf() calls (needs <touchgfx/Utils.hpp>) and was able to debug in simulator.
Thanks again.
2024-01-18 09:42 PM
Hi @Mohammad MORADI ESFAHANIASL
There is a slight flicker that is seen when the images are swapped.
Any solution for this?
This is how my code looks
void Screen1View::setupScreen()
{
tickCounter = 0;
Screen1ViewBase::setupScreen();
flag = true;
}
2024-01-22 01:14 AM
I got the fix for flickering issue.
Posting the solution here, in the hope that it might help someone.
I used
circleProgress1.invalidate();
circleProgress1.invalidateContent();
and the flickering issue/redraw issue is fixed.
Thanks & Regards,
Keerthi.A.N
2024-01-25 03:25 AM - edited 2024-01-25 03:26 AM
You're very welcome :D
Glad to hear you got it working