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
11 changed files
with
83 additions
and
68 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
45 changes: 45 additions & 0 deletions
45
ncalendar/src/main/java/com/necer/view/CalendarViewPager.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 com.necer.view; | ||
|
||
import android.content.Context; | ||
import android.util.AttributeSet; | ||
import android.view.MotionEvent; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.annotation.Nullable; | ||
import androidx.viewpager.widget.ViewPager; | ||
|
||
/** | ||
* Created by necer on 2020/3/20. | ||
*/ | ||
public class CalendarViewPager extends ViewPager { | ||
|
||
|
||
private boolean mScrollEnable = true; | ||
|
||
|
||
public CalendarViewPager(@NonNull Context context) { | ||
super(context); | ||
} | ||
|
||
public CalendarViewPager(@NonNull Context context, @Nullable AttributeSet attrs) { | ||
super(context, attrs); | ||
} | ||
|
||
@Override | ||
public boolean onInterceptTouchEvent(MotionEvent ev) { | ||
if (mScrollEnable) { | ||
return super.onInterceptTouchEvent(ev); | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
public boolean scrollEnable() { | ||
return mScrollEnable; | ||
} | ||
|
||
public void setScrollEnable(boolean scrollEnable) { | ||
this.mScrollEnable = scrollEnable; | ||
} | ||
|
||
} |
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,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
|
||
|
||
<dimen name="solarTextSize">18sp</dimen> | ||
|
||
|
||
|
||
</resources> |