Skip to content

Commit

Permalink
Added margins to week numbers in month views (FossifyOrg#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aga-C committed Jul 25, 2024
1 parent cf0b815 commit 75c9d97
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
val weekOfYear = days.getOrNull(i * 7 + 3)?.weekOfYear ?: 1
val id = "$weekOfYear:"
val yPos = i * dayHeight + weekDaysLetterHeight
canvas.drawText(id, horizontalOffset.toFloat() * 0.9f, yPos + textPaint.textSize, weekNumberPaint)
canvas.drawText(id, horizontalOffset.toFloat(), yPos + textPaint.textSize, weekNumberPaint)
}
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout-land/fragment_month_day.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:id="@+id/month_day_view_wrapper"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/smaller_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/month_day_list_holder"
app:layout_constraintWidth_percent="0.45" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_month.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:id="@+id/month_view_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/smaller_margin"
android:layout_below="@+id/top_left_arrow" />

</RelativeLayout>
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_month_day.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:id="@+id/month_day_view_wrapper"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/small_margin"
app:layout_constraintBottom_toTopOf="@+id/month_day_list_holder"
app:layout_constraintHeight_percent="0.3"
app:layout_constraintStart_toStartOf="parent"
Expand Down

0 comments on commit 75c9d97

Please sign in to comment.