Android How to enable writing In Arabic In EditText -


i have search box edit text. how can write arabic text return results. note : in english language edit text working fine , return results .

i got language text working in edittext creating own keyboard. here great tutorial creating own keyboard. in tricky part know ascii codes of language (arabic) characters. , once have them, use them in keyboard.xml.

after have use own keyboard in layout.

<android.inputmethodservice.keyboardview     android:id="@+id/keyboard_view"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_above="@+id/ads_include"     android:background="@color/colorkeyboardbackground"     android:focusable="true"     android:focusableintouchmode="true"     android:keybackground="@drawable/key_backgrounds"     android:keytextcolor="@color/colorprimarydark"     android:shadowradius="0.0"     android:visibility="gone" /> 

and map created keyboard on view as:

keyboard keyboard = new keyboard(mainactivity.this, r.xml.english_view); keyboardview.setkeyboard(keyboard); 

now set play own keyboard in edittext. , hiding system keyboard , showing yours use code:

  public void showcustomkeyboard(view v) {     keyboardview.setvisibility(view.visible);     keyboardview.setenabled(true);     if (v != null) {         ((inputmethodmanager) getsystemservice(activity.input_method_service))                 .hidesoftinputfromwindow(v.getwindowtoken(), 0);     } } 

here v edittext. chill!


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -