Enter the information we want to enter in the input box and there will be other hints associated with it, which is implemented in Android using Autocompletetextview.
<autocompletetextview android:layout_width= "Match_parent" android:layout_height = "Wrap_content" android:id/>
PublicClass MainactivityExtendsActivity {private Autocompletetextview Autotext;private arrayadapter<string> Arrayadapter; @Override protected voidsuper.oncreate ( Savedinstancestate); Setcontentview (r.layout.test); AutoText = (Autocompletetextview) Findviewbyid (R.id.autotext); String [] arr={"AA", "AaB", "AAC" new Arrayadapter<string> (this Android. R.layout.simple_list_item_1,arr); Autotext.setadapter (Arrayadapter); }}
Autocompletetextview Common Properties |
Android:completionhint |
Set the prompt title that appears in the drop-down menu |
Android:completionthreshold |
Set how many characters the user will enter at least to display a prompt |
Android:dropdownhorizontaloffset |
The drop-down menu is offset horizontally between the text boxes. The default is left-aligned with the text box |
Android:dropdownheight |
The height of the drop-down menu |
Android:dropdownwidth |
The width of the drop-down menu |
Android:singleline |
Single-line display |
Android:dropdownverticaloffset |
Vertical offset |
Related articles:
Control Autocompletetextview Client Save search History auto Prompt
Android: Control Autocompletetextview Auto Prompt