forked from yannecer/NCalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yanbinbin
committed
Sep 22, 2017
1 parent
dd14f2a
commit 872ce67
Showing
7 changed files
with
101 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
app/src/main/java/necer/ncalendardemo/activity/TestActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package necer.ncalendardemo.activity; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.view.View; | ||
|
||
import com.necer.ncalendar.calendar.NMonthCalendar; | ||
import com.necer.ncalendar.listener.OnMonthCalendarChangedListener; | ||
import com.necer.ncalendar.utils.MyLog; | ||
|
||
import org.joda.time.DateTime; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import necer.ncalendardemo.R; | ||
|
||
/** | ||
* Created by 闫彬彬 on 2017/9/22. | ||
* QQ:619008099 | ||
*/ | ||
|
||
public class TestActivity extends Activity { | ||
|
||
|
||
private NMonthCalendar nmonthcalendar; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_test); | ||
|
||
nmonthcalendar = (NMonthCalendar) findViewById(R.id.nmonthcalendar); | ||
nmonthcalendar.post(new Runnable() { | ||
@Override | ||
public void run() { | ||
List<String> list = new ArrayList<>(); | ||
list.add("2017-9-21"); | ||
list.add("2017-9-21"); | ||
list.add("2017-9-23"); | ||
list.add("2017-9-26"); | ||
nmonthcalendar.setPointList(list); | ||
} | ||
}); | ||
nmonthcalendar.setOnMonthCalendarChangedListener(new OnMonthCalendarChangedListener() { | ||
@Override | ||
public void onMonthCalendarChanged(DateTime dateTime) { | ||
MyLog.d("onMonthCalendarChanged::" + dateTime.toLocalDate()); | ||
} | ||
}); | ||
|
||
} | ||
|
||
public void aaa(View view) { | ||
nmonthcalendar.setDate("2017-10-01"); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters