Java 类com.baidu.mapapi.map.offline.MKOLSearchRecord 实例源码

项目:BikeHelper    文件:SelectCityActivity.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    int viewType = getItemViewType(position);
    MKOLSearchRecord record = getItem(position);
    switch (viewType) {
        case 0:
            if (convertView == null)
                convertView = getLayoutInflater().inflate(R.layout.item_city, null);
            TextView cityView = (TextView) convertView.findViewById(R.id.city);
            cityView.setText(record.cityName);
            TextView downloadedView = (TextView) convertView.findViewById(R.id.city_downloaded);
            downloadedView.setVisibility(isCityExisted(record.cityID) ? View.VISIBLE : View.GONE);
            break;
        case 1:
            if (convertView == null)
                convertView = getLayoutInflater().inflate(R.layout.item_province, null);
            TextView provinceView = (TextView) convertView.findViewById(R.id.province);
            provinceView.setText(record.cityName);
            break;
    }
    return convertView;
}
项目:BikeHelper    文件:SelectCityActivity.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    int viewType = getItemViewType(position);
    MKOLSearchRecord record = getItem(position);
    switch (viewType) {
        case 0:
            if (convertView == null)
                convertView = getLayoutInflater().inflate(R.layout.item_city, null);
            TextView cityView = (TextView) convertView.findViewById(R.id.city);
            cityView.setText(record.cityName);
            TextView downloadedView = (TextView) convertView.findViewById(R.id.city_downloaded);
            downloadedView.setVisibility(isCityExisted(record.cityID) ? View.VISIBLE : View.GONE);
            break;
        case 1:
            if (convertView == null)
                convertView = getLayoutInflater().inflate(R.layout.item_province, null);
            TextView provinceView = (TextView) convertView.findViewById(R.id.province);
            provinceView.setText(record.cityName);
            break;
    }
    return convertView;
}
项目:Tower-develop    文件:BaiduMapOfflineMapPreference.java   
/**
 * search offline city
 *
 * @param view
 */
public void search(View view) {
    ArrayList<MKOLSearchRecord> records = mOffline.searchCity(mCityNameView
            .getText().toString());
    if (records == null) {
        return;
    }
    mCidView.setText(String.valueOf(records.get(0).cityID));
}
项目:BaiduMap-TrafficAssistant    文件:DownloadActivity.java   
/**
 * 搜索离线城市
 * 
 * @param view
 */
public void search(View view) {
    ArrayList<MKOLSearchRecord> records = mOffline.searchCity(selectedCity);
    if (records == null || records.size() != 1)
        return;
    mOffline.start(records.get(0).cityID);
    Toast.makeText(context, "开始下载离线地图. 城市名称: " + records.get(0).cityName,
            Toast.LENGTH_SHORT).show();
    updateView();
}
项目:BikeHelper    文件:OfflineMapManager.java   
public static ArrayList<MKOLSearchRecord> getAllCities() {
    return mMKOfflineMap.getOfflineCityList();
}
项目:BikeHelper    文件:SelectCityActivity.java   
@Override
public MKOLSearchRecord getItem(int position) {
    return mData.get(position);
}
项目:BaiduOfflineDownloadDemo    文件:OfflineMapItem.java   
public MKOLSearchRecord getCityInfo() {
    return mCityInfo;
}
项目:BaiduOfflineDownloadDemo    文件:OfflineMapItem.java   
public void setCityInfo(MKOLSearchRecord mRecord) {
    this.mCityInfo = mRecord;
    pinyin = PinyinUtil.getPinYin(mRecord.cityName);
}
项目:BikeHelper    文件:OfflineMapManager.java   
public static ArrayList<MKOLSearchRecord> getAllCities() {
    return mMKOfflineMap.getOfflineCityList();
}
项目:BikeHelper    文件:SelectCityActivity.java   
@Override
public MKOLSearchRecord getItem(int position) {
    return mData.get(position);
}