本文整理汇总了Java中com.amap.api.services.weather.WeatherSearchQuery类的典型用法代码示例。如果您正苦于以下问题:Java WeatherSearchQuery类的具体用法?Java WeatherSearchQuery怎么用?Java WeatherSearchQuery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WeatherSearchQuery类属于com.amap.api.services.weather包,在下文中一共展示了WeatherSearchQuery类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startSearchForecastWeather
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
private void startSearchForecastWeather() {
WeatherSearchQuery query = new WeatherSearchQuery(mWeatherInfoBean.getCity(), WeatherSearchQuery.WEATHER_TYPE_FORECAST);
WeatherSearch weatherSearch = new WeatherSearch(this);
weatherSearch.setQuery(query);
weatherSearch.setOnWeatherSearchListener(this);
weatherSearch.searchWeatherAsyn();
}
示例2: startSearchLiveWeather
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
private void startSearchLiveWeather() {
WeatherSearchQuery query = new WeatherSearchQuery(mWeatherInfoBean.getCity(), WeatherSearchQuery.WEATHER_TYPE_LIVE);
WeatherSearch weatherSearch = new WeatherSearch(this);
weatherSearch.setQuery(query);
weatherSearch.setOnWeatherSearchListener(this);
weatherSearch.searchWeatherAsyn();
}
示例3: initCardWeather
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
private void initCardWeather(String city) {
mWeatherCity.setText(city);
mquery = new WeatherSearchQuery(city, WeatherSearchQuery.WEATHER_TYPE_LIVE);
mWeatherSearch = new WeatherSearch(this);
mWeatherSearch.setOnWeatherSearchListener(this);
mWeatherSearch.setQuery(mquery);
mWeatherSearch.searchWeatherAsyn(); //异步搜索
}
示例4: searchWeatherRecord
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
@Override
public void searchWeatherRecord(Context context, String city) {
WeatherSearch weatherSearch = new WeatherSearch(context);
weatherSearch.setQuery(new WeatherSearchQuery(city, WeatherSearchQuery.WEATHER_TYPE_LIVE));
weatherSearch.setOnWeatherSearchListener(this);
weatherSearch.searchWeatherAsyn();
}
示例5: searchForecastsWeather
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
@Override
public void searchForecastsWeather() {
mWeatherSearchQuery = new WeatherSearchQuery(mCity, WeatherSearchQuery.WEATHER_TYPE_FORECAST);//检索参数为城市和天气类型,实时天气为1、天气预报为2
mWeatherSearch = new WeatherSearch(mContext);
mWeatherSearch.setOnWeatherSearchListener(this);
mWeatherSearch.setQuery(mWeatherSearchQuery);
mWeatherSearch.searchWeatherAsyn(); //异步搜索
}
示例6: searchLiveWeather
import com.amap.api.services.weather.WeatherSearchQuery; //导入依赖的package包/类
@Override
public void searchLiveWeather() {
mWeatherSearchQuery = new WeatherSearchQuery(mCity, WeatherSearchQuery.WEATHER_TYPE_LIVE);//检索参数为城市和天气类型,实时天气为1、天气预报为2
mWeatherSearch = new WeatherSearch(mContext);
mWeatherSearch.setOnWeatherSearchListener(this);
mWeatherSearch.setQuery(mWeatherSearchQuery);
mWeatherSearch.searchWeatherAsyn(); //异步搜索
}