Android利用ksoap2写天气预报应用
2010-06-02 00:54:00 来源:WEB开发网weatherToday = weatherToday + " 气温:" + detail.getProperty(5).toString();
weatherToday = weatherToday + " 风力:" + detail.getProperty(7).toString() + " ";
iconToday[0] = parseIcon(detail.getProperty(8).toString());
iconToday[1] = parseIcon(detail.getProperty(9).toString());
weatherCurrent = detail.getProperty(10).toString();
date = detail.getProperty(13).toString();
weatherTomorrow = "明天:" + date.split(" ")[0];
weatherTomorrow = weatherTomorrow + " 天气:" + date.split(" ")[1];
weatherTomorrow = weatherTomorrow + " 气温:" + detail.getProperty(12).toString();
weatherTomorrow = weatherTomorrow + " 风力:" + detail.getProperty(14).toString() + " ";
iconTomorrow[0] = parseIcon(detail.getProperty(15).toString());
iconTomorrow[1] = parseIcon(detail.getProperty(16).toString());
date = detail.getProperty(18).toString();
weatherAfterday = "后天:" + date.split(" ")[0];
weatherAfterday = weatherAfterday + " 天气:" + date.split(" ")[1];
weatherAfterday = weatherAfterday + " 气温:" + detail.getProperty(17).toString();
weatherAfterday = weatherAfterday + " 风力:" + detail.getProperty(19).toString() + " ";
iconAfterday[0] = parseIcon(detail.getProperty(20).toString());
iconAfterday[1] = parseIcon(detail.getProperty(21).toString());
}
觉得还不够?是的,毕竟博客能写多少呢?给两个地址。当然代码写得非常不够简洁,还请海涵啊。
更多精彩
赞助商链接