当前位置: 首页 > news >正文

房产信息查询平台/seol英文啥意思

房产信息查询平台,seol英文啥意思,专业网站设计公司,网站建设都需要哪些书CityPicker 项目地址:zaaach/CityPicker 简介:城市选择、定位、搜索及右侧字母导航,类似美团 百度糯米 饿了么等 APP 选择城市功能 更多:作者 提 Bug 标签: 现在使用较多的类似美团、外卖等 APP 的城市选择界…

CityPicker

项目地址:zaaach/CityPicker 

简介:城市选择、定位、搜索及右侧字母导航,类似美团 百度糯米 饿了么等 APP 选择城市功能

更多:作者   提 Bug   

标签:

 

Platform

现在使用较多的类似美团、外卖等 APP 的城市选择界面,一行代码搞定,就是这么简单粗暴!!!

Tips:(旧版本 1.x)会报高德定位 jar 包冲突,推荐使用 2.x 版本。

主要功能:

  • 字母悬浮栏
  • 指定热门城市
  • 自定义动画效果
  • 自定义主题
  • 名称或拼音搜索
  • 返回城市名、code 等数据
  • 提供定位接口,解耦定位 SDK

Preview

image image image

APK

下载demo.apk体验.

Download

Gradle:

dependencies {implementation 'com.zaaach:citypicker:2.0.3'    //必选implementation 'com.android.support:recyclerview-v7:27.1.1'    //必选
}

or Maven:

<dependency><groupId>com.zaaach</groupId><artifactId>citypicker</artifactId><version>2.0.3</version><type>pom</type>
</dependency>

or 下载 library 手动导入.

Usage

CityPicker 基于DialogFragment 实现,已提供定位接口,需要 APP 自身实现定位。

基本使用:

Step1:

manifest.xml中给使用CityPicker 的activity添加主题android:theme="@style/DefaultCityPickerTheme"

<activity android:name=".MainActivity" android:theme="@style/DefaultCityPickerTheme">......
</activity>

Step2:

注意:热门城市使用HotCity ,定位城市使用LocatedCity

List<HotCity> hotCities = new ArrayList<>();
hotCities.add(new HotCity("北京", "北京", "101010100")); //code 为城市代码
hotCities.add(new HotCity("上海", "上海", "101020100"));
hotCities.add(new HotCity("广州", "广东", "101280101"));
hotCities.add(new HotCity("深圳", "广东", "101280601"));
hotCities.add(new HotCity("杭州", "浙江", "101210101"));
......CityPicker.from(activity) //activity 或者 fragment.enableAnimation(true)    //启用动画效果,默认无.setAnimationStyle(anim)    //自定义动画.setLocatedCity(new LocatedCity("杭州", "浙江", "101210101")))  //APP 自身已定位的城市,传 null 会自动定位(默认).setHotCities(hotCities)    //指定热门城市.setOnPickListener(new OnPickListener() {@Overridepublic void onPick(int position, City data) {Toast.makeText(getApplicationContext(), data.getName(), Toast.LENGTH_SHORT).show();}@Overridepublic void onCancel(){Toast.makeText(getApplicationContext(), "取消选择", Toast.LENGTH_SHORT).show();     }@Overridepublic void onLocate() {//定位接口,需要 APP 自身实现,这里模拟一下定位new Handler().postDelayed(new Runnable() {@Overridepublic void run() {//定位完成之后更新数据CityPicker.getInstance().locateComplete(new LocatedCity("深圳", "广东", "101280601"), LocateState.SUCCESS);}}, 3000);}}).show();

关于自定义主题:

style.xml 中自定义主题并且继承DefaultCityPickerTheme ,别忘了在manifest.xml 设置给activity

<style name="CustomTheme" parent="DefaultCityPickerTheme"><item name="cpCancelTextColor">@color/color_green</item><item name="cpSearchCursorDrawable">@color/color_green</item><item name="cpIndexBarNormalTextColor">@color/color_green</item><item name="cpIndexBarSelectedTextColor">@color/color_green</item><item name="cpSectionHeight">@dimen/custom_section_height</item><item name="cpOverlayBackground">@color/color_green</item>......
</style>

CityPicker 中自定义的所有属性如下,有些属性值必须是引用类型refrence,使用时注意。

