All Projects → li-xiaojun → XPopupExt

li-xiaojun / XPopupExt

Licence: other
XPopup扩展功能库,基于XPopup强大的弹窗能力和PickerView的选择器逻辑,封装了时间选择器弹窗、城市选择器弹窗和条件选择器。

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to XPopupExt

Mdatepickerview
Quick and easy date picker.
Stars: ✭ 373 (+50.4%)
Mutual labels:  datepicker, picker, pickerview
Brpickerview
BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
Stars: ✭ 2,149 (+766.53%)
Mutual labels:  datepicker, picker, pickerview
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+2045.16%)
Mutual labels:  datepicker, picker, citypicker
RPicker
Simple and Easy-to-Use iOS Swift Date and Options Picker
Stars: ✭ 130 (-47.58%)
Mutual labels:  datepicker, picker, pickerview
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+2023.79%)
Mutual labels:  datepicker, picker, pickerview
Calendar
📆 calendar 日历
Stars: ✭ 119 (-52.02%)
Mutual labels:  datepicker, picker
Things Calendar
Simple but elegant datepicker for the web — inspired by Things for mac
Stars: ✭ 165 (-33.47%)
Mutual labels:  datepicker, picker
React Native Paper Dates
Smooth and fast cross platform Material Design date and time picker for React Native Paper
Stars: ✭ 173 (-30.24%)
Mutual labels:  datepicker, picker
Vuetify Daterange Picker
The missing date range picker for Vuetify JS you have been looking for.
Stars: ✭ 192 (-22.58%)
Mutual labels:  datepicker, picker
Datepicker
A Date Picker with Calendar for iPhone and iPad Apps.
Stars: ✭ 103 (-58.47%)
Mutual labels:  datepicker, picker
Android Pickerview
This is a picker view for android , support linkage effect, timepicker and optionspicker.(时间选择器、省市区三级联动)
Stars: ✭ 13,003 (+5143.15%)
Mutual labels:  datepicker, pickerview
Lightpick
(deprecated) Check out the new date picker Litepicker
Stars: ✭ 204 (-17.74%)
Mutual labels:  datepicker, picker
popoPicker
popoPicker是一个移动端3D滚轮日期时间和单项的选择器,支持无限循环滚动,不依赖第三方库
Stars: ✭ 26 (-89.52%)
Mutual labels:  datepicker, picker
Datepicker
仿滴滴出行预约打车IOS风格3D时间选择器 🌲
Stars: ✭ 118 (-52.42%)
Mutual labels:  datepicker, picker
Horizontalpicker
DatePicker horizontal con selección smooth por día para Android.
Stars: ✭ 116 (-53.23%)
Mutual labels:  datepicker, picker
Material Ui Pickers
Date & Time pickers, built with ❤️ for @material-ui/core
Stars: ✭ 2,291 (+823.79%)
Mutual labels:  datepicker, picker
SPPickerView
这是一个选择器,功能类似系统的UIPickerView,但是比UIPickerView的适用范围广得多
Stars: ✭ 28 (-88.71%)
Mutual labels:  picker, pickerview
TTADataPickerView
A Swift picker view allow you to pick the titles you want and the date, time or dateTime in one view
Stars: ✭ 35 (-85.89%)
Mutual labels:  picker, pickerview
PSCityPickerView
城市选择器,可以选择国内所有的城市和地区
Stars: ✭ 47 (-81.05%)
Mutual labels:  picker, pickerview
Materialdaterangepicker
A material Date Range Picker based on wdullaers MaterialDateTimePicker
Stars: ✭ 1,315 (+430.24%)
Mutual labels:  datepicker, picker

XPopupExt

XPopupExt是XPopup的扩展功能库,由于对PickerView自身的UI和交互不满意,就结合XPopup强大的弹窗能力和PickerView的选择器逻辑,封装的了新的选择器弹窗和城市选择器弹窗。

演示

使用

  • 添加依赖
implementation 'com.github.li-xiaojun:XPopupExt:最新版本看上面'
//由于扩展库依赖XPopup才能正常使用,所以还必须添加XPopup依赖
implementation 'com.github.li-xiaojun:XPopup:2.2.25'

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  • 时间选择器TimerPickerPopup弹窗,使用示例:
Calendar date = Calendar.getInstance();
date.set(2000, 5,1);
Calendar date2 = Calendar.getInstance();
date2.set(2020, 5,1);
TimePickerPopup popup = new TimePickerPopup(MainActivity.this)
//                        .setDefaultDate(date)  //设置默认选中日期
//                        .setYearRange(1990, 1999) //设置年份范围
//                        .setDateRange(date, date2) //设置日期范围
        .setTimePickerListener(new TimePickerListener() {
            @Override
            public void onTimeChanged(Date date) {
                //时间改变
            }
            @Override
            public void onTimeConfirm(Date date, View view) {
                //点击确认时间
                Toast.makeText(MainActivity.this, "选择的时间:"+date.toLocaleString(), Toast.LENGTH_SHORT).show();
            }
        });

new XPopup.Builder(MainActivity.this)
        .asCustom(popup)
        .show();

TimerPickerPopup还提供了一些设置方法,具体看方法说明即可。

  • 城市选择器,CityPickerPopup弹窗使用示例:
CityPickerPopup popup = new CityPickerPopup(MainActivity.this);
popup.setCityPickerListener(new CityPickerListener() {
    @Override
    public void onCityConfirm(String province, String city, String area, View v) {
        Log.e("tag", province +" - " +city+" - " +area);
        Toast.makeText(MainActivity.this, province +" - " +city+" - " +area, Toast.LENGTH_SHORT).show();
    }
    @Override
    public void onCityChange(String province, String city, String area) {
        Log.e("tag", province +" - " +city+" - " +area);
        Toast.makeText(MainActivity.this, province +" - " +city+" - " +area, Toast.LENGTH_SHORT).show();
    }
});
new XPopup.Builder(MainActivity.this)
        .asCustom(popup)
        .show();
  • 通用列表选择器
CommonPickerPopup popup = new CommonPickerPopup(MainActivity.this);
ArrayList<String> list = new ArrayList<String>();
list.add("小猫");
list.add("小狗");
list.add("小羊");
popup.setPickerData(list)
        .setCurrentItem(1);
popup.setCommonPickerListener(new CommonPickerListener() {
    @Override
    public void onItemSelected(int index, String data) {
        Toast.makeText(MainActivity.this, "选中的是 "+ data, Toast.LENGTH_SHORT).show();
    }
});
new XPopup.Builder(MainActivity.this)
        .asCustom(popup)
        .show();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].