Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
yannecer committed Dec 27, 2017
1 parent 4671b2e commit 025af28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
18 changes: 6 additions & 12 deletions app/src/main/java/necer/ncalendardemo/activity/WeekActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.necer.ncalendar.calendar.WeekCalendar;

Expand All @@ -25,21 +26,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {

weekCalendar = (WeekCalendar) findViewById(R.id.weekCalendar);

/* weekCalendar.post(new Runnable() {
@Override
public void run() {

weekCalendar.setOnWeekCalendarChangedListener(new OnWeekCalendarChangedListener() {
@Override
public void onWeekCalendarChanged(DateTime dateTime) {
MyLog.d("dateTime::" + dateTime);
}
});
weekCalendar.setDate("2017-11-5");
}
});*/


}

public void setDate(View view) {

weekCalendar.setDate("2018-01-01");

}
}
6 changes: 5 additions & 1 deletion app/src/main/res/layout/activity_week.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设置日期"
android:onClick="setDate"/>


<com.necer.ncalendar.calendar.WeekCalendar
Expand Down

0 comments on commit 025af28

Please sign in to comment.