Sunday, 15 April 2012

android - Making AutoCompleteTextView Drop Down NOT Clickable -


I have a autocompletetextview where the user populates the type and drop down menu. In this situation, I am showing the user that the name of a particular item is used and is therefore not available for selection. I want to show drop-down but it is non-clickable? Is this possible?

This is not relevant but it receives data from the online database. I basically use the word "code">: + myString and it is the one that populates is.

Edit:

Here the adapter is:

  Arrayadapter & lt; String & gt; DataAdapter = New Arrayheader & lt; String & gt; (GetApplicationContext (), R.Let.Delog_DropDown_List, Itemlist); EtInsertAutoComplete.setAdapter (dataAdapter);    

I know that I am too late for this answer. But this will help you, for this, you have to implement the custom adapter by expanding the base adapter. Use the adapter.getItem (status) value using the AutocompleteTextview method performCompletion :

  Private void performCplepletion (see selectedView, Int position, long id) {if (pop is showing ()) {object selected item; If (position & lt; 0) {selectedItem = mPopup.getSelectedItem (); } Other {selectItem = mAdapter.getItem (status); // If we return empty to an adapter's getItem () method then it will be zero if (selected item == empty) {return; }}   

The dropdown item will be received by the following code,

  @ override public object muget (int position) {return item list.get (status ) GetName (); }   

To make it clickable simply return empty,

  @over्राइड सार्वजनिक ऑब्जेक्ट मिलीगेट {return status} {return null; }   

This will show a dropdown list but the item will not be clickable.

No comments:

Post a Comment