Reputation: 49
Quite annoying, that my google place working only if user did double click .
Why it is happening?
My code, where place picker initialized
etLocationD.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// findPlace();
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
try {
startActivityForResult(builder.build(getActivity()), 101);
} catch (Exception e) {
// TODO: Handle the error.
}
}
});
My .xml VIEW
<com.easyjob.meistars.utils.InputFieldView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<com.easyjob.meistars.utils.CustomEditText
android:id="@+id/etLocationD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_placeholder"
android:hint="@string/your_location"
android:editable="false"
android:singleLine="true"
android:text="" />
</com.easyjob.meistars.utils.InputFieldView>
On application user must click double on field to get place picker opened.
When place is selected and If user staying in the same view, he can change his location by doing only 1 click - this flow is OK.
But if he leaves this VIEW and go back to change location, then again ... double click :(
What Did i wrong?
Thank you!
Upvotes: 1
Views: 38
Reputation: 295
Just try adding this property to your EditText
android:focusableInTouchMode="false"
Upvotes: 1