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
Showing
7 changed files
with
183 additions
and
4 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
45 changes: 45 additions & 0 deletions
45
app/src/main/java/necer/ncalendardemo/fragment/TestFragment1.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,45 @@ | ||
package necer.ncalendardemo.fragment; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v4.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.necer.ncalendar.calendar.MonthCalendar; | ||
import com.necer.ncalendar.listener.OnMonthCalendarChangedListener; | ||
import com.necer.ncalendar.utils.MyLog; | ||
|
||
import org.joda.time.DateTime; | ||
|
||
import necer.ncalendardemo.R; | ||
|
||
/** | ||
* Created by necer on 2018/2/5. | ||
*/ | ||
|
||
public class TestFragment1 extends Fragment { | ||
|
||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
|
||
|
||
View inflate = inflater.inflate(R.layout.fragment_1, null); | ||
MonthCalendar monthCalendar = (MonthCalendar) inflate.findViewById(R.id.monthcalendar); | ||
|
||
monthCalendar.setOnMonthCalendarChangedListener(new OnMonthCalendarChangedListener() { | ||
@Override | ||
public void onMonthCalendarChanged(DateTime dateTime) { | ||
MyLog.d("TestFragment1::;"+dateTime.toString()); | ||
} | ||
}); | ||
|
||
|
||
|
||
return inflate; | ||
|
||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
app/src/main/java/necer/ncalendardemo/fragment/TestFragment2.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,44 @@ | ||
package necer.ncalendardemo.fragment; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v4.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.necer.ncalendar.calendar.MonthCalendar; | ||
import com.necer.ncalendar.listener.OnMonthCalendarChangedListener; | ||
import com.necer.ncalendar.utils.MyLog; | ||
|
||
import org.joda.time.DateTime; | ||
|
||
import necer.ncalendardemo.R; | ||
|
||
/** | ||
* Created by necer on 2018/2/5. | ||
*/ | ||
|
||
public class TestFragment2 extends Fragment { | ||
|
||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
|
||
View inflate = inflater.inflate(R.layout.fragment_2, null); | ||
MonthCalendar monthCalendar = (MonthCalendar) inflate.findViewById(R.id.monthcalendar); | ||
|
||
monthCalendar.setOnMonthCalendarChangedListener(new OnMonthCalendarChangedListener() { | ||
@Override | ||
public void onMonthCalendarChanged(DateTime dateTime) { | ||
MyLog.d("TestFragment2::;"+dateTime.toString()); | ||
} | ||
}); | ||
|
||
|
||
|
||
return inflate; | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?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"> | ||
|
||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:text="111111" | ||
android:background="#aa88cc" | ||
android:gravity="center"/> | ||
|
||
<com.necer.ncalendar.calendar.MonthCalendar | ||
android:id="@+id/monthcalendar" | ||
android:layout_width="match_parent" | ||
android:layout_height="300dp"/> | ||
|
||
|
||
|
||
</LinearLayout> |
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,19 @@ | ||
<?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"> | ||
|
||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:text="222222" | ||
android:background="#aa4081" | ||
android:gravity="center"/> | ||
|
||
<com.necer.ncalendar.calendar.MonthCalendar | ||
android:id="@+id/monthcalendar" | ||
android:layout_width="match_parent" | ||
android:layout_height="300dp"/> | ||
|
||
</LinearLayout> |