<resources><attr name="cpCancelTextSize" format="dimension|reference" /><attr name="cpCancelTextColor" format="color|reference" /><attr name="cpClearTextIcon" format="reference" /><attr name="cpSearchTextSize" format="dimension|reference" /><attr name="cpSearchTextColor" format="color|reference" /><attr name="cpSearchHintText" format="string|reference" /><attr name="cpSearchHintTextColor" format="color|reference" /><attr name="cpSearchCursorDrawable" format="reference" /><attr name="cpListItemTextSize" format="dimension|reference" /><attr name="cpListItemTextColor" format="color|reference" /><attr name="cpListItemHeight" format="dimension|reference"/><attr name="cpEmptyIcon" format="reference"/><attr name="cpEmptyIconWidth" format="dimension|reference"/><attr name="cpEmptyIconHeight" format="dimension|reference"/><attr name="cpEmptyText" format="string|reference"/><attr name="cpEmptyTextSize" format="dimension|reference"/><attr name="cpEmptyTextColor" format="color|reference"/><attr name="cpGridItemBackground" format="color|reference"/><attr name="cpGridItemSpace" format="reference"/><!--悬浮栏--><attr name="cpSectionHeight" format="reference"/><attr name="cpSectionTextSize" format="reference" /><attr name="cpSectionTextColor" format="reference" /><attr name="cpSectionBackground" format="reference" /><attr name="cpIndexBarTextSize" format="reference" /><attr name="cpIndexBarNormalTextColor" format="reference" /><attr name="cpIndexBarSelectedTextColor" format="reference" /><!--特写布局--><attr name="cpOverlayWidth" format="dimension|reference"/><attr name="cpOverlayHeight" format="dimension|reference"/><attr name="cpOverlayTextSize" format="dimension|reference"/><attr name="cpOverlayTextColor" format="color|reference"/><attr name="cpOverlayBackground" format="color|reference"/>
</resources>

OK,enjoy it~

Changelog

v2.0.3

  • 修复状态栏变黑问题
  • 修复字母索引栏被软遮挡的问题
  • 新增取消选择监听
  • 方法调用方式稍微改变

v2.0.2

  • 修复定位城市偶尔不刷新的 bug

v2.0.1

  • 新增定位接口
  • 修改返回类型为City ,可获取城市名、code 等数据

v2.0.0

  • 项目重构优化,结构更清晰
  • 使用 RecyclerView
http://www.lbrq.cn/news/1541359.html

相关文章:

  • 医院为什么要做门户网站建设/外链推广论坛
  • 手机网站开发实例/最近热点新闻事件2023
  • 上海发布官方网/深圳谷歌seo推广
  • 手机wap网站开发教程/专业网站优化公司
  • 重庆美邦建网站/天津seo推广服务
  • 单产品网站建设/上海网站建设关键词排名
  • 河北保定网站建设/网站统计器
  • 杭州网站推广方式/网店代运营一年的费用是多少
  • 网站开发开源的手册/网络营销策划方案ppt
  • 高端网咖/福建网络seo关键词优化教程
  • 域名网站开发有意义吗/培训课程
  • 行业网站建设内容/做网站用什么编程软件
  • 模仿网站怎么做/足球世界排名国家
  • 旅游景区网站建设/网络营销的主要工作有哪些
  • 学做网站学什么语言/百度浏览器手机版
  • 网站图片自动切换怎么做/合肥网站关键词优化公司
  • hao1123网址之家/seo网络优化师
  • 手机网站视频播放模板/郑州网络推广厂家
  • 肥城网站制作/被公司优化掉是什么意思
  • 叫别人做网站需要注意什么问题/宁波免费seo排名优化
  • 腾讯云域名如何建设网站/中国制造网
  • 秋林 做网站/关键词优化流程
  • 手机做网站/域名查询官网
  • 银联支付网站建设/seo网络优化前景怎么样
  • 济南品牌网站建设定制/上海百度首页优化
  • 现在流行用什么做网站/seo刷关键词排名优化
  • 公司怎么注册网站免费/seo商城
  • 扬州市规划建设局网站/淘宝seo是什么意思
  • 深圳公司设计网站/客服外包平台
  • 网络公司做网站后交代给客户什么/品牌策划公司
  • VR交通安全学习机-VR交通普法体验馆方案
  • KDD 2025 | CMA:一次训练,预测任意过去与未来!元学习+扩散模型颠覆时序预测!
  • sfc_os!SfcValidateCatalogs函数分析之syssetup.inf中的[ProductCatalogsToInstall]
  • 学习嵌入式的第二十一天——数据结构——链表
  • 疏老师-python训练营-Day50预训练模型+CBAM注意力
  • PicoShare 文件共享教程:cpolar 内网穿透服务实现跨设备极速传输