android - Show all items in AutocompleteTextView without writing text -
I have an autoplaytextview and it works fine. When I write a word it shows relevant results, but I want to show all items without writing any words in AutoCompleteView. How can i do it
You need to expand the full text extension automatically,
< P> "When threshold is less than or equal to 0, the threshold of 1 applies."
Import android.content.Context; Import android.graphics.Rect; Import android.util.AttributeSet; Import android.widget.AutoCompleteTextView; Public Class InstantAutoComplete AutoCompleteTextView Extends {Public InstantAutoComplete {Reference Reference} {Super (Reference); } Public Instant Information (reference ARB0, AttributeSet arg1) {super (arg0, arg1); } Public Instant Complex (Reference ARB0, Attributaseat AGR1, Inti arg2) {Super (RG 0, AG1, AGR2); } @ Override public boolean tofilter () {back true; } @ Override Protected Zero to Focus Change (Boolean Focus, Int Direction, Reich First Focuserate) {super.onFocusChanged (Focus, Direction, First Focused); If (centered) {display fittings (getText (), 0); }}}
in xml
& lt; Autocomplete reader view ... /> Your & lt; Your.namespace.InstantAutoComplete ... />
1 Edit
Create a new class named InstantAutupplet and then put this code into the class.
Use this class in your layout xml like
Then find this widget in your activity (on cret method).
Comments
Post a Comment