当前位置: 首页>>代码示例>>Java>>正文


Java LocalWeatherLiveResult类代码示例

本文整理汇总了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);
        }
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:25,代码来源:WeatherInfoActivity.java

示例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);
    }
}
 
开发者ID:monsterLin,项目名称:Pigeon,代码行数:20,代码来源:WeatherActivity.java

示例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();
}
 
开发者ID:Alex-ZHOU,项目名称:VMAndroid,代码行数:24,代码来源:WeatherPresenter.java

示例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() + "°");
}
 
开发者ID:Alex-ZHOU,项目名称:VMAndroid,代码行数:10,代码来源:MainPresenter.java


注:本文中的com.amap.api.services.weather.LocalWeatherLiveResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。