Commit ba120197 by zhengnw@sobot.com

widget 1.2.8 属性添加sobot标识,避免和客户出现重名问题

parent f59ad090
......@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'widget_x' //项目名
PUBLISH_VERSION = '1.2.7' //版本号
PUBLISH_VERSION = '1.2.8' //版本号
}
......
......@@ -169,10 +169,10 @@ public class CalendarLayout extends LinearLayout {
super(context, attrs);
setOrientation(LinearLayout.VERTICAL);
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.Sobot_CalendarLayout);
mContentViewId = array.getResourceId(R.styleable.Sobot_CalendarLayout_calendar_content_view_id, 0);
mDefaultStatus = array.getInt(R.styleable.Sobot_CalendarLayout_default_status, STATUS_EXPAND);
mCalendarShowMode = array.getInt(R.styleable.Sobot_CalendarLayout_calendar_show_mode, CALENDAR_SHOW_MODE_BOTH_MONTH_WEEK_VIEW);
mGestureMode = array.getInt(R.styleable.Sobot_CalendarLayout_gesture_mode, GESTURE_MODE_DEFAULT);
mContentViewId = array.getResourceId(R.styleable.Sobot_CalendarLayout_sobot_calendar_content_view_id, 0);
mDefaultStatus = array.getInt(R.styleable.Sobot_CalendarLayout_sobot_default_status, STATUS_EXPAND);
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_sobot_gesture_mode, GESTURE_MODE_DEFAULT);
array.recycle();
mVelocityTracker = VelocityTracker.obtain();
final ViewConfiguration configuration = ViewConfiguration.get(context);
......
......@@ -426,104 +426,104 @@ final class CalendarViewDelegate {
LunarCalendar.init(context);
mCalendarPadding = (int) array.getDimension(R.styleable.Sobot_CalendarView_calendar_padding, 0);
mCalendarPaddingLeft = (int) array.getDimension(R.styleable.Sobot_CalendarView_calendar_padding_left, 0);
mCalendarPaddingRight = (int) array.getDimension(R.styleable.Sobot_CalendarView_calendar_padding_right, 0);
mCalendarPadding = (int) array.getDimension(R.styleable.Sobot_CalendarView_sobot_calendar_padding, 0);
mCalendarPaddingLeft = (int) array.getDimension(R.styleable.Sobot_CalendarView_sobot_calendar_padding_left, 0);
mCalendarPaddingRight = (int) array.getDimension(R.styleable.Sobot_CalendarView_sobot_calendar_padding_right, 0);
if (mCalendarPadding != 0) {
mCalendarPaddingLeft = mCalendarPadding;
mCalendarPaddingRight = mCalendarPadding;
}
mSchemeTextColor = array.getColor(R.styleable.Sobot_CalendarView_scheme_text_color, 0xFFFFFFFF);
mSchemeLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_scheme_lunar_text_color, 0xFFe1e1e1);
mSchemeThemeColor = array.getColor(R.styleable.Sobot_CalendarView_scheme_theme_color, 0x50CFCFCF);
mMonthViewClassPath = array.getString(R.styleable.Sobot_CalendarView_month_view);
mYearViewClassPath = array.getString(R.styleable.Sobot_CalendarView_year_view);
mWeekViewClassPath = array.getString(R.styleable.Sobot_CalendarView_week_view);
mWeekBarClassPath = array.getString(R.styleable.Sobot_CalendarView_week_bar_view);
mWeekTextSize = array.getDimensionPixelSize(R.styleable.Sobot_CalendarView_week_text_size,
mSchemeTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_scheme_text_color, 0xFFFFFFFF);
mSchemeLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_scheme_lunar_text_color, 0xFFe1e1e1);
mSchemeThemeColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_scheme_theme_color, 0x50CFCFCF);
mMonthViewClassPath = array.getString(R.styleable.Sobot_CalendarView_sobot_month_view);
mYearViewClassPath = array.getString(R.styleable.Sobot_CalendarView_sobot_year_view);
mWeekViewClassPath = array.getString(R.styleable.Sobot_CalendarView_sobot_week_view);
mWeekBarClassPath = array.getString(R.styleable.Sobot_CalendarView_sobot_week_bar_view);
mWeekTextSize = array.getDimensionPixelSize(R.styleable.Sobot_CalendarView_sobot_week_text_size,
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));
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));
mSchemeText = array.getString(R.styleable.Sobot_CalendarView_scheme_text);
mSchemeText = array.getString(R.styleable.Sobot_CalendarView_sobot_scheme_text);
if (TextUtils.isEmpty(mSchemeText)) {
mSchemeText = "记";
}
mMonthViewScrollable = array.getBoolean(R.styleable.Sobot_CalendarView_month_view_scrollable, true);
mWeekViewScrollable = array.getBoolean(R.styleable.Sobot_CalendarView_week_view_scrollable, true);
mYearViewScrollable = array.getBoolean(R.styleable.Sobot_CalendarView_year_view_scrollable, true);
mMonthViewScrollable = array.getBoolean(R.styleable.Sobot_CalendarView_sobot_month_view_scrollable, true);
mWeekViewScrollable = array.getBoolean(R.styleable.Sobot_CalendarView_sobot_week_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);
mMonthViewShowMode = array.getInt(R.styleable.Sobot_CalendarView_month_view_show_mode, MODE_ALL_MONTH);
mWeekStart = array.getInt(R.styleable.Sobot_CalendarView_week_start_with, WEEK_START_WITH_SUN);
mSelectMode = array.getInt(R.styleable.Sobot_CalendarView_select_mode, SELECT_MODE_DEFAULT);
mMaxMultiSelectSize = array.getInt(R.styleable.Sobot_CalendarView_max_multi_select_size, Integer.MAX_VALUE);
mMinSelectRange = array.getInt(R.styleable.Sobot_CalendarView_min_select_range, -1);
mMaxSelectRange = array.getInt(R.styleable.Sobot_CalendarView_max_select_range, -1);
mMonthViewShowMode = array.getInt(R.styleable.Sobot_CalendarView_sobot_month_view_show_mode, MODE_ALL_MONTH);
mWeekStart = array.getInt(R.styleable.Sobot_CalendarView_sobot_week_start_with, WEEK_START_WITH_SUN);
mSelectMode = array.getInt(R.styleable.Sobot_CalendarView_sobot_select_mode, SELECT_MODE_DEFAULT);
mMaxMultiSelectSize = array.getInt(R.styleable.Sobot_CalendarView_sobot_max_multi_select_size, Integer.MAX_VALUE);
mMinSelectRange = array.getInt(R.styleable.Sobot_CalendarView_sobot_min_select_range, -1);
mMaxSelectRange = array.getInt(R.styleable.Sobot_CalendarView_sobot_max_select_range, -1);
setSelectRange(mMinSelectRange, mMaxSelectRange);
mWeekBackground = array.getColor(R.styleable.Sobot_CalendarView_week_background, Color.WHITE);
mWeekLineBackground = array.getColor(R.styleable.Sobot_CalendarView_week_line_background, Color.TRANSPARENT);
mYearViewBackground = array.getColor(R.styleable.Sobot_CalendarView_year_view_background, Color.WHITE);
mWeekTextColor = array.getColor(R.styleable.Sobot_CalendarView_week_text_color, 0xFF333333);
mWeekBackground = array.getColor(R.styleable.Sobot_CalendarView_sobot_week_background, Color.WHITE);
mWeekLineBackground = array.getColor(R.styleable.Sobot_CalendarView_sobot_week_line_background, Color.TRANSPARENT);
mYearViewBackground = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_background, Color.WHITE);
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);
mCurDayLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_current_day_lunar_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_sobot_current_day_lunar_text_color, Color.RED);
mSelectedThemeColor = array.getColor(R.styleable.Sobot_CalendarView_selected_theme_color, 0x50CFCFCF);
mSelectedTextColor = array.getColor(R.styleable.Sobot_CalendarView_selected_text_color, 0xFF111111);
mSelectedThemeColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_selected_theme_color, 0x50CFCFCF);
mSelectedTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_selected_text_color, 0xFF111111);
mSelectedLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_selected_lunar_text_color, 0xFF111111);
mCurrentMonthTextColor = array.getColor(R.styleable.Sobot_CalendarView_current_month_text_color, 0xFF111111);
mOtherMonthTextColor = array.getColor(R.styleable.Sobot_CalendarView_other_month_text_color, 0xFFe1e1e1);
mSelectedLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_selected_lunar_text_color, 0xFF111111);
mCurrentMonthTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_current_month_text_color, 0xFF111111);
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);
mOtherMonthLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_other_month_lunar_text_color, 0xffe1e1e1);
mMinYear = array.getInt(R.styleable.Sobot_CalendarView_min_year, 1971);
mMaxYear = array.getInt(R.styleable.Sobot_CalendarView_max_year, 2055);
mMinYearMonth = array.getInt(R.styleable.Sobot_CalendarView_min_year_month, 1);
mMaxYearMonth = array.getInt(R.styleable.Sobot_CalendarView_max_year_month, 12);
mMinYearDay = array.getInt(R.styleable.Sobot_CalendarView_min_year_day, 1);
mMaxYearDay = array.getInt(R.styleable.Sobot_CalendarView_max_year_day, -1);
mCurMonthLunarTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_current_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_sobot_min_year, 1971);
mMaxYear = array.getInt(R.styleable.Sobot_CalendarView_sobot_max_year, 2055);
mMinYearMonth = array.getInt(R.styleable.Sobot_CalendarView_sobot_min_year_month, 1);
mMaxYearMonth = array.getInt(R.styleable.Sobot_CalendarView_sobot_max_year_month, 12);
mMinYearDay = array.getInt(R.styleable.Sobot_CalendarView_sobot_min_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));
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));
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));
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));
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));
mYearViewMonthTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_month_text_color, 0xFF111111);
mYearViewDayTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_day_text_color, 0xFF111111);
mYearViewSchemeTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_scheme_color, mSchemeThemeColor);
mYearViewWeekTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_week_text_color, 0xFF333333);
mYearViewCurDayTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_current_day_text_color, mCurDayTextColor);
mYearViewSelectTextColor = array.getColor(R.styleable.Sobot_CalendarView_year_view_select_text_color, 0xFF333333);
mYearViewWeekTextSize = array.getDimensionPixelSize(R.styleable.Sobot_CalendarView_year_view_week_text_size,
mYearViewMonthTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_month_text_color, 0xFF111111);
mYearViewDayTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_day_text_color, 0xFF111111);
mYearViewSchemeTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_scheme_color, mSchemeThemeColor);
mYearViewWeekTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_week_text_color, 0xFF333333);
mYearViewCurDayTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_current_day_text_color, mCurDayTextColor);
mYearViewSelectTextColor = array.getColor(R.styleable.Sobot_CalendarView_sobot_year_view_select_text_color, 0xFF333333);
mYearViewWeekTextSize = array.getDimensionPixelSize(R.styleable.Sobot_CalendarView_sobot_year_view_week_text_size,
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));
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));
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));
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));
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));
if (mYearViewPadding != 0) {
......@@ -531,14 +531,14 @@ final class CalendarViewDelegate {
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));
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));
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));
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));
if (mMinYear <= MIN_YEAR) mMinYear = MIN_YEAR;
......
......@@ -180,17 +180,15 @@
</declare-styleable>
<declare-styleable name="SobotSubsamplingScaleImageView">
<attr name="sobot_src" format="reference"/>
<attr name="sobot_assetName" format="string"/>
<attr name="sobot_panEnabled" format="boolean"/>
<attr name="sobot_zoomEnabled" format="boolean"/>
<attr name="sobot_quickScaleEnabled" format="boolean"/>
<attr name="sobot_tileBackgroundColor" format="color"/>
<attr name="sobot_src" format="reference" />
<attr name="sobot_assetName" format="string" />
<attr name="sobot_panEnabled" format="boolean" />
<attr name="sobot_zoomEnabled" format="boolean" />
<attr name="sobot_quickScaleEnabled" format="boolean" />
<attr name="sobot_tileBackgroundColor" format="color" />
</declare-styleable>
<!--圆形-->
<attr name="sobot_round_as_circle" format="boolean" />
<!--全部圆角半径-->
......@@ -249,100 +247,100 @@
<declare-styleable name="Sobot_CalendarView">
<attr name="calendar_padding" format="dimension" /><!--日历内部左右padding-->
<attr name="calendar_padding_left" format="dimension" /><!--日历内部左padding-->
<attr name="calendar_padding_right" format="dimension" /><!--日历内部右padding-->
<attr name="week_background" format="color" /><!--周背景-->
<attr name="week_line_background" format="color" /><!--线条颜色-->
<attr name="week_text_color" format="color" /><!--周栏字体颜色-->
<attr name="week_text_size" format="dimension" /><!--周栏字体大小-->
<attr name="week_line_margin" format="dimension" /><!--线条margin-->
<attr name="month_view" format="string" /><!--完全自定义月视图-->
<attr name="week_view" format="string" /> <!--完全自定义周视图-->
<attr name="year_view" format="string" /> <!--完全自定义年视图-->
<attr name="week_bar_height" format="dimension" /> <!--星期栏的高度-->
<attr name="week_bar_view" format="string" /> <!--如果需要的话使用自定义星期栏-->
<attr name="scheme_text" format="string" />
<attr name="day_text_size" format="dimension" />
<attr name="lunar_text_size" format="dimension" />
<attr name="calendar_height" format="dimension" />
<attr name="calendar_match_parent" format="boolean" /> <!-- 全屏日历 -->
<attr name="scheme_text_color" format="color" />
<attr name="scheme_month_text_color" format="color" />
<attr name="scheme_lunar_text_color" format="color" />
<attr name="scheme_theme_color" format="color" />
<attr name="selected_theme_color" format="color" />
<attr name="selected_text_color" format="color" />
<attr name="selected_lunar_text_color" format="color" />
<attr name="current_day_text_color" format="color" />
<attr name="current_day_lunar_text_color" format="color" />
<attr name="current_month_text_color" format="color" />
<attr name="other_month_text_color" format="color" />
<attr name="current_month_lunar_text_color" format="color" />
<attr name="other_month_lunar_text_color" format="color" />
<attr name="sobot_calendar_padding" format="dimension" /><!--日历内部左右padding-->
<attr name="sobot_calendar_padding_left" format="dimension" /><!--日历内部左padding-->
<attr name="sobot_calendar_padding_right" format="dimension" /><!--日历内部右padding-->
<attr name="sobot_week_background" format="color" /><!--周背景-->
<attr name="sobot_week_line_background" format="color" /><!--线条颜色-->
<attr name="sobot_week_text_color" format="color" /><!--周栏字体颜色-->
<attr name="sobot_week_text_size" format="dimension" /><!--周栏字体大小-->
<attr name="sobot_week_line_margin" format="dimension" /><!--线条margin-->
<attr name="sobot_month_view" format="string" /><!--完全自定义月视图-->
<attr name="sobot_week_view" format="string" /> <!--完全自定义周视图-->
<attr name="sobot_year_view" format="string" /> <!--完全自定义年视图-->
<attr name="sobot_week_bar_height" format="dimension" /> <!--星期栏的高度-->
<attr name="sobot_week_bar_view" format="string" /> <!--如果需要的话使用自定义星期栏-->
<attr name="sobot_scheme_text" format="string" />
<attr name="sobot_day_text_size" format="dimension" />
<attr name="sobot_lunar_text_size" format="dimension" />
<attr name="sobot_calendar_height" format="dimension" />
<attr name="sobot_calendar_match_parent" format="boolean" /> <!-- 全屏日历 -->
<attr name="sobot_scheme_text_color" format="color" />
<attr name="sobot_scheme_month_text_color" format="color" />
<attr name="sobot_scheme_lunar_text_color" format="color" />
<attr name="sobot_scheme_theme_color" format="color" />
<attr name="sobot_selected_theme_color" format="color" />
<attr name="sobot_selected_text_color" format="color" />
<attr name="sobot_selected_lunar_text_color" format="color" />
<attr name="sobot_current_day_text_color" format="color" />
<attr name="sobot_current_day_lunar_text_color" format="color" />
<attr name="sobot_current_month_text_color" format="color" />
<attr name="sobot_other_month_text_color" format="color" />
<attr name="sobot_current_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="year_view_day_text_size" format="dimension" />
<attr name="year_view_month_text_color" format="color" />
<attr name="year_view_current_day_text_color" format="color" />
<attr name="year_view_day_text_color" format="color" />
<attr name="year_view_select_text_color" format="color" />
<attr name="year_view_scheme_color" format="color" />
<attr name="year_view_background" format="color" />
<attr name="year_view_month_height" format="dimension" />
<attr name="year_view_week_height" format="dimension" />
<attr name="year_view_week_text_size" format="dimension" />
<attr name="year_view_week_text_color" format="color" />
<attr name="year_view_padding" format="dimension" />
<attr name="year_view_padding_left" format="dimension" />
<attr name="year_view_padding_right" format="dimension" />
<attr name="year_view_month_padding_top" format="dimension" />
<attr name="year_view_month_padding_left" format="dimension" />
<attr name="year_view_month_padding_right" format="dimension" />
<attr name="year_view_month_padding_bottom" format="dimension" />
<attr name="sobot_year_view_month_text_size" format="dimension" />
<attr name="sobot_year_view_day_text_size" format="dimension" />
<attr name="sobot_year_view_month_text_color" format="color" />
<attr name="sobot_year_view_current_day_text_color" format="color" />
<attr name="sobot_year_view_day_text_color" format="color" />
<attr name="sobot_year_view_select_text_color" format="color" />
<attr name="sobot_year_view_scheme_color" format="color" />
<attr name="sobot_year_view_background" format="color" />
<attr name="sobot_year_view_month_height" format="dimension" />
<attr name="sobot_year_view_week_height" format="dimension" />
<attr name="sobot_year_view_week_text_size" format="dimension" />
<attr name="sobot_year_view_week_text_color" format="color" />
<attr name="sobot_year_view_padding" format="dimension" />
<attr name="sobot_year_view_padding_left" format="dimension" />
<attr name="sobot_year_view_padding_right" format="dimension" />
<attr name="sobot_year_view_month_padding_top" format="dimension" />
<attr name="sobot_year_view_month_padding_left" format="dimension" />
<attr name="sobot_year_view_month_padding_right" format="dimension" />
<attr name="sobot_year_view_month_padding_bottom" format="dimension" />
<!--日期范围-->
<attr name="min_year" format="integer" />
<attr name="max_year" format="integer" />
<attr name="min_year_month" format="integer" />
<attr name="max_year_month" format="integer" />
<attr name="min_year_day" format="integer" />
<attr name="max_year_day" format="integer" />
<attr name="sobot_min_year" format="integer" />
<attr name="sobot_max_year" format="integer" />
<attr name="sobot_min_year_month" format="integer" />
<attr name="sobot_max_year_month" format="integer" />
<attr name="sobot_min_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_only_current" value="1" />
<enum name="mode_fix" value="2" />
</attr>
<!-- 自定义周起始 -->
<attr name="week_start_with">
<attr name="sobot_week_start_with">
<enum name="sun" value="1" />
<enum name="mon" value="2" />
<enum name="sat" value="7" />
</attr>
<!-- 自定义选择模式 -->
<attr name="select_mode">
<attr name="sobot_select_mode">
<enum name="default_mode" value="0" />
<enum name="single_mode" value="1" />
<enum name="range_mode" value="2" />
......@@ -350,14 +348,14 @@
</attr>
<!-- 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 -->
<attr name="min_select_range" format="integer" />
<attr name="max_select_range" format="integer" />
<attr name="sobot_min_select_range" format="integer" />
<attr name="sobot_max_select_range" format="integer" />
<!-- 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="last_select_day" value="1" />
<enum name="last_select_day_ignore_current" value="2" />
......@@ -366,24 +364,24 @@
<declare-styleable name="Sobot_CalendarLayout">
<attr name="default_status">
<attr name="sobot_default_status">
<enum name="expand" value="0" />
<enum name="shrink" value="1" />
</attr>
<!-- 手势模式 -->
<attr name="gesture_mode">
<attr name="sobot_gesture_mode">
<enum name="default_mode" value="0" />
<!--<enum name="only_calendar" value="1" />-->
<enum name="disabled" value="2" />
</attr>
<attr name="calendar_show_mode">
<attr name="sobot_calendar_show_mode">
<enum name="both_month_week_view" value="0" />
<enum name="only_week_view" value="1" />
<enum name="only_month_view" value="2" />
</attr>
<attr name="calendar_content_view_id" format="integer" />
<attr name="sobot_calendar_content_view_id" format="integer" />
</declare-styleable>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment