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


Java SinglePicker.setWheelModeEnable方法代码示例

本文整理汇总了Java中cn.addapp.pickers.picker.SinglePicker.setWheelModeEnable方法的典型用法代码示例。如果您正苦于以下问题:Java SinglePicker.setWheelModeEnable方法的具体用法?Java SinglePicker.setWheelModeEnable怎么用?Java SinglePicker.setWheelModeEnable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cn.addapp.pickers.picker.SinglePicker的用法示例。


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

示例1: showConstellationPicker

import cn.addapp.pickers.picker.SinglePicker; //导入方法依赖的package包/类
/**
 * 星座选择器
 * @param activity
 * @param current  当前星座
 * @param listener
 */
public void showConstellationPicker(Activity activity,String current,final ItemListener listener){
    SinglePicker<String> picker = new SinglePicker<>(activity,
           new String[]{"水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座", "狮子座",
                   "处女座", "天秤座", "天蝎座", "射手座", "摩羯座"});
    picker.setCanLoop(false);//不禁用循环
    picker.setWheelModeEnable(true);
    picker.setWidth(picker.getScreenWidthPixels());
    picker.setLineVisible(false);
    picker.setTopBackgroundColor(0xFFFEE61B);
    picker.setTitleText("星座");
    picker.setTitleTextColor(0xFF000000);
    picker.setTitleTextSize(14);
    picker.setCancelTextColor(0xFF4D4D4D);
    picker.setCancelTextSize(14);
    picker.setSubmitTextColor(0xFF4D4D4D);
    picker.setPressedTextColor(0xFF4D4D4D);
    picker.setSubmitTextSize(14);
    picker.setTopHeight(48);
    picker.setSelectedTextColor(0xFFFEE61B);
    picker.setSelectedItem(current);
    picker.setOnItemPickListener(new OnItemPickListener<String>() {
        @Override
        public void onItemPicked(int index, String item) {
            listener.onItemPicked(index,item);
        }
    });
    picker.show();

}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:36,代码来源:OvPicker.java

示例2: showSexPicker

import cn.addapp.pickers.picker.SinglePicker; //导入方法依赖的package包/类
/**
 * 显示性别选择器
 * @param activity
 * @param sex
 * @param listener
 */
public void showSexPicker(Activity activity,String sex,final ItemListener listener){
    SinglePicker<String> picker = new SinglePicker<>(activity,
            new String[]{"男", "女"});
    picker.setCanLoop(false);//不禁用循环
    picker.setWheelModeEnable(true);
    picker.setWidth(picker.getScreenWidthPixels());
    picker.setLineVisible(false);
    picker.setTopBackgroundColor(0xFFFEE61B);
    picker.setTitleText("性别");
    picker.setTitleTextColor(0xFF000000);
    picker.setTitleTextSize(14);
    picker.setCancelTextColor(0xFF4D4D4D);
    picker.setCancelTextSize(14);
    picker.setSubmitTextColor(0xFF4D4D4D);
    picker.setPressedTextColor(0xFF4D4D4D);
    picker.setSubmitTextSize(14);
    picker.setTopHeight(48);
    picker.setSelectedTextColor(0xFFFEE61B);
    picker.setSelectedItem(sex);
    picker.setOnItemPickListener(new OnItemPickListener<String>() {
        @Override
        public void onItemPicked(int index, String item) {
            listener.onItemPicked(index,item);
        }
    });
    picker.show();
}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:34,代码来源:OvPicker.java

示例3: showIndustryPicker

import cn.addapp.pickers.picker.SinglePicker; //导入方法依赖的package包/类
/**
 * 显示所在行业选择器
 * @param activity
 * @param listener
 */
public void showIndustryPicker(Activity activity,final ItemListener listener){
    SinglePicker<String> picker = new SinglePicker<>(activity,
            new String[]{"学生","文化/艺术","影视/娱乐","金融",
                    "医药/健康","工业/制造业","IT/互联网/通信",
                    "媒体/公关","个体经营","教育/科研","其他"});
    picker.setCanLoop(false);//不禁用循环
    picker.setWheelModeEnable(true);
    picker.setWidth(picker.getScreenWidthPixels());
    picker.setLineVisible(false);
    picker.setTopBackgroundColor(0xFFFEE61B);
    picker.setTitleText("所在行业");
    picker.setTitleTextColor(0xFF000000);
    picker.setTitleTextSize(14);
    picker.setCancelTextColor(0xFF4D4D4D);
    picker.setCancelTextSize(14);
    picker.setSubmitTextColor(0xFF4D4D4D);
    picker.setPressedTextColor(0xFF4D4D4D);
    picker.setSubmitTextSize(14);
    picker.setTopHeight(48);
    picker.setSelectedTextColor(0xFFFEE61B);
    picker.setOnItemPickListener(new OnItemPickListener<String>() {
        @Override
        public void onItemPicked(int index, String item) {
            listener.onItemPicked(index,item);
        }
    });
    picker.show();
}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:34,代码来源:OvPicker.java

示例4: showEmotionalPicker

import cn.addapp.pickers.picker.SinglePicker; //导入方法依赖的package包/类
/**
 * 显示情感状态选择器
 * @param activity
 * @param emotional
 * @param listener
 */
public void showEmotionalPicker(Activity activity,String emotional,final ItemListener listener){
    SinglePicker<String> picker = new SinglePicker<>(activity,
            new String[]{"保密","单身","已婚","同性"});
    picker.setCanLoop(false);//不禁用循环
    picker.setWheelModeEnable(true);
    picker.setWidth(picker.getScreenWidthPixels());
    picker.setLineVisible(false);
    picker.setTopBackgroundColor(0xFFFEE61B);
    picker.setTitleText("情感状态");
    picker.setTitleTextColor(0xFF000000);
    picker.setTitleTextSize(14);
    picker.setCancelTextColor(0xFF4D4D4D);
    picker.setCancelTextSize(14);
    picker.setSubmitTextColor(0xFF4D4D4D);
    picker.setPressedTextColor(0xFF4D4D4D);
    picker.setSubmitTextSize(14);
    picker.setSelectedItem(emotional);
    picker.setTopHeight(48);
    picker.setSelectedTextColor(0xFFFEE61B);
    picker.setOnItemPickListener(new OnItemPickListener<String>() {
        @Override
        public void onItemPicked(int index, String item) {
            listener.onItemPicked(index,item);
        }
    });
    picker.show();
}
 
开发者ID:funnyzhaov,项目名称:Tribe,代码行数:34,代码来源:OvPicker.java


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