Question

I create a view like below image in my monodroid application with code. While every thing is right when I test the app in android 4.1 but when I test it on the android 4.3 and 4.4.2 I faced with below screen. I do not test it on the android 4.2

In the textviews any numbers are not showing. It looks that I typed space. Also about some letters. What is wrong?! What has been changed in the android 4.3 + ?

enter image description here

Was it helpful?

Solution

There is still space for the letters, so perhaps it's an issue with the styling.

Change the style to default, do the letters show up?

Try adding a shadow to the textviews and see if the shadow exists (maybe the letters are somehow transparent, or the same color as the background?)

OTHER TIPS

by referring to @ArieDov comment I post this answer:

Below method that I used caused the problem:

public static void AddShadowEffect (TextView textview)
    {
        try {
            if(RltXmlSettings.Instance.getVal ("shadow_enabled")=="1")
            {
              float[] direction = new float[] {0.3f, -1.0f, 0.0f};
              MaskFilter filter = new EmbossMaskFilter (direction, 0.8f, 15f, 5f);
              textview.Paint.SetMaskFilter (filter);
              textview.Invalidate ();
            }
        } catch (Exception ex) {
            RltLog.HandleException (ex);
        }
    }

the purpose of this method was adding the shadows you see in the question image. and I fixed the problem by changing the style of textviews just like what @Matt said. I used below code for my textviews:

txtlName.SetTypeface (null, TypefaceStyle.Bold);

and this fixed my problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top