Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mobile Android virtual keyboard has white characters on white background

Discussion in '5.4 Beta' started by tkoknordic, Apr 5, 2016.

  1. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    I just noticed that my virtual keyboard doesn't show characters on Android's virtual keyboard. A text appears to inputfield in a game view but native virtual keyboard's own field is blank.

    I can select the text in the field and see that it's there, but it's white. White characters are hard to see on white background :). I didn't find any setting where to setup this color in Unity engine. Do you have this same issue or is it just me? And do you have a workaround?
     
    kg and MrEsquire like this.
  2. Alex-Lian

    Alex-Lian

    Guest

    Which build? Bug # ?
     
  3. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6
    Same issue:
    Unity 5.3.4f1 and Unity 5.4.0b11
    Please if you have any solution share with me.
     
  4. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6
    Try build your project with Unity 5.3.2.f1 it workes for me now.
     
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    So bug is not present in older version of Unity but is in newer?
     
  6. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    Hi, yes this worked in Unity 5.3, but now with 5.4b13 I have this issue. I have build the game with os x and windows versions of Unity. I haven't report this bug because I didn't know if I was causing this by my self.
    Have you reported this bug?
     
  7. Yaken

    Yaken

    Joined:
    Apr 6, 2016
    Posts:
    6
    No, I didn't reported yet because, only appears in the latest unity builds, ( > 5.3.2) and only in Android.
    I didn't know if I was causing this by my self with the following actions:

    I have an another bug with the inputField:
    If I set the "Hide Mobile Input" property to True, then nothing happen on Andoid devices.
    The mobile input field on virtual keyboard shall continue to appear. I want to hide it and it works on iOS devices.
    But somehow not on Android.

    I will report this bug to Unity if we are done with our project. (we have a strict deadline)
     
  8. kg

    kg

    Joined:
    Jan 6, 2013
    Posts:
    3
    +1 to this, same issue on 5.3.4f1 builds for Android; going to try downgrading to 5.3.1 to see if that helps.

    Edit: 5.3.1f1 builds my project without this problem
     
    Last edited: Apr 6, 2016
    Yaken likes this.
  9. Andres10

    Andres10

    Joined:
    Feb 24, 2016
    Posts:
    2
    We are having the same issue (white text font over white background on input fields in Android devices) since upgrading to Unity 5.3.4f1. It wasn't happening on 5.3.1p1.
    Did someone open a bug for this already? We need to get an urgent fix or we'll need to downgrade! Thanks
     
  10. Deleted User

    Deleted User

    Guest

    By any chance, have you guys messed with the AndroidManifest? Because I've had the same issue and found out it only occurs in 5.3.4f1 projects where I've changed it in some way.
     
    tkoknordic likes this.
  11. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    I have multiple plugins that edits it. I will try reseting it somehow and see if it does some good. Thanks for pointing this out!
     
  12. Alex-Lian

    Alex-Lian

    Guest

    Is there a bug here I still need to track here? Would love a bug report # if so.
     
  13. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    Finally I had time to focus on this. I found the solution! I checked differences between Unity's orginal androidmanifest.xml and my own. There was android:theme missing and after I added that it worked!

    Code (CSharp):
    1. My androidmanifest:
    2. <application
    3.         android:icon="@drawable/app_icon"
    4.         android:label="@string/app_name" >
    5.  
    6. And after it was fixed
    7. <application
    8.     android:theme="@style/UnityThemeSelector"
    9.         android:icon="@drawable/app_icon"
    10.         android:label="@string/app_name" >
     
  14. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Nice find, so is this valid Unity bug or something within your project changed manifest?
     
  15. tkoknordic

    tkoknordic

    Joined:
    Jan 31, 2013
    Posts:
    93
    I think it's not a bug but it was one plugin that did it.
     
    MrEsquire likes this.
  16. Andres10

    Andres10

    Joined:
    Feb 24, 2016
    Posts:
    2
    Thanks for sharing the solution! It solved the issue for us as well. In case it helps anyone, we found an article that shows how to see the androidmanifest.xml generated by Unity after compilation.
     
    tkoknordic likes this.
  17. AragornSG

    AragornSG

    Joined:
    Jul 17, 2015
    Posts:
    2
    Does anyone know why would build crash after adding the android:theme="@StyLe/UnityThemeSelector"
    I'm getting the error: CommandInvokationFailure: Failed to re-package resources.

    Line I'm editing: <application android:icon="@drawable/app_icon" android:label="@String/app_name" android:debuggable="true">
    Line after editing: <application android:icon="@drawable/app_icon" android:label="@String/app_name" android:debuggable="true" android:theme="@StyLe/UnityThemeSelector">
     
  18. AragornSG

    AragornSG

    Joined:
    Jul 17, 2015
    Posts:
    2
    I managed to fix this, maybe someone will find it useful.
    I replaced the line edited by myself with the one copied from Unity template, which seemed to have exactly the same properties, but for whatever reason worked:
    <application
    android:theme="@StyLe/UnityThemeSelector"
    android:icon="@drawable/app_icon"
    android:label="@String/app_name"
    android:debuggable="true">
     
    tkoknordic likes this.