• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NumberPickerBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onTimeSet

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
/**
 *
 * @param dialog
 * @param hourOfDay
 * @param minute
 */
@Override
public void onTimeSet(RadialTimePickerDialogFragment dialog, final int hourOfDay, final int minute) {
    NumberPickerBuilder npb = new NumberPickerBuilder()
            .addNumberPickerDialogHandler(new NumberPickerDialogFragment.NumberPickerDialogHandlerV2() {
                @Override
                public void onDialogNumberSet(int reference, BigInteger number, double decimal, boolean isNegative, BigDecimal fullNumber) {
                    _calendar.set(_calendar.get(Calendar.YEAR),
                            _calendar.get(Calendar.MONTH),
                            _calendar.get(Calendar.DAY_OF_MONTH),
                            hourOfDay,
                            minute,
                            number.intValue());

                    _lastDateSet = _calendar.getTime();
                    System.out.println("Last date : " + _lastDateSet.getTime() / 1000);
                    _rView.setDate(_lastDateSet);
                }
            })
            .setFragmentManager(getBaseActivity().getSupportFragmentManager())
            .setStyleResId(R.style.BetterPickersDialogFragment)
            .setLabelText("Seconds!");
    npb.show();
}
 
开发者ID:ehanoc,项目名称:xwallet,代码行数:30,代码来源:RecoverFragment.java


示例2: showNumberPicker

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
private void showNumberPicker(NumberPickerDialogHandler pickerHandler, String label) {
    Log.d("MAGPIE", "Should show the NumberPicker");
    NumberPickerBuilder npb = new NumberPickerBuilder()
            .addNumberPickerDialogHandler(pickerHandler)
            .setFragmentManager(((PublisherActivity) getActivity()).getSupportFragmentManager())
            .setStyleResId(R.style.BetterPickersDialogFragment_Light)
            .setPlusMinusVisibility(View.GONE)
            .setLabelText(label);
    npb.show();
}
 
开发者ID:kflauri2312lffds,项目名称:Android_watch_magpie,代码行数:11,代码来源:MagpieFragment.java


示例3: onClickWeight

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
@OnClick(R.id.layout_weight)
public void onClickWeight() {
    mNumberPickerBuilder = new NumberPickerBuilder()
            .setReference(1)
            .setFragmentManager(getChildFragmentManager())
            .setTargetFragment(this)
            .setStyleResId(R.style.BetterPickersDialogFragment_Light)
            .setPlusMinusVisibility(View.INVISIBLE)
            .setDecimalVisibility(View.VISIBLE)
            .setCurrentNumber(mPresenter.getCurrentWeight())
            .setLabelText(getActivity().getString(R.string.kilogram_short));

    mNumberPickerBuilder.show();
}
 
开发者ID:andreshj87,项目名称:CleanFit,代码行数:15,代码来源:SettingsFragment.java


示例4: onClickHeight

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
@OnClick(R.id.layout_height)
public void onClickHeight() {
    mNumberPickerBuilder = new NumberPickerBuilder()
            .setReference(2)
            .setFragmentManager(getChildFragmentManager())
            .setTargetFragment(this)
            .setStyleResId(R.style.BetterPickersDialogFragment_Light)
            .setPlusMinusVisibility(View.INVISIBLE)
            .setDecimalVisibility(View.INVISIBLE)
            .setCurrentNumber(mPresenter.getCurrentHeight())
            .setLabelText(getActivity().getString(R.string.centimeter_short));

    mNumberPickerBuilder.show();
}
 
开发者ID:andreshj87,项目名称:CleanFit,代码行数:15,代码来源:SettingsFragment.java


示例5: onAmountClick

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
@OnClick(com.zireck.calories.R.id.layout_amount)
public void onAmountClick() {
    mNumberPickerBuilder = new NumberPickerBuilder()
            .setFragmentManager(getChildFragmentManager())
            .setTargetFragment(this)
            .setStyleResId(com.zireck.calories.R.style.BetterPickersDialogFragment_Light)
            .setPlusMinusVisibility(View.INVISIBLE)
            .setDecimalVisibility(View.INVISIBLE)
            .setCurrentNumber(MathUtils.getAmountFromText(mTextAmount.getText().toString()))
            .setLabelText(mPresenter.getCurrentMeasure());

    mNumberPickerBuilder.show();
}
 
