Answer the question
In order to leave comments, you need to log in
EditText is not responding to any events why?
There is an EditText, I want to catch at least some event, but the reaction is zero.
<EditText
android:id="@+id/etSelectCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Город"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/gvPhotos" />
// город
EditText etCity = (EditText)findViewById(R.id.etSelectCity);
//adSellerName = etSellerName.getText().toString();
etCity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d(TAG, "ddddddddd");
Toast.makeText(getBaseContext(), "1",Toast.LENGTH_SHORT).show();
}
});
Answer the question
In order to leave comments, you need to log in
Use the addTextChangedListener method
Example: dolbodub.blogspot.com/2013/03/edittext.html?m=1
Well, as usual. Problem solved. Simply the event handler was hung up on pushing of the button. I accidentally put it there and did not notice.)) Thank you all!))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question