2011-06-16 48 views
1

在一個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') 
)); 

現在當活動加載時。從服務器和顯示器下載這些圖像的最佳方法是什麼?

我們需要遵循什麼程序?

回答