Android view.request focus -


despite, use xml codes:

android:focusable="true"  android:focusableintouchmode="true"  

or clear , request focus:

countedit1.clearfocus(); countedit1.requestfocus(); 

or in java set focusable:

view.setfocusableintouchmode(true); view.requestfocus(); 

or use input manager:

inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); etv1.requestfocus() imm.showsoftinput(etv1, inputmethodmanager.show_implicit); 

i didn't solution show input window again(it works first onclick). these relative code snippet:

 imagearama.setonclicklistener(new view.onclicklistener() {         public void onclick(view v) {             log.i("tago", "onclicktıklandı");             inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service);             etv1.requestfocus();             imm.showsoftinput(etv1, inputmethodmanager.show_implicit);             edittextayarla(etv1, imagesimge, logo, imagearama);         }     }); 

these backpressed codes :

 view view = getcurrentfocus();     inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service);     imm.hidesoftinputfromwindow(view.getwindowtoken(), 0);     view.clearfocus(); 

i want when user clicks "imagearama" button , input window opened.(it occurs first click)

relative xml code snippet :

<edittext             android:id="@+id/aramaalani"             android:layout_width="250dp"             android:layout_height="50dp"             android:textcolor="#33ff33"             android:background="#843221"             android:focusableintouchmode="true"             android:hint="aramak istedigini gir"             android:singleline="true"             /> 


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -