本文整理汇总了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() + "°");
}