Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sobot_android
Sobot_module_Dev
Commits
ba120197
Commit
ba120197
authored
Jul 24, 2024
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widget 1.2.8 属性添加sobot标识,避免和客户出现重名问题
parent
f59ad090
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
156 deletions
+155
-156
sobot-widget-publish-mavencentral.gradle
sobot_widget/sobot-widget-publish-mavencentral.gradle
+1
-1
CalendarLayout.java
...java/com/sobot/widget/ui/calenderview/CalendarLayout.java
+4
-4
CalendarViewDelegate.java
...om/sobot/widget/ui/calenderview/CalendarViewDelegate.java
+65
-65
attrs.xml
sobot_widget/src/main/res/values/attrs.xml
+85
-86
No files found.
sobot_widget/sobot-widget-publish-mavencentral.gradle
View file @
ba120197
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
...
@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext
{
ext
{
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'widget_x'
//项目名
PUBLISH_ARTIFACT_ID
=
'widget_x'
//项目名
PUBLISH_VERSION
=
'1.2.
7
'
//版本号
PUBLISH_VERSION
=
'1.2.
8
'
//版本号
}
}
...
...
sobot_widget/src/main/java/com/sobot/widget/ui/calenderview/CalendarLayout.java
View file @
ba120197
...
@@ -169,10 +169,10 @@ public class CalendarLayout extends LinearLayout {
...
@@ -169,10 +169,10 @@ public class CalendarLayout extends LinearLayout {
super
(
context
,
attrs
);
super
(
context
,
attrs
);
setOrientation
(
LinearLayout
.
VERTICAL
);
setOrientation
(
LinearLayout
.
VERTICAL
);
TypedArray
array
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
Sobot_CalendarLayout
);
TypedArray
array
=
context
.
obtainStyledAttributes
(
attrs
,
R
.
styleable
.
Sobot_CalendarLayout
);
mContentViewId
=
array
.
getResourceId
(
R
.
styleable
.
Sobot_CalendarLayout_calendar_content_view_id
,
0
);
mContentViewId
=
array
.
getResourceId
(
R
.
styleable
.
Sobot_CalendarLayout_
sobot_
calendar_content_view_id
,
0
);
mDefaultStatus
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_default_status
,
STATUS_EXPAND
);
mDefaultStatus
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_
sobot_
default_status
,
STATUS_EXPAND
);
mCalendarShowMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_calendar_show_mode
,
CALENDAR_SHOW_MODE_BOTH_MONTH_WEEK_VIEW
);
mCalendarShowMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_
sobot_
calendar_show_mode
,
CALENDAR_SHOW_MODE_BOTH_MONTH_WEEK_VIEW
);
mGestureMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_gesture_mode
,
GESTURE_MODE_DEFAULT
);
mGestureMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarLayout_
sobot_
gesture_mode
,
GESTURE_MODE_DEFAULT
);
array
.
recycle
();
array
.
recycle
();
mVelocityTracker
=
VelocityTracker
.
obtain
();
mVelocityTracker
=
VelocityTracker
.
obtain
();
final
ViewConfiguration
configuration
=
ViewConfiguration
.
get
(
context
);
final
ViewConfiguration
configuration
=
ViewConfiguration
.
get
(
context
);
...
...
sobot_widget/src/main/java/com/sobot/widget/ui/calenderview/CalendarViewDelegate.java
View file @
ba120197
...
@@ -426,104 +426,104 @@ final class CalendarViewDelegate {
...
@@ -426,104 +426,104 @@ final class CalendarViewDelegate {
LunarCalendar
.
init
(
context
);
LunarCalendar
.
init
(
context
);
mCalendarPadding
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_calendar_padding
,
0
);
mCalendarPadding
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
calendar_padding
,
0
);
mCalendarPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_calendar_padding_left
,
0
);
mCalendarPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
calendar_padding_left
,
0
);
mCalendarPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_calendar_padding_right
,
0
);
mCalendarPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
calendar_padding_right
,
0
);
if
(
mCalendarPadding
!=
0
)
{
if
(
mCalendarPadding
!=
0
)
{
mCalendarPaddingLeft
=
mCalendarPadding
;
mCalendarPaddingLeft
=
mCalendarPadding
;
mCalendarPaddingRight
=
mCalendarPadding
;
mCalendarPaddingRight
=
mCalendarPadding
;
}
}
mSchemeTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_scheme_text_color
,
0xFFFFFFFF
);
mSchemeTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
cheme_text_color
,
0xFFFFFFFF
);
mSchemeLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_scheme_lunar_text_color
,
0xFFe1e1e1
);
mSchemeLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
cheme_lunar_text_color
,
0xFFe1e1e1
);
mSchemeThemeColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_scheme_theme_color
,
0x50CFCFCF
);
mSchemeThemeColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
cheme_theme_color
,
0x50CFCFCF
);
mMonthViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_month_view
);
mMonthViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
month_view
);
mYearViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_year_view
);
mYearViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view
);
mWeekViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_week_view
);
mWeekViewClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_view
);
mWeekBarClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_week_bar_view
);
mWeekBarClassPath
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_bar_view
);
mWeekTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_week_text_size
,
mWeekTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_text_size
,
CalendarUtil
.
dipToPx
(
context
,
12
));
CalendarUtil
.
dipToPx
(
context
,
12
));
mWeekBarHeight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_week_bar_height
,
mWeekBarHeight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_bar_height
,
CalendarUtil
.
dipToPx
(
context
,
40
));
CalendarUtil
.
dipToPx
(
context
,
40
));
mWeekLineMargin
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_week_line_margin
,
mWeekLineMargin
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_line_margin
,
CalendarUtil
.
dipToPx
(
context
,
0
));
CalendarUtil
.
dipToPx
(
context
,
0
));
mSchemeText
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_scheme_text
);
mSchemeText
=
array
.
getString
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
cheme_text
);
if
(
TextUtils
.
isEmpty
(
mSchemeText
))
{
if
(
TextUtils
.
isEmpty
(
mSchemeText
))
{
mSchemeText
=
"记"
;
mSchemeText
=
"记"
;
}
}
mMonthViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_month_view_scrollable
,
true
);
mMonthViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
month_view_scrollable
,
true
);
mWeekViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_week_view_scrollable
,
true
);
mWeekViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_view_scrollable
,
true
);
mYearViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_year_view_scrollable
,
true
);
mYearViewScrollable
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_scrollable
,
true
);
mDefaultCalendarSelectDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_month_view_auto_select_day
,
mDefaultCalendarSelectDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
month_view_auto_select_day
,
FIRST_DAY_OF_MONTH
);
FIRST_DAY_OF_MONTH
);
mMonthViewShowMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_month_view_show_mode
,
MODE_ALL_MONTH
);
mMonthViewShowMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
month_view_show_mode
,
MODE_ALL_MONTH
);
mWeekStart
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_week_start_with
,
WEEK_START_WITH_SUN
);
mWeekStart
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_start_with
,
WEEK_START_WITH_SUN
);
mSelectMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_select_mode
,
SELECT_MODE_DEFAULT
);
mSelectMode
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
elect_mode
,
SELECT_MODE_DEFAULT
);
mMaxMultiSelectSize
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_max_multi_select_size
,
Integer
.
MAX_VALUE
);
mMaxMultiSelectSize
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
max_multi_select_size
,
Integer
.
MAX_VALUE
);
mMinSelectRange
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_min_select_range
,
-
1
);
mMinSelectRange
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
min_select_range
,
-
1
);
mMaxSelectRange
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_max_select_range
,
-
1
);
mMaxSelectRange
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
max_select_range
,
-
1
);
setSelectRange
(
mMinSelectRange
,
mMaxSelectRange
);
setSelectRange
(
mMinSelectRange
,
mMaxSelectRange
);
mWeekBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_week_background
,
Color
.
WHITE
);
mWeekBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_background
,
Color
.
WHITE
);
mWeekLineBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_week_line_background
,
Color
.
TRANSPARENT
);
mWeekLineBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_line_background
,
Color
.
TRANSPARENT
);
mYearViewBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_background
,
Color
.
WHITE
);
mYearViewBackground
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_background
,
Color
.
WHITE
);
mWeekTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_week_text_color
,
0xFF333333
);
mWeekTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
week_text_color
,
0xFF333333
);
mCurDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_current_day_text_color
,
Color
.
RED
);
mCurDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
current_day_text_color
,
Color
.
RED
);
mCurDayLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_current_day_lunar_text_color
,
Color
.
RED
);
mCurDayLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
current_day_lunar_text_color
,
Color
.
RED
);
mSelectedThemeColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_selected_theme_color
,
0x50CFCFCF
);
mSelectedThemeColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
elected_theme_color
,
0x50CFCFCF
);
mSelectedTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_selected_text_color
,
0xFF111111
);
mSelectedTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
elected_text_color
,
0xFF111111
);
mSelectedLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_selected_lunar_text_color
,
0xFF111111
);
mSelectedLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_s
obot_s
elected_lunar_text_color
,
0xFF111111
);
mCurrentMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_current_month_text_color
,
0xFF111111
);
mCurrentMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
current_month_text_color
,
0xFF111111
);
mOtherMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_other_month_text_color
,
0xFFe1e1e1
);
mOtherMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
other_month_text_color
,
0xFFe1e1e1
);
mCurMonthLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_current_month_lunar_text_color
,
0xffe1e1e1
);
mCurMonthLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
current_month_lunar_text_color
,
0xffe1e1e1
);
mOtherMonthLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_other_month_lunar_text_color
,
0xffe1e1e1
);
mOtherMonthLunarTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
other_month_lunar_text_color
,
0xffe1e1e1
);
mMinYear
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_min_year
,
1971
);
mMinYear
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
min_year
,
1971
);
mMaxYear
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_max_year
,
2055
);
mMaxYear
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
max_year
,
2055
);
mMinYearMonth
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_min_year_month
,
1
);
mMinYearMonth
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
min_year_month
,
1
);
mMaxYearMonth
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_max_year_month
,
12
);
mMaxYearMonth
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
max_year_month
,
12
);
mMinYearDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_min_year_day
,
1
);
mMinYearDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
min_year_day
,
1
);
mMaxYearDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_max_year_day
,
-
1
);
mMaxYearDay
=
array
.
getInt
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
max_year_day
,
-
1
);
mDayTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_day_text_size
,
mDayTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
day_text_size
,
CalendarUtil
.
dipToPx
(
context
,
16
));
CalendarUtil
.
dipToPx
(
context
,
16
));
mLunarTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_lunar_text_size
,
mLunarTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
lunar_text_size
,
CalendarUtil
.
dipToPx
(
context
,
10
));
CalendarUtil
.
dipToPx
(
context
,
10
));
mCalendarItemHeight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_calendar_height
,
mCalendarItemHeight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
calendar_height
,
CalendarUtil
.
dipToPx
(
context
,
56
));
CalendarUtil
.
dipToPx
(
context
,
56
));
isFullScreenCalendar
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_calendar_match_parent
,
false
);
isFullScreenCalendar
=
array
.
getBoolean
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
calendar_match_parent
,
false
);
//年视图相关
//年视图相关
mYearViewMonthTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_text_size
,
mYearViewMonthTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_text_size
,
CalendarUtil
.
dipToPx
(
context
,
18
));
CalendarUtil
.
dipToPx
(
context
,
18
));
mYearViewDayTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_year_view_day_text_size
,
mYearViewDayTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_day_text_size
,
CalendarUtil
.
dipToPx
(
context
,
7
));
CalendarUtil
.
dipToPx
(
context
,
7
));
mYearViewMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_text_color
,
0xFF111111
);
mYearViewMonthTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_text_color
,
0xFF111111
);
mYearViewDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_day_text_color
,
0xFF111111
);
mYearViewDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_day_text_color
,
0xFF111111
);
mYearViewSchemeTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_scheme_color
,
mSchemeThemeColor
);
mYearViewSchemeTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_scheme_color
,
mSchemeThemeColor
);
mYearViewWeekTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_week_text_color
,
0xFF333333
);
mYearViewWeekTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_week_text_color
,
0xFF333333
);
mYearViewCurDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_current_day_text_color
,
mCurDayTextColor
);
mYearViewCurDayTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_current_day_text_color
,
mCurDayTextColor
);
mYearViewSelectTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_year_view_select_text_color
,
0xFF333333
);
mYearViewSelectTextColor
=
array
.
getColor
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_select_text_color
,
0xFF333333
);
mYearViewWeekTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_year_view_week_text_size
,
mYearViewWeekTextSize
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_week_text_size
,
CalendarUtil
.
dipToPx
(
context
,
8
));
CalendarUtil
.
dipToPx
(
context
,
8
));
mYearViewMonthHeight
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_height
,
mYearViewMonthHeight
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_height
,
CalendarUtil
.
dipToPx
(
context
,
32
));
CalendarUtil
.
dipToPx
(
context
,
32
));
mYearViewWeekHeight
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_year_view_week_height
,
mYearViewWeekHeight
=
array
.
getDimensionPixelSize
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_week_height
,
CalendarUtil
.
dipToPx
(
context
,
0
));
CalendarUtil
.
dipToPx
(
context
,
0
));
mYearViewPadding
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_padding
,
mYearViewPadding
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_padding
,
CalendarUtil
.
dipToPx
(
context
,
12
));
CalendarUtil
.
dipToPx
(
context
,
12
));
mYearViewPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_padding_left
,
mYearViewPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_padding_left
,
CalendarUtil
.
dipToPx
(
context
,
12
));
CalendarUtil
.
dipToPx
(
context
,
12
));
mYearViewPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_padding_right
,
mYearViewPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_padding_right
,
CalendarUtil
.
dipToPx
(
context
,
12
));
CalendarUtil
.
dipToPx
(
context
,
12
));
if
(
mYearViewPadding
!=
0
)
{
if
(
mYearViewPadding
!=
0
)
{
...
@@ -531,14 +531,14 @@ final class CalendarViewDelegate {
...
@@ -531,14 +531,14 @@ final class CalendarViewDelegate {
mYearViewPaddingRight
=
mYearViewPadding
;
mYearViewPaddingRight
=
mYearViewPadding
;
}
}
mYearViewMonthPaddingTop
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_padding_top
,
mYearViewMonthPaddingTop
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_padding_top
,
CalendarUtil
.
dipToPx
(
context
,
4
));
CalendarUtil
.
dipToPx
(
context
,
4
));
mYearViewMonthPaddingBottom
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_padding_bottom
,
mYearViewMonthPaddingBottom
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_padding_bottom
,
CalendarUtil
.
dipToPx
(
context
,
4
));
CalendarUtil
.
dipToPx
(
context
,
4
));
mYearViewMonthPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_padding_left
,
mYearViewMonthPaddingLeft
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_padding_left
,
CalendarUtil
.
dipToPx
(
context
,
4
));
CalendarUtil
.
dipToPx
(
context
,
4
));
mYearViewMonthPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_year_view_month_padding_right
,
mYearViewMonthPaddingRight
=
(
int
)
array
.
getDimension
(
R
.
styleable
.
Sobot_CalendarView_
sobot_
year_view_month_padding_right
,
CalendarUtil
.
dipToPx
(
context
,
4
));
CalendarUtil
.
dipToPx
(
context
,
4
));
if
(
mMinYear
<=
MIN_YEAR
)
mMinYear
=
MIN_YEAR
;
if
(
mMinYear
<=
MIN_YEAR
)
mMinYear
=
MIN_YEAR
;
...
...
sobot_widget/src/main/res/values/attrs.xml
View file @
ba120197
...
@@ -180,17 +180,15 @@
...
@@ -180,17 +180,15 @@
</declare-styleable>
</declare-styleable>
<declare-styleable
name=
"SobotSubsamplingScaleImageView"
>
<declare-styleable
name=
"SobotSubsamplingScaleImageView"
>
<attr
name=
"sobot_src"
format=
"reference"
/>
<attr
name=
"sobot_src"
format=
"reference"
/>
<attr
name=
"sobot_assetName"
format=
"string"
/>
<attr
name=
"sobot_assetName"
format=
"string"
/>
<attr
name=
"sobot_panEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_panEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_zoomEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_zoomEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_quickScaleEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_quickScaleEnabled"
format=
"boolean"
/>
<attr
name=
"sobot_tileBackgroundColor"
format=
"color"
/>
<attr
name=
"sobot_tileBackgroundColor"
format=
"color"
/>
</declare-styleable>
</declare-styleable>
<!--圆形-->
<!--圆形-->
<attr
name=
"sobot_round_as_circle"
format=
"boolean"
/>
<attr
name=
"sobot_round_as_circle"
format=
"boolean"
/>
<!--全部圆角半径-->
<!--全部圆角半径-->
...
@@ -249,100 +247,100 @@
...
@@ -249,100 +247,100 @@
<declare-styleable
name=
"Sobot_CalendarView"
>
<declare-styleable
name=
"Sobot_CalendarView"
>
<attr
name=
"calendar_padding"
format=
"dimension"
/>
<!--日历内部左右padding-->
<attr
name=
"
sobot_
calendar_padding"
format=
"dimension"
/>
<!--日历内部左右padding-->
<attr
name=
"calendar_padding_left"
format=
"dimension"
/>
<!--日历内部左padding-->
<attr
name=
"
sobot_
calendar_padding_left"
format=
"dimension"
/>
<!--日历内部左padding-->
<attr
name=
"calendar_padding_right"
format=
"dimension"
/>
<!--日历内部右padding-->
<attr
name=
"
sobot_
calendar_padding_right"
format=
"dimension"
/>
<!--日历内部右padding-->
<attr
name=
"week_background"
format=
"color"
/>
<!--周背景-->
<attr
name=
"
sobot_
week_background"
format=
"color"
/>
<!--周背景-->
<attr
name=
"week_line_background"
format=
"color"
/>
<!--线条颜色-->
<attr
name=
"
sobot_
week_line_background"
format=
"color"
/>
<!--线条颜色-->
<attr
name=
"week_text_color"
format=
"color"
/>
<!--周栏字体颜色-->
<attr
name=
"
sobot_
week_text_color"
format=
"color"
/>
<!--周栏字体颜色-->
<attr
name=
"week_text_size"
format=
"dimension"
/>
<!--周栏字体大小-->
<attr
name=
"
sobot_
week_text_size"
format=
"dimension"
/>
<!--周栏字体大小-->
<attr
name=
"week_line_margin"
format=
"dimension"
/>
<!--线条margin-->
<attr
name=
"
sobot_
week_line_margin"
format=
"dimension"
/>
<!--线条margin-->
<attr
name=
"month_view"
format=
"string"
/>
<!--完全自定义月视图-->
<attr
name=
"
sobot_
month_view"
format=
"string"
/>
<!--完全自定义月视图-->
<attr
name=
"week_view"
format=
"string"
/>
<!--完全自定义周视图-->
<attr
name=
"
sobot_
week_view"
format=
"string"
/>
<!--完全自定义周视图-->
<attr
name=
"year_view"
format=
"string"
/>
<!--完全自定义年视图-->
<attr
name=
"
sobot_
year_view"
format=
"string"
/>
<!--完全自定义年视图-->
<attr
name=
"week_bar_height"
format=
"dimension"
/>
<!--星期栏的高度-->
<attr
name=
"
sobot_
week_bar_height"
format=
"dimension"
/>
<!--星期栏的高度-->
<attr
name=
"week_bar_view"
format=
"string"
/>
<!--如果需要的话使用自定义星期栏-->
<attr
name=
"
sobot_
week_bar_view"
format=
"string"
/>
<!--如果需要的话使用自定义星期栏-->
<attr
name=
"scheme_text"
format=
"string"
/>
<attr
name=
"s
obot_s
cheme_text"
format=
"string"
/>
<attr
name=
"day_text_size"
format=
"dimension"
/>
<attr
name=
"
sobot_
day_text_size"
format=
"dimension"
/>
<attr
name=
"lunar_text_size"
format=
"dimension"
/>
<attr
name=
"
sobot_
lunar_text_size"
format=
"dimension"
/>
<attr
name=
"calendar_height"
format=
"dimension"
/>
<attr
name=
"
sobot_
calendar_height"
format=
"dimension"
/>
<attr
name=
"calendar_match_parent"
format=
"boolean"
/>
<!-- 全屏日历 -->
<attr
name=
"
sobot_
calendar_match_parent"
format=
"boolean"
/>
<!-- 全屏日历 -->
<attr
name=
"scheme_text_color"
format=
"color"
/>
<attr
name=
"s
obot_s
cheme_text_color"
format=
"color"
/>
<attr
name=
"scheme_month_text_color"
format=
"color"
/>
<attr
name=
"s
obot_s
cheme_month_text_color"
format=
"color"
/>
<attr
name=
"scheme_lunar_text_color"
format=
"color"
/>
<attr
name=
"s
obot_s
cheme_lunar_text_color"
format=
"color"
/>
<attr
name=
"scheme_theme_color"
format=
"color"
/>
<attr
name=
"s
obot_s
cheme_theme_color"
format=
"color"
/>
<attr
name=
"selected_theme_color"
format=
"color"
/>
<attr
name=
"s
obot_s
elected_theme_color"
format=
"color"
/>
<attr
name=
"selected_text_color"
format=
"color"
/>
<attr
name=
"s
obot_s
elected_text_color"
format=
"color"
/>
<attr
name=
"selected_lunar_text_color"
format=
"color"
/>
<attr
name=
"s
obot_s
elected_lunar_text_color"
format=
"color"
/>
<attr
name=
"current_day_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
current_day_text_color"
format=
"color"
/>
<attr
name=
"current_day_lunar_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
current_day_lunar_text_color"
format=
"color"
/>
<attr
name=
"current_month_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
current_month_text_color"
format=
"color"
/>
<attr
name=
"other_month_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
other_month_text_color"
format=
"color"
/>
<attr
name=
"current_month_lunar_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
current_month_lunar_text_color"
format=
"color"
/>
<attr
name=
"other_month_lunar_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
other_month_lunar_text_color"
format=
"color"
/>
<!-- 年视图相关 -->
<!-- 年视图相关 -->
<attr
name=
"year_view_month_text_size"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_text_size"
format=
"dimension"
/>
<attr
name=
"year_view_day_text_size"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_day_text_size"
format=
"dimension"
/>
<attr
name=
"year_view_month_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_month_text_color"
format=
"color"
/>
<attr
name=
"year_view_current_day_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_current_day_text_color"
format=
"color"
/>
<attr
name=
"year_view_day_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_day_text_color"
format=
"color"
/>
<attr
name=
"year_view_select_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_select_text_color"
format=
"color"
/>
<attr
name=
"year_view_scheme_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_scheme_color"
format=
"color"
/>
<attr
name=
"year_view_background"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_background"
format=
"color"
/>
<attr
name=
"year_view_month_height"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_height"
format=
"dimension"
/>
<attr
name=
"year_view_week_height"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_week_height"
format=
"dimension"
/>
<attr
name=
"year_view_week_text_size"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_week_text_size"
format=
"dimension"
/>
<attr
name=
"year_view_week_text_color"
format=
"color"
/>
<attr
name=
"
sobot_
year_view_week_text_color"
format=
"color"
/>
<attr
name=
"year_view_padding"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_padding"
format=
"dimension"
/>
<attr
name=
"year_view_padding_left"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_padding_left"
format=
"dimension"
/>
<attr
name=
"year_view_padding_right"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_padding_right"
format=
"dimension"
/>
<attr
name=
"year_view_month_padding_top"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_padding_top"
format=
"dimension"
/>
<attr
name=
"year_view_month_padding_left"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_padding_left"
format=
"dimension"
/>
<attr
name=
"year_view_month_padding_right"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_padding_right"
format=
"dimension"
/>
<attr
name=
"year_view_month_padding_bottom"
format=
"dimension"
/>
<attr
name=
"
sobot_
year_view_month_padding_bottom"
format=
"dimension"
/>
<!--日期范围-->
<!--日期范围-->
<attr
name=
"min_year"
format=
"integer"
/>
<attr
name=
"
sobot_
min_year"
format=
"integer"
/>
<attr
name=
"max_year"
format=
"integer"
/>
<attr
name=
"
sobot_
max_year"
format=
"integer"
/>
<attr
name=
"min_year_month"
format=
"integer"
/>
<attr
name=
"
sobot_
min_year_month"
format=
"integer"
/>
<attr
name=
"max_year_month"
format=
"integer"
/>
<attr
name=
"
sobot_
max_year_month"
format=
"integer"
/>
<attr
name=
"min_year_day"
format=
"integer"
/>
<attr
name=
"
sobot_
min_year_day"
format=
"integer"
/>
<attr
name=
"max_year_day"
format=
"integer"
/>
<attr
name=
"
sobot_
max_year_day"
format=
"integer"
/>
<!--月视图是否可滚动-->
<!--月视图是否可滚动-->
<attr
name=
"month_view_scrollable"
format=
"boolean"
/>
<attr
name=
"
sobot_
month_view_scrollable"
format=
"boolean"
/>
<!--周视图是否可滚动-->
<!--周视图是否可滚动-->
<attr
name=
"week_view_scrollable"
format=
"boolean"
/>
<attr
name=
"
sobot_
week_view_scrollable"
format=
"boolean"
/>
<!--年视图是否可滚动-->
<!--年视图是否可滚动-->
<attr
name=
"year_view_scrollable"
format=
"boolean"
/>
<attr
name=
"
sobot_
year_view_scrollable"
format=
"boolean"
/>
<!-- 月份显示模式 -->
<!-- 月份显示模式 -->
<attr
name=
"month_view_show_mode"
>
<attr
name=
"
sobot_
month_view_show_mode"
>
<enum
name=
"mode_all"
value=
"0"
/>
<enum
name=
"mode_all"
value=
"0"
/>
<enum
name=
"mode_only_current"
value=
"1"
/>
<enum
name=
"mode_only_current"
value=
"1"
/>
<enum
name=
"mode_fix"
value=
"2"
/>
<enum
name=
"mode_fix"
value=
"2"
/>
</attr>
</attr>
<!-- 自定义周起始 -->
<!-- 自定义周起始 -->
<attr
name=
"week_start_with"
>
<attr
name=
"
sobot_
week_start_with"
>
<enum
name=
"sun"
value=
"1"
/>
<enum
name=
"sun"
value=
"1"
/>
<enum
name=
"mon"
value=
"2"
/>
<enum
name=
"mon"
value=
"2"
/>
<enum
name=
"sat"
value=
"7"
/>
<enum
name=
"sat"
value=
"7"
/>
</attr>
</attr>
<!-- 自定义选择模式 -->
<!-- 自定义选择模式 -->
<attr
name=
"select_mode"
>
<attr
name=
"s
obot_s
elect_mode"
>
<enum
name=
"default_mode"
value=
"0"
/>
<enum
name=
"default_mode"
value=
"0"
/>
<enum
name=
"single_mode"
value=
"1"
/>
<enum
name=
"single_mode"
value=
"1"
/>
<enum
name=
"range_mode"
value=
"2"
/>
<enum
name=
"range_mode"
value=
"2"
/>
...
@@ -350,14 +348,14 @@
...
@@ -350,14 +348,14 @@
</attr>
</attr>
<!-- when select_mode = multi_mode -->
<!-- when select_mode = multi_mode -->
<attr
name=
"max_multi_select_size"
format=
"integer"
/>
<attr
name=
"
sobot_
max_multi_select_size"
format=
"integer"
/>
<!-- when select_mode = range_mode -->
<!-- when select_mode = range_mode -->
<attr
name=
"min_select_range"
format=
"integer"
/>
<attr
name=
"
sobot_
min_select_range"
format=
"integer"
/>
<attr
name=
"max_select_range"
format=
"integer"
/>
<attr
name=
"
sobot_
max_select_range"
format=
"integer"
/>
<!-- auto select day -->
<!-- auto select day -->
<attr
name=
"month_view_auto_select_day"
>
<attr
name=
"
sobot_
month_view_auto_select_day"
>
<enum
name=
"first_day_of_month"
value=
"0"
/>
<enum
name=
"first_day_of_month"
value=
"0"
/>
<enum
name=
"last_select_day"
value=
"1"
/>
<enum
name=
"last_select_day"
value=
"1"
/>
<enum
name=
"last_select_day_ignore_current"
value=
"2"
/>
<enum
name=
"last_select_day_ignore_current"
value=
"2"
/>
...
@@ -366,24 +364,24 @@
...
@@ -366,24 +364,24 @@
<declare-styleable
name=
"Sobot_CalendarLayout"
>
<declare-styleable
name=
"Sobot_CalendarLayout"
>
<attr
name=
"default_status"
>
<attr
name=
"
sobot_
default_status"
>
<enum
name=
"expand"
value=
"0"
/>
<enum
name=
"expand"
value=
"0"
/>
<enum
name=
"shrink"
value=
"1"
/>
<enum
name=
"shrink"
value=
"1"
/>
</attr>
</attr>
<!-- 手势模式 -->
<!-- 手势模式 -->
<attr
name=
"gesture_mode"
>
<attr
name=
"
sobot_
gesture_mode"
>
<enum
name=
"default_mode"
value=
"0"
/>
<enum
name=
"default_mode"
value=
"0"
/>
<!--<enum name="only_calendar" value="1" />-->
<!--<enum name="only_calendar" value="1" />-->
<enum
name=
"disabled"
value=
"2"
/>
<enum
name=
"disabled"
value=
"2"
/>
</attr>
</attr>
<attr
name=
"calendar_show_mode"
>
<attr
name=
"
sobot_
calendar_show_mode"
>
<enum
name=
"both_month_week_view"
value=
"0"
/>
<enum
name=
"both_month_week_view"
value=
"0"
/>
<enum
name=
"only_week_view"
value=
"1"
/>
<enum
name=
"only_week_view"
value=
"1"
/>
<enum
name=
"only_month_view"
value=
"2"
/>
<enum
name=
"only_month_view"
value=
"2"
/>
</attr>
</attr>
<attr
name=
"calendar_content_view_id"
format=
"integer"
/>
<attr
name=
"
sobot_
calendar_content_view_id"
format=
"integer"
/>
</declare-styleable>
</declare-styleable>
</resources>
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment