简体   繁体   中英

Flex Mobile Project: List

I am developing a mobile application in which I want to use a list which contains 400 rows. I got data from Sqlite database. When I run the application and click the button for the list, the list view is loading so slowly and takes about 45 seconds. I also tried getting data from an arraycollection inside the application but I had same problem. Is this normal? Any idea or advice for this issue?

                    sqlStat.text="SELECT City FROM Cities";
                    sqlStat.execute();
                    dataArray=sqlStat.getResult().data;

                    appModel=AppModel.getInstance();

                    if(appModel.cities == null)
                    {
                        appModel.cities = new ArrayCollection();
                        var obj:Object;
                        for( var i:int=0; i<dataArray.length; i++ )
                        {
                            obj = new Object();
                            obj.Name = dataArray[i].City

                            appModel.cities.addItem(obj);

                        }
                    myList.dataProvider=appModel.cities;    
                    }

The OP wrote:

I solved my problem. ListForm component causes renderer problem. I used List component instead of that and created arrayCollection dataprovider for my list inside my class. It works faster than previous.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM