diff --git a/library/src/main/java/com/alamkanak/weekview/WeekView.kt b/library/src/main/java/com/alamkanak/weekview/WeekView.kt index cbac2ee58..71f73d370 100644 --- a/library/src/main/java/com/alamkanak/weekview/WeekView.kt +++ b/library/src/main/java/com/alamkanak/weekview/WeekView.kt @@ -615,10 +615,10 @@ class WeekView @JvmOverloads constructor(context: Context, attrs: AttributeSet? if (field == value) return field = value - mTodayHeaderTextPaint.textSize = field.toFloat() - mHeaderTextPaint.textSize = field.toFloat() - mTimeTextPaint.textSize = field.toFloat() - sideTitleTextPaint.textSize = field.toFloat() + mTodayHeaderTextPaint.textSize = value.toFloat() + mHeaderTextPaint.textSize = value.toFloat() + mTimeTextPaint.textSize = value.toFloat() + sideTitleTextPaint.textSize = value.toFloat() invalidate() } @@ -1027,6 +1027,7 @@ class WeekView @JvmOverloads constructor(context: Context, attrs: AttributeSet? mHeaderTextPaint.color = headerColumnTextColor mHeaderTextPaint.textAlign = Paint.Align.CENTER mHeaderTextPaint.textSize = textSize.toFloat() +// WeekViewUtil.getWeekdayWithNumericDayAndMonthFormat(context,) mHeaderTextPaint.getTextBounds(exampleTime, 0, exampleTime.length, rect) mHeaderTextHeight = rect.height().toFloat() mHeaderTextPaint.typeface = typeface diff --git a/sample/src/main/java/com/alamkanak/weekview/sample/BaseActivity.kt b/sample/src/main/java/com/alamkanak/weekview/sample/BaseActivity.kt index c4e3c4182..1697d534a 100644 --- a/sample/src/main/java/com/alamkanak/weekview/sample/BaseActivity.kt +++ b/sample/src/main/java/com/alamkanak/weekview/sample/BaseActivity.kt @@ -108,7 +108,6 @@ abstract class BaseActivity : AppCompatActivity(), WeekView.EventClickListener, override fun onOptionsItemSelected(item: MenuItem): Boolean { val id = item.itemId - setupDateTimeInterpreter(id == R.id.action_week_view) when (id) { R.id.action_today -> { weekView.goToToday() @@ -140,6 +139,8 @@ abstract class BaseActivity : AppCompatActivity(), WeekView.EventClickListener, } fun setDayViewType(dayViewType: Int) { + setupDateTimeInterpreter(dayViewType==TYPE_WEEK_VIEW) + when (dayViewType) { TYPE_DAY_VIEW -> { mWeekViewType = TYPE_DAY_VIEW