0

I am creating a Worklight-based Hybrid application with the Android environment.

I have two problems:

  1. The keyboard in a smartphone and tablet; Once it vanishes there is some delay until it truely disappears - there is some white background...

    Full size image: http://www.tiikoni.com/tis/view/?id=fe716e8 enter image description here

  2. The border of a text input field looks differently in each device even though the CSS is the same one.

    Full size image: http://www.tiikoni.com/tis/view/?id=a7333a7 enter image description here

Source code snippets:

Community
  • 1
  • 1
Smiderle
  • 447
  • 4
  • 12

1 Answers1

1

Regarding issue #1:

I ran my test application in:

  • Google Nexus "5 (Android 4.4), Google Nexus "10 (Android 4.3)

    In these devices I could not recreate the "delayed white residue" (by showing the keyboard and then sliding it off)

  • Samsung Galaxy Tab 1 "7 (Android 2.2), Android Emulator (2.x, 4.x)

    In these devices I managed to recreate it

IMO this issue seems to happen due to the device specifications. Yours may just be too slow... The users will need to endure the 1s or so until the white area gets repainted.


Regarding issue #2:

  1. To disable the focus ring surrounding the input fields, add the following to the input CSS:

    /* Deals with Android 4.x */
    outline: none;
    
    /* Deals with Android 2.x */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent; /* For some other Androids */
    
  2. To display the same green-colored input fields in both Android OS 2.x and 4.x I have added the following to the input CSS:

    background-color: #00CD9A;

    Note: In Android 2.x the OS adds a layer on top of password type input fields and so these will lose their styling when focused: Input has different style on focus

The full CSS for input:

input {
    -webkit-border-radius:8px;     
    font-size: 30px;
    font-family: calibri, sans-serif;

    /* Idan: To remove the focus rings: */
    outline: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;

    /* Idan: Background color for the input fields: */
    background-color: #00CD9A; 
}   

enter image description here

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Unfortunately it did not work in Galaxy Tab (Android 4.0.3), in which is the main device that our customers will use. Regardless if the field is a type=password or type=text , is always adds a layer on input field; – Smiderle Jan 07 '14 at 11:52
  • @LDerle Unfortunatly this seems to be an Android bug: https://code.google.com/p/android/issues/detail?id=24746 – Idan Adar Jan 08 '14 at 05:45