Fix AutoCompleteTextView crashes
This commit is contained in:
parent
fa34e31c0e
commit
f96866c450
7 changed files with 18 additions and 24 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue