मेरे कोड में, बटन के ऑनचच श्रोता को दो बार निकाल दिया जाता है। कृपया कोड के नीचे खोजें। मैं Google एपीआई 2.2 का उपयोग कर रहा हूं।एंड्रॉइड - टच श्रोता पर दो बार गोलीबारी
जावा फ़ाइल में कोड ....
submit_button = (Button)findViewById(R.id.submit);
submit_button .setOnTouchListener(new View.OnTouchListener()
{
public boolean onTouch(View arg0, MotionEvent arg1) {
int action=0;
if(action == MotionEvent.ACTION_DOWN)
{
startActivity(new Intent(First_Activity.this, Second_Activity.class));
finish();
}
return true;
}
});
कृपया मुझे इस मुद्दे को सुलझाने पर मदद करते हैं।
धन्यवाद यह काम किया। – Prem