EditText Hint doesn't appear in Arabic on Galaxy note 1 with Android ICS

后端 未结 2 1885
半阙折子戏
半阙折子戏 2021-01-20 11:02

I have an arabic hint in which I want to set in EditText that I am using in Dialog... it worked fine for many devices except Galaxy note 1 which has Android ICS.

2条回答
  •  佛祖请我去吃肉
    2021-01-20 12:02

    I too have issues with Arabic hint and 4.0 devices. problem was inputType and single line attributes. You have to remove android:lines="1" and add key listener in code.

    I solved by,

               
    
                
                
            
    

    and in code...

    et_email.setOnKeyListener(new OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event)
            {
    
                if (event.getAction() == KeyEvent.ACTION_DOWN
                        && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)
                {
                    et_email.clearFocus();
                    et_phno.requestFocus();
                    return true;
                } 
    
                return false;
            }
        });
    

提交回复
热议问题