且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

定制的Andr​​oid calendarView

更新时间:2023-01-27 18:37:22

嗨访问的所有给定的联系,希望能帮助你。

Hi visit all given links, hope will help you

1 https://github.com/inteist/android-better-time-picker

2 https://github.com/derekbrameyer/android-betterpickers

3 http://www.androiddevelopersolutions.com/2013/05/android-calendar-sync.html

4 http://www.androidviews.net/2013/04/extendedcalendarview/

5 http://abinashandroid.word$p$pss.com/2013/07/21/how-to-create-custom-calendar-in-android/

6 http://w2davids.word$p$pss.com/android-simple-calendar/

7。 https://github.com/roomorama/Caldroid

8. https://github.com/flavienlaurent/datetimepicker

当您将参观

https://github.com/derekbrameyer/android-betterpickers

有关这个项目的执行工作看样品/文件夹。

For a working implementation of this project see the sample/ folder.

执行相应的处理程序回调:

Implement the appropriate Handler callbacks:

public class MyActivity extends Activity implements DatePickerDialogFragment.DatePickerDialogHandler {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    // ...
  }

  @Override
  public void onDialogDateSet(int year, int monthOfYear, int dayOfMonth) {
    // Do something with your date!
  }
}

使用该生​​成器类之一创建PickerDialog一个主题:

Use one of the Builder classes to create a PickerDialog with a theme:

DatePickerBuilder dpb = new DatePickerBuilder()
    .setFragmentManager(getSupportFragmentManager())
    .setStyleResId(R.style.BetterPickersDialogFragment);
dpb.show();

也是另一个例子,你可以访问

also for an another example you can visit

https://github.com/roomorama/Caldroid

和使用方法如下

要嵌入caldroid片段的活性,使用下面code:

To embed the caldroid fragment in your activity, use below code:

CaldroidFragment caldroidFragment = new CaldroidFragment();
Bundle args = new Bundle();
Calendar cal = Calendar.getInstance();
args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);
args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));
caldroidFragment.setArguments(args);

FragmentTransaction t = getSupportFragmentManager().beginTransaction();
t.replace(R.id.calendar1, caldroidFragment);
t.commit();