开发者

Switching to landscape orientation is slow

This is getting called in onCreate(), how can I speed up orientation switching?

private void 开发者_如何学运维setupChartView(int position){
            Quote myQuote = quotesAdapter.getItem(position);
            this.symbol = myQuote.getSymbol();

            String url = "http://chart.finance.yahoo.com/z?s=" + symbol + "&t=1d&q=l&l=on&z=l&p=s&a=v&p=s&lang=en-US&region=US";

            if(chartImageView != null)
                imageDownloader.download(url, chartImageView);

            if(chartImageViewLandscape != null)
                imageDownloader.download(url, chartImageViewLandscape);
        }


Don't download the same resources every time the orientation changes. Cache it!!!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