Merge pull request #9000 from osmandapp/FixAutoCompleteTextViewCrash

Fix AutoCompleteTextView crashes
This commit is contained in:
vshcherb 2020-05-19 15:30:56 +02:00 committed by GitHub
commit 4a7f662752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 24 deletions

View file

@ -95,12 +95,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
app:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
app:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:importantForAutofill="noExcludeDescendants"
android:imeOptions="actionSend"
android:inputType="text"
tools:text="@string/lorem_ipsum"
android:drawableEnd="@drawable/ic_action_arrow_drop_down" />
tools:text="@string/lorem_ipsum" />
</com.google.android.material.textfield.TextInputLayout>

View file

@ -169,9 +169,9 @@
android:layout_marginLeft="@dimen/content_padding_half"
android:layout_marginRight="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding_half"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
app:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
app:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:editable="false"
android:drawableEnd="@drawable/ic_action_arrow_drop_down"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding_half" />

View file

@ -195,11 +195,11 @@
android:layout_marginTop="@dimen/content_padding_half"
android:focusable="false"
android:text="@string/shared_string_favorites"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
osmand:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
osmand:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:editable="false"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding_half"
android:drawableEnd="@drawable/ic_action_arrow_drop_down" />
android:layout_marginStart="@dimen/content_padding_half" />
</LinearLayout>

View file

@ -194,12 +194,12 @@
android:layout_marginRight="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding_half"
android:focusable="false"
osmand:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
osmand:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:text="@string/shared_string_favorites"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
android:editable="false"
android:layout_marginStart="@dimen/content_padding_half"
android:layout_marginEnd="@dimen/content_padding"
android:drawableEnd="@drawable/ic_action_arrow_drop_down" />
android:layout_marginEnd="@dimen/content_padding" />
</LinearLayout>

View file

@ -89,14 +89,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:drawableTint="@color/osmand_orange"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
osmand:drawableTint="@color/osmand_orange"
osmand:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
osmand:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:hint="@string/poi_dialog_poi_type"
android:imeOptions="actionSend"
android:inputType="text"
android:layout_marginLeft="-4dp"
tools:text="@string/lorem_ipsum"
android:drawableEnd="@drawable/ic_action_arrow_drop_down"
android:layout_marginStart="-4dp" />
</com.google.android.material.textfield.TextInputLayout>

View file

@ -179,14 +179,14 @@
android:id="@+id/selectCountryEdit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_action_arrow_drop_down"
app:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
app:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
android:editable="false"
android:paddingLeft="2dp"
android:paddingRight="0dp"
android:text="Ukraine"
android:paddingStart="2dp"
android:paddingEnd="0dp"
android:drawableEnd="@drawable/ic_action_arrow_drop_down" />
android:paddingEnd="0dp" />
<TextView
android:layout_width="match_parent"

View file

@ -7,7 +7,7 @@ import android.os.Build;
import android.util.AttributeSet;
import android.widget.AutoCompleteTextView;
public class AutoCompleteTextViewEx extends AutoCompleteTextView {
public class AutoCompleteTextViewEx extends androidx.appcompat.widget.AppCompatAutoCompleteTextView {
public AutoCompleteTextViewEx(Context context) {
super(context);
}
@ -20,12 +20,6 @@ public class AutoCompleteTextViewEx extends AutoCompleteTextView {
super(context, attrs, defStyleAttr);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public AutoCompleteTextViewEx(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public boolean enoughToFilter() {
return true;