- UID
- 243075
- 主题
- 注册时间
- 2012-4-13
- 在线时间
- 小时
- 最后登录
- 1970-1-1
签到天数: 82 天 [LV.6]常住居民II
|
楼主 |
发表于 2012-8-9 23:49:19
|
显示全部楼层
PS,一个编写天气皮肤的建议
例如http://m.weather.com.cn/data/101280101.html 的内容如下- {"weatherinfo":{"city":"广州","city_en":"guangzhou","date_y":"2012年8月9日","date":"","week":"星期四","fchh":"18","cityid":"101280101","temp1":"25℃~35℃","temp2":"26℃~34℃","temp3":"26℃~33℃","temp4":"25℃~32℃","temp5":"25℃~33℃","temp6":"26℃~33℃","tempF1":"77℉~95℉","tempF2":"78.8℉~93.2℉","tempF3":"78.8℉~91.4℉","tempF4":"77℉~89.6℉","tempF5":"77℉~91.4℉","tempF6":"78.8℉~91.4℉","weather1":"多云","weather2":"多云转阵雨","weather3":"多云转阵雨","weather4":"阵雨","weather5":"阵雨","weather6":"多云转阵雨","img1":"1","img2":"99","img3":"1","img4":"3","img5":"1","img6":"3","img7":"3","img8":"99","img9":"3","img10":"99","img11":"1","img12":"3","img_single":"1","img_title1":"多云","img_title2":"多云","img_title3":"多云","img_title4":"阵雨","img_title5":"多云","img_title6":"阵雨","img_title7":"阵雨","img_title8":"阵雨","img_title9":"阵雨","img_title10":"阵雨","img_title11":"多云","img_title12":"阵雨","img_title_single":"多云","wind1":"微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":"微风","fx1":"微风","fx2":"微风","fl1":"小于3级","fl2":"小于3级","fl3":"小于3级","fl4":"小于3级","fl5":"小于3级","fl6":"小于3级","index":"炎热","index_d":"天气炎热,建议着短衫、短裙、短裤、薄型T恤衫、敞领短袖棉衫等清凉夏季服装。","index48":"炎热","index48_d":"天气炎热,建议着短衫、短裙、短裤、薄型T恤衫、敞领短袖棉衫等清凉夏季服装。","index_uv":"中等","index48_uv":"中等","index_xc":"不宜","index_tr":"一般","index_co":"很不舒适","st1":"35","st2":"25","st3":"32","st4":"26","st5":"31","st6":"26","index_cl":"较适宜","index_ls":"适宜","index_ag":"极不易发"}}
复制代码 这里面预报了从当天起6天的天气。一般某一天的天气是“XX转XX”,比如“多云转阴”,“雷阵雨转阵雨”等等,前面的表示当天的大体天气状况,“转”后面的表示未来的发展趋势。这里面img_title1到img_title12刚好就是这12个对应气象图的名称。
我建议在显示气象图片的时候应该截取img_title1到img_title12的内容(而不是现在大多数天气皮肤使用的,img1到img12的内容)。然后我们在皮肤的文件夹里面把对应的图片命名成“晴.png”“阴.png”“多云.png”“小雨.png”“中雨.png”等等,这样既直观,又有利于以后修改~
|
|