开发者

Android: slow application

In my app there are 5 spinners, each populated with the contacts of the phone. When i run the app this main acitivity opens much slow than any other applications i have created. There is also a button that serves for saving the names selected in the spinners in shared preferences.

The code is just 570 lines long and the spinners contain only around 60-80 contacts. It was this slow when it was only arou开发者_如何转开发nd 300 lines, so i think it has something to do with the spinners. Strange, though.

Does anyone know why is it so slow?


Try using the tips described in this post


It turned out the problem was not with the spinners, it was with the query that fetched the contact names into the spinners. I fetched all data and I also used another query that slowed down the process independently of the number of lines in the code or the number of contacts in the phone. For anyone who is interested in the code (but it is specific), see this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