开发者ID:andreshj87,项目名称:CleanFit,代码行数:14,代码来源:AddMealFragment.java


示例6: onSelectYear

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
@OnClick(R.id.budgetYearTextView)
public void onSelectYear(View v) {
    int currentYear = new MmxDate().getYear();
    int year;
    if (mModel.year != 0) {
        year = mModel.year;
    } else {
        year = currentYear;
    }

    new NumberPickerBuilder()
        .setFragmentManager(getSupportFragmentManager())
        .setStyleResId(R.style.BetterPickersDialogFragment)
        .setLabelText(getString(R.string.year))
        .setPlusMinusVisibility(View.INVISIBLE)
        .setDecimalVisibility(View.INVISIBLE)
        .setMinNumber(BigDecimal.valueOf(currentYear - 10))
        .setMaxNumber(BigDecimal.valueOf(currentYear + 10))
        .setCurrentNumber(year)
        .addNumberPickerDialogHandler(new NumberPickerDialogFragment.NumberPickerDialogHandlerV2() {
            @Override
            public void onDialogNumberSet(int reference, BigInteger number, double decimal, boolean isNegative, BigDecimal fullNumber) {
                mModel.setYear(number.intValue());
                viewHolder.refreshYear();
                viewHolder.refreshName();
            }
        })
        .show();
}
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:30,代码来源:BudgetEditActivity.java


示例7: onSelectMonth

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
@OnClick(R.id.budgetMonthTextView)
public void onSelectMonth(View v) {
    int month;
    if (mModel.month != 0) {
        month = mModel.month;
    } else {
        month = new MmxDate().getMonthOfYear();
    }

    new NumberPickerBuilder()
        .setFragmentManager(getSupportFragmentManager())
        .setStyleResId(R.style.BetterPickersDialogFragment)
        .setLabelText(getString(R.string.month))
        .setPlusMinusVisibility(View.INVISIBLE)
        .setDecimalVisibility(View.INVISIBLE)
        .setMinNumber(BigDecimal.ONE)
        .setMaxNumber(BigDecimal.valueOf(12))
        .setCurrentNumber(month)
        .addNumberPickerDialogHandler(new NumberPickerDialogFragment.NumberPickerDialogHandlerV2() {
            @Override
            public void onDialogNumberSet(int reference, BigInteger number, double decimal, boolean isNegative, BigDecimal fullNumber) {
                mModel.setMonth(number.intValue());
                viewHolder.refreshMonth();
                viewHolder.refreshName();
            }
        })
        .show();
}
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:29,代码来源:BudgetEditActivity.java


示例8: showIntervalPickerDIalog

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
void showIntervalPickerDIalog() {
    NumberPickerBuilder npb =
            new NumberPickerBuilder().setDecimalVisibility(NumberPicker.INVISIBLE)
                    .setMinNumber(BigDecimal.ONE)
                    .setMaxNumber(BigDecimal.valueOf(31))
                    .setPlusMinusVisibility(NumberPicker.INVISIBLE)
                    .setFragmentManager(getChildFragmentManager())
                    .setTargetFragment(this).setReference(REF_DIALOG_ROUTINE_INTERVAL)
                    .setStyleResId(R.style.BetterPickersDialogFragment_Calendula);
    npb.show();
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:12,代码来源:ScheduleImportFragment.java


示例9: showStockDialog

import com.codetroopers.betterpickers.numberpicker.NumberPickerBuilder; //导入依赖的package包/类
void showStockDialog(int ref) {
    NumberPickerBuilder npb =
            new NumberPickerBuilder()
                    .setMinNumber(BigDecimal.ONE)
                    //.setLabelText(ref == DIALOG_STOCK_ADD ? "Increase stock by" : "Decrease stock by")
                    .setDecimalVisibility(NumberPicker.VISIBLE)
                    .setPlusMinusVisibility(NumberPicker.INVISIBLE)
                    .setFragmentManager(getChildFragmentManager())
                    .setTargetFragment(this).setReference(ref)
                    .setStyleResId(R.style.BetterPickersDialogFragment_Calendula);
    npb.show();
}
 
开发者ID:citiususc,项目名称:calendula,代码行数:13,代码来源:MedicineCreateOrEditFragment.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SecurityLogic类代码示例发布时间:2022-05-23
下一篇:
Java Ontology类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap