Android-Week-View

介绍:

Android Week View 是一个类似于原生日历应用中日视图和周视图的开发库,支持自定义style。

运行效果:

使用说明:

xml中:

<com.alamkanak.weekview.WeekView
        android:id="@+id/weekView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:eventTextColor="@android:color/white"
        app:textSize="12sp"
        app:hourHeight="60dp"
        app:headerColumnPadding="8dp"
        app:headerColumnTextColor="#8f000000"
        app:headerRowPadding="12dp"
        app:columnGap="8dp"
        app:noOfVisibleDays="3"
        app:headerRowBackgroundColor="#ffefefef"
        app:dayBackgroundColor="#05000000"
        app:todayBackgroundColor="#1848adff"
        app:headerColumnBackground="#ffffffff"/>

java

// Get a reference for the week view in the layout.
mWeekView = (WeekView) findViewById(R.id.weekView);
// Set an action when any event is clicked.
mWeekView.setOnEventClickListener(mEventClickListener);
// The week view has infinite scrolling horizontally. We have to provide the events of a
// month every time the month changes on the week view.
mWeekView.setMonthChangeListener(mMonthChangeListener);
// Set long press listener for events.
mWeekView.setEventLongPressListener(mEventLongPressListener);

已下载
0