【问题标题】:Fetching Images获取图像
【发布时间】:2011-06-16 11:44:02
【问题描述】:

在 Android 应用程序中 - 我正在发送这样的 Json 字符串

{"restarutant":{"name":"Chung Wah","photo":"http:\/\/i.imgur.com\/AnXB0.jpg","address":"93, 2ndc ross, GDP etx.","area":"Vylaikaval","city":"Bangalore","location":["13.015621","77.277531"],"phone":["9986377561","08023467969"],"rating":"4","cuisines":["Chinese","Korean"],"attributes":["smoking","parking","delivery"],"gallery":["http:\/\/i.imgur.com\/9THuR.jpg","http:\/\/i.imgur.com\/05Oon.jpg","http:\/\/i.imgur.com\/fPm96.jpg","http:\/\/i.imgur.com\/sICp4.jpg","http:\/\/i.imgur.com\/JP8mG.jpg"]}}

这是下面一个数组的结果(只是为了理解数组的格式)

    $restaurant = array('restarutant' => 
array('name' => 'Chung Wah', 
      'photo' => 'http://i.stack.imgur.com/AnXB0.jpg', 
      'address' => '93, 2ndc ross, GDP etx.', 
      'area' => 'Vylaikaval', 
      'city' => 'Bangalore', 
      'location' => array('13.015621', '77.277531'),
      'phone' => array('9986377561', '08023467969'), 
      'rating' => '4', 
      'cuisines' => array('Chinese', 'Korean'), 
      'attributes' => array('smoking', 'parking', 'delivery'),
      'gallery' => array('http://i.stack.imgur.com/9THuR.jpg', 
                         'http://i.stack.imgur.com/05Oon.jpg',
                         'http://i.stack.imgur.com/fPm96.jpg', 
                         'http://i.stack.imgur.com/sICp4.jpg',
                         'http://i.stack.imgur.com/JP8mG.jpg')
));

现在当 Activity 加载时。从服务器和显示器下载这些图像的最佳方式是什么?

我们需要遵循什么程序?

【问题讨论】:

    标签: android arrays json parsing


    【解决方案1】:

    Lazy load of images in ListView - 将图像异步下载到视图中的最佳起点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-01-18
      • 2014-11-01
      • 1970-01-01
      • 2012-02-21
      • 2015-09-23
      • 2016-07-12
      • 2012-12-25
      相关资源
      最近更新 更多