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


Java County类代码示例

本文整理汇总了Java中chihane.jdaddressselector.model.County的典型用法代码示例。如果您正苦于以下问题:Java County类的具体用法?Java County怎么用?Java County使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


County类属于chihane.jdaddressselector.model包,在下文中一共展示了County类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getView

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    Holder holder;

    if (convertView == null) {
        convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_area, parent, false);

        holder = new Holder();
        holder.textView = (TextView) convertView.findViewById(R.id.textView);
        holder.imageViewCheckMark = (ImageView) convertView.findViewById(R.id.imageViewCheckMark);

        convertView.setTag(holder);
    } else {
        holder = (Holder) convertView.getTag();
    }

    County item = getItem(position);
    holder.textView.setText(item.name);

    boolean checked = countyIndex != INDEX_INVALID && counties.get(countyIndex).id == item.id;
    holder.textView.setEnabled(!checked);
    holder.imageViewCheckMark.setVisibility(checked ? View.VISIBLE : View.GONE);

    return convertView;
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:26,代码来源:AddressSelector.java

示例2: onAddressSelected

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public void onAddressSelected(Province province, City city, County county, Street street) {
        if (mBottomDialog.isShowing()) {
                mBottomDialog.dismiss();
        }
        StringBuilder stringBuilder=new StringBuilder();
        stringBuilder.append(province.name).append("-").append(city.name).append("-").append(county.name);
        if (street != null) {
                stringBuilder.append("-").append(street.name);
        }
        currentSelectedAddress=stringBuilder.toString();
        address.setText(currentSelectedAddress);
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:14,代码来源:EditUserInfoDetailActivity.java

示例3: onAddressSelected

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public void onAddressSelected(Province province, City city, County county, Street street) {
    String s =
            (province == null ? "" : province.name) +
            (city == null ? "" : "\n" + city.name) +
            (county == null ? "" : "\n" + county.name) +
            (street == null ? "" : "\n" + street.name);

    T.showShort(this, s);
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:11,代码来源:MainActivity.java

示例4: provideCountiesWith

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public void provideCountiesWith(int cityId, AddressReceiver<County> addressReceiver) {
    County county = new County();
    county.city_id = cityId;
    county.id = 3;
    county.name = "测试用乡镇";
    addressReceiver.send(Collections.singletonList(county));
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:9,代码来源:TestAddressProvider.java

示例5: provideCountiesWith

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public void provideCountiesWith(int cityId, final AddressReceiver<County> addressReceiver) {
    final FlowQueryList<County> countyQueryList = SQLite.select()
            .from(County.class)
            .where(County_Table.city_id.eq(cityId))
            .flowQueryList();
    addressReceiver.send(new ArrayList<>(countyQueryList));
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:9,代码来源:DefaultAddressProvider.java

示例6: callbackInternal

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
private void callbackInternal() {
    if (listener != null) {
        Province province = provinces == null || provinceIndex == INDEX_INVALID ? null : provinces.get(provinceIndex);
        City city = cities == null || cityIndex == INDEX_INVALID ? null : cities.get(cityIndex);
        County county = counties == null || countyIndex == INDEX_INVALID ? null : counties.get(countyIndex);
        Street street = streets == null || streetIndex == INDEX_INVALID ? null : streets.get(streetIndex);

        listener.onAddressSelected(province, city, county, street);
    }
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:11,代码来源:AddressSelector.java

示例7: retrieveCountiesWith

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
private void retrieveCountiesWith(int cityId) {
    progressBar.setVisibility(View.VISIBLE);
    addressProvider.provideCountiesWith(cityId, new AddressProvider.AddressReceiver<County>() {
        @Override
        public void send(List<County> data) {
            handler.sendMessage(Message.obtain(handler, WHAT_COUNTIES_PROVIDED, data));
        }
    });
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:10,代码来源:AddressSelector.java

示例8: handleMessage

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public boolean handleMessage(Message msg) {
    switch (msg.what) {
        case WHAT_PROVINCES_PROVIDED:
            provinces = (List<Province>) msg.obj;
            provinceAdapter.notifyDataSetChanged();
            listView.setAdapter(provinceAdapter);

            break;

        case WHAT_CITIES_PROVIDED:
            cities = (List<City>) msg.obj;
            cityAdapter.notifyDataSetChanged();
            if (Lists.notEmpty(cities)) {
                // 以次级内容更新列表
                listView.setAdapter(cityAdapter);
                // 更新索引为次级
                tabIndex = INDEX_TAB_CITY;
            } else {
                // 次级无内容,回调
                callbackInternal();
            }

            break;

        case WHAT_COUNTIES_PROVIDED:
            counties = (List<County>) msg.obj;
            countyAdapter.notifyDataSetChanged();
            if (Lists.notEmpty(counties)) {
                listView.setAdapter(countyAdapter);
                tabIndex = INDEX_TAB_COUNTY;
            } else {
                callbackInternal();
            }

            break;

        case WHAT_STREETS_PROVIDED:
            streets = (List<Street>) msg.obj;
            streetAdapter.notifyDataSetChanged();
            if (Lists.notEmpty(streets)) {
                listView.setAdapter(streetAdapter);
                tabIndex = INDEX_TAB_STREET;
            } else {
                callbackInternal();
            }

            break;
    }

    updateTabsVisibility();
    updateProgressVisibility();
    updateIndicator();

    return true;
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:57,代码来源:AddressSelector.java

示例9: getItem

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
@Override
public County getItem(int position) {
    return counties.get(position);
}
 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:5,代码来源:AddressSelector.java

示例10: onAddressSelected

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
void onAddressSelected(Province province, City city, County county, Street street); 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:2,代码来源:OnAddressSelectedListener.java

示例11: provideCountiesWith

import chihane.jdaddressselector.model.County; //导入依赖的package包/类
void provideCountiesWith(int cityId, AddressReceiver<County> addressReceiver); 
开发者ID:chihane,项目名称:JDAddressSelector,代码行数:2,代码来源:AddressProvider.java


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