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 025af28 commit 0941df0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {




}

public void setDate(View view) {
weekCalendar.setVisibility(View.VISIBLE);
weekCalendar.post(new Runnable() {
@Override
public void run() {
weekCalendar.setDate("2018-01-01");
}
});

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

}
}
19 changes: 11 additions & 8 deletions app/src/main/res/layout/activity_week.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<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"/>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

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


<com.necer.ncalendar.calendar.WeekCalendar
android:id="@+id/weekCalendar"
android:layout_width="match_parent"
android:layout_height="50dp"></com.necer.ncalendar.calendar.WeekCalendar>
android:layout_height="50dp"
android:visibility="gone"></com.necer.ncalendar.calendar.WeekCalendar>

</LinearLayout>

0 comments on commit 0941df0

Please sign in to comment.