When i launch app on mobile then initially numbers are visible?

if my code 100% correct

my designer screen, numbers are invisible then why when i launch app on mobile then initially numbers are visible?

background color and text color are also same

check button 1 designer and block view check color and suggest me why when i launch app on mobile then initially numbers are visible?

provide me final and valid solution





Thanks for the details and the screenshot of the blocks. Based on your issue and the context:

:warning: Issue Recap:

  • You are making a memory card game using Kodular.
  • On app launch, numbers (or card values) that should be invisible or hidden initially are visible briefly.
  • Even though in the Designer screen:
    • You’ve set Text Color = Background Color.
    • Components (like buttons/cards) are supposed to hide the values.
  • You’re using logic in the Button1.Click event to reveal and check card values.

:white_check_mark: Root Cause of the Problem:

This is a timing issue:

When the app first loads, the default button text is already visible before your blocks or initialization logic run. Kodular renders UI before your code starts running.

This means:

  • Even if you set TextColor = BackgroundColor, some phones may briefly render the default button text (e.g., “1”, “2”, “3”, etc.).
  • The hiding logic in your blocks only runs after user interaction or after initialization, causing a flicker or flash of visible numbers.

:white_check_mark: Final Valid Solution:

You need to explicitly hide or reset all button texts at screen initialization.

:wrench: Modify your Screen.Initialize block:

Add this code to it:

when Screen1.Initialize
do
   set Button1.Text to ""
   set Button2.Text to ""
   set Button3.Text to ""
   ...
   set ButtonN.Text to ""

Or, if you’re using dynamic card values:

  • Initialize a loop to hide all button texts using a list or naming convention.

Also, ensure:

  • Button.Enabled = true
  • Button.TextColor = same as BackgroundColor (as you already did)
  • Button.Text = "" (very important)

IF helpful mark as solution

Thank you for the reply. My code already assigns the numbers to the Button.Text property in the Screen1.Initialize block. I cannot set the Text to empty, because my game’s logic needs to read that number to check for matches.

My Designer properties also have the TextColor and BackgroundColor set to the exact same value.

Even with this correct setup, the numbers are still visible on my device when the app launches. This seems to be a rendering bug. Is there another solution?

Hmm, since I’ve never heard of this error, try using a CardView with a label inside instead of the button.
Try just one and let me know if it works for you.

(I know it’s not a solution to the problem)

1 Like

Thank you so much for the suggestion!

I can confirm that replacing the Button with a CardView and a Label has solved the problem.

I set the CardView’s BackgroundColor and the Label’s TextColor to be the same, and now the number is correctly hidden when the app starts. This is a great workaround for the bug with the Button component.

Thank you again for your help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.