• <rp id="vcwyv"></rp>

      <b id="vcwyv"></b>
      <tt id="vcwyv"></tt>

    1. android-betterpickers

      [復制鏈接]
      來自: MrlLee 分類: Android精品源碼 上傳時間: 2016-3-22 18:09:18
      Tag:

      項目介紹:

      在AOSP時鐘和日歷應用程序仿照DialogFragments改善UX采摘時間,日期,數字和其他東西。
      Including in Your ProjectGradlecompile 'com.code-troopers.betterpickers:library:2.5.2'
      Maven
      [XML] 查看源文件 復制代碼
      
        com.code-troopers.betterpickers
        library
        2.5.2
        aar
      

      Usage
      對于這個項目的執行工作看sample/ folder
      Calendar Date Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment()
                      .setOnDateSetListener(SampleCalendarDateBasicUsage.this)
                      .setFirstDayOfWeek(Calendar.SUNDAY)
                      .setPreselectedDate(towDaysAgo.getYear(), towDaysAgo.getMonthOfYear() - 1, towDaysAgo.getDayOfMonth())
                      .setDateRange(minDate, null)
                      .setThemeDark(true);
              cdp.show(getSupportFragmentManager(), FRAG_TAG_DATE_PICKER);
          }
      });

      Radial Time Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              RadialTimePickerDialogFragment rtpd = new RadialTimePickerDialogFragment()
                      .setOnTimeSetListener(SampleRadialTimeBasicUsage.this)
                      .setStartTime(10, 10)
                      .setThemeDark(true);
              rtpd.show(getSupportFragmentManager(), FRAG_TAG_TIME_PICKER);
          }
      });

      Recurrence Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              FragmentManager fm = getSupportFragmentManager();
              Bundle bundle = new Bundle();
              Time time = new Time();
              time.setToNow();
              bundle.putLong(RecurrencePickerDialogFragment.BUNDLE_START_TIME_MILLIS, time.toMillis(false));
              bundle.putString(RecurrencePickerDialogFragment.BUNDLE_TIME_ZONE, time.timezone);
              bundle.putString(RecurrencePickerDialogFragment.BUNDLE_RRULE, mRrule);
              bundle.putBoolean(RecurrencePickerDialogFragment.BUNDLE_HIDE_SWITCH_BUTTON, true);
      
              RecurrencePickerDialogFragment rpd = new RecurrencePickerDialogFragment();
              rpd.setArguments(bundle);
              rpd.setOnRecurrenceSetListener(SampleRecurrenceBasicUsage.this);
              rpd.show(fm, FRAG_TAG_RECUR_PICKER);
          }
      });

      Timezone Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              FragmentManager fm = getSupportFragmentManager();
              Bundle bundle = new Bundle();
              Time time = new Time();
              time.setToNow();
              bundle.putLong(TimeZonePickerDialogFragment.BUNDLE_START_TIME_MILLIS, time.toMillis(false));
              bundle.putString(TimeZonePickerDialogFragment.BUNDLE_TIME_ZONE, time.timezone);
              bundle.putString(RecurrencePickerDialogFragment.BUNDLE_RRULE, mRrule);
      
              TimeZonePickerDialogFragment tzpd = new TimeZonePickerDialogFragment();
              tzpd.setArguments(bundle);
              tzpd.setOnTimeZoneSetListener(SampleTimeZoneBasicUsage.this);
              tzpd.show(fm, FRAG_TAG_TIME_ZONE_PICKER);
          }
      });

      Date Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              DatePickerBuilder dpb = new DatePickerBuilder()
                      .setFragmentManager(getSupportFragmentManager())
                      .setStyleResId(R.style.BetterPickersDialogFragment)
                      .setYearOptional(true);
              dpb.show();
          }
      });

      Expiration Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              ExpirationPickerBuilder epb = new ExpirationPickerBuilder()
                        .setFragmentManager(getSupportFragmentManager())
                        .setStyleResId(R.style.BetterPickersDialogFragment) 
                        .setMinYear(2000);
              epb.show();
          }
      });

      HMS Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              HmsPickerBuilder hpb = new HmsPickerBuilder()
                      .setFragmentManager(getSupportFragmentManager())
                      .setStyleResId(R.style.BetterPickersDialogFragment);
              hpb.show();
          }
      });

      Number Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              NumberPickerBuilder npb = new NumberPickerBuilder()
                      .setFragmentManager(getSupportFragmentManager())
                      .setStyleResId(R.style.BetterPickersDialogFragment)
                      .setLabelText("LBS.");
              npb.show();
      }
      });

      Time Picker
      [Java] 查看源文件 復制代碼
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              TimePickerBuilder tpb = new TimePickerBuilder()
                      .setFragmentManager(getSupportFragmentManager())
                      .setStyleResId(R.style.BetterPickersDialogFragment);
              tpb.show();
          }
      });

      Theming
      對于主題化的演示,看sample/ folder
      您可以使用自己的主題,如果你想改變某些屬性。 BetterPickers目前允許下列屬性的定制:
      ? ? bpDialogBackground? ?? ? :: 用作窗戶背景為DialogFragment可提拉(優選9-補丁)? ? bpTextColor? ?? ?? ?? ???:: 色(可選狀態列表)在DialogFragment所有文本? ? bpDeleteIcon? ?? ?? ?? ? :: 提拉(可選狀態列表)的刪除按鈕? ? bpCheckIcon? ?? ?? ?? ???:: 提拉(可選狀態列表),在日期對話框選擇器檢查按鈕? ? bpKeyBackground? ?? ?? ? :: 提拉(可選狀態列表)的鍵盤按鈕? ? bpButtonBackground? ?? ? :: 對于設置繪制(可選狀態列表),取消和刪除按鈕? ? bpDividerColor? ?? ?? ???:: 用于DialogFragment分頻器的顏色? ? bpKeyboardIndicatorColor :: 用于ViewPagerIndicator的日期對話框選擇器的顏色
      • styles.xml:
        [XML] 查看源文件 復制代碼
      • 使用自定義主題實例化你DialogFragment:
        [Java] 查看源文件 復制代碼
        DatePickerBuilder dpb = new DatePickerBuilder()
            .setFragmentManager(getSupportFragmentManager())
            .setStyleResId(R.style.MyCustomBetterPickerTheme);
        dpb.show();



      相關源碼推薦:

      我來說兩句
      所有評論(16)
      apkbus熱心網友 2017-5-20 10:28:51
      雖不明,但覺厲!
      回復
      Forssecorn 2019-10-22 15:48:46
      很給力,安卓巴士有你更精彩!
      回復
      Forssecorn 2019-10-22 15:50:58
      精華內容,樓主V5!
      回復
      apkbus熱心網友 2019-10-22 18:56:58
      正需要啊,感謝樓主無私分享!
      回復
      apkbus熱心網友 2019-10-22 22:06:34
      很給力,安卓巴士有你更精彩!
      回復
      apkbus熱心網友 2019-11-16 13:28:36
      很給力,安卓巴士有你更精彩!
      回復
      apkbus熱心網友 2019-11-16 21:26:47
      雖不明,但覺厲!
      回復
      123下一頁
      提取碼:  下載次數:5 狀態:已購或VIP 售價:10(原價:10)金錢 下載權限:初級碼農 
      5337 1 5
      代碼貢獻英雄榜
      用戶名 下載數
      聯系我們
      首頁/微信公眾賬號投稿
      帖子代碼編輯/版權問題
      QQ:435399051,1294855032
      如何獲得代碼達人稱號?
      如何成為簽約作者?
      領先的中文移動開發者社區
      18620764416
      7*24全天服務
      意見反饋:1294855032@qq.com

      掃一掃關注我們

      Powered by Discuz! X3.2© 2001-2019 Comsenz Inc.( 粵ICP備15117877號 )

      夫妻性姿势真人示范 - 视频 - 在线观看 - 影视资讯 - 唯爱网