I have made a EditText
clickable, and I in the Java class I made this private void:
private void incaseofclick() {
EditText Ct=(EditText) findViewById(R.id.CODIGOnumero);//The EditText
Ct.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(getApplicationContext(),R.string.INDICA3, Toast.LENGTH_LONG).show();//
}
});
}
... The problem is that, in the emulator, I have to press twice(EditText
) for the toast to work, I want to know why, and how to fix it... Summarized: What I want is to press it once and the toast and the keyboard(Not a problem) to appear .
Why don't you do it just like this?
private void incaseofclick() {
Toast.makeText(getApplicationContext(),R.string.INDICA3, Toast.LENGTH_LONG).show();
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다