Dynamic data for Adapter attached to EditText

后端 未结 1 553
Happy的楠姐
Happy的楠姐 2021-02-11 06:05

Is there a way to attach dynamic adapter to EditText?

What I want is - when a key is pressed on EditText, my code to do a search in (some) custom store and provide sugge

1条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-11 06:39

    I found the solution and posted the answer to this question.

    Write a custom SimpleCursorAdapter. Override runQueryOnBackgroundThread() method and return a new MatrixCursor based on the input contraint. Associate this adapter to the autocomplete editbox.

    I got the hint for this answer @ http://thinkandroid.wordpress.com/2010/01/11/custom-cursoradapters/

    0 讨论(0)
提交回复
热议问题