本文整理匯總了Java中com.amap.api.services.weather.LocalWeatherLiveResult類的典型用法代碼示例。如果您正苦於以下問題:Java LocalWeatherLiveResult類的具體用法?Java LocalWeatherLiveResult怎麽用?Java LocalWeatherLiveResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LocalWeatherLiveResult類屬於com.amap.api.services.weather包,在下文中一共展示了LocalWeatherLiveResult類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onWeatherLiveSearched
import com.amap.api.services.weather.LocalWeatherLiveResult; //導入依賴的package包/類
@Override
public void onWeatherLiveSearched(LocalWeatherLiveResult localWeatherLiveResult, int i) {
dismissBaseDialog();
if (i == 1000) {
if (localWeatherLiveResult != null && localWeatherLiveResult.getLiveResult() != null) {
LocalWeatherLive localWeatherLive = localWeatherLiveResult.getLiveResult();
mWeatherInfoBean.setRealTime(localWeatherLive.getReportTime());
realTime.setText(mWeatherInfoBean.getRealTime() + "發布");
mWeatherInfoBean.setWeatherStatus(localWeatherLive.getWeather());
weatherStatus.setText(mWeatherInfoBean.getWeatherStatus());
mWeatherInfoBean.setTemperature(localWeatherLive.getTemperature() + "°");
temperature.setText(mWeatherInfoBean.getTemperature());
mWeatherInfoBean.setWind(localWeatherLive.getWindDirection() + "風 " + localWeatherLive
.getWindPower() + "級");
wind.setText(mWeatherInfoBean.getWind());
mWeatherInfoBean.setHumidity("濕度 " + localWeatherLive.getHumidity() + "%");
humidity.setText(mWeatherInfoBean.getHumidity());
} else {
LogUtil.e("獲取到的天氣實時信息為空");
}
} else {
LogUtil.e("獲取到的天氣實時信息失敗" + i);
}
}
示例2: onWeatherLiveSearched
import com.amap.api.services.weather.LocalWeatherLiveResult; //導入依賴的package包/類
@Override
public void onWeatherLiveSearched(LocalWeatherLiveResult localWeatherLiveResult, int rCode) {
if (rCode == 1000) {
if (localWeatherLiveResult.getLiveResult() != null) {
LocalWeatherLive weatherlive = localWeatherLiveResult.getLiveResult();
mWeatherWInfo.setText(weatherlive.getWeather());
mWeatherTime.setText(weatherlive.getReportTime().substring(11, 16) + " 發布");
mWeatherWind.setText(weatherlive.getWindDirection() + "風 " + weatherlive.getWindPower() + "級");
mWeatherTemp.setText("溫度 " + weatherlive.getTemperature() + "°");
mWeatherHumidity.setText("濕度 " + weatherlive.getHumidity() + "%");
initWeatherNumber();
}
} else {
ToastUtils.showToast(WeatherActivity.this, "No Result:" + rCode);
}
}
示例3: onWeatherLiveSearched
import com.amap.api.services.weather.LocalWeatherLiveResult; //導入依賴的package包/類
/**
* 實時天氣查詢回調
*/
@Override
public void onWeatherLiveSearched(LocalWeatherLiveResult weatherLiveResult, int rCode) {
if (rCode == 1000) {
if (weatherLiveResult != null && weatherLiveResult.getLiveResult() != null) {
LocalWeatherLive weatherlive = weatherLiveResult.getLiveResult();
mView.updateLiveTextView(weatherlive.getReportTime() + "發布",
weatherlive.getWeather(),
weatherlive.getTemperature() + "°",
weatherlive.getWindDirection() + "風 " + weatherlive.getWindPower() + "級",
"濕度 " + weatherlive.getHumidity() + "%");
} else {
mView.showToast(R.string.no_result);
}
} else {
// 數據出錯
mView.showToast("Error:" + rCode);
}
mView.closeProgressDialog();
}
示例4: onWeatherLiveSearched
import com.amap.api.services.weather.LocalWeatherLiveResult; //導入依賴的package包/類
/**
* 實況天氣返回查詢
*/
@Override
public void onWeatherLiveSearched(LocalWeatherLiveResult localWeatherLiveResult, int i) {
LocalWeatherLive localWeatherLive = localWeatherLiveResult.getLiveResult();
mRecordView.setWeather(localWeatherLive.getWeather() + " " + localWeatherLive.getTemperature() + "°");
}