How to populate second AutoCompleteTextView based on the first AutoCompleteTextView Selection

百般思念 提交于 2019-12-02 09:01:00

I think SQLite is a key to solve your problem.

There are several options:

  1. Store your manufacturer and model list in SQLite.
  2. Store your manufacturer and model list in SQLite. Update using HTTP request on app launch alongside with other data.
  3. Store your manufacturer and model list in SQLite. Update using HTTP request on manufacturer select using timestamps to determine whether it really needs update.
  4. Update model list on manufacturer select using HTTP request.

Decision

  • First option if your list of manufacturer and model is not regularly updated on the website and could be updated with the app itself.
  • Second and third are viable if the list is updated regularly and you have huge amounts of data to be updated on each request.
  • Fourth one is ok, but it highly relies on server availability and connection speed, which could cause usability issues.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!