readding the background clickable views in monthly day view, just without ripple

This commit is contained in:
tibbi 2021-02-22 19:21:59 +01:00
parent e545ff30ad
commit 20345e3405
2 changed files with 6 additions and 7 deletions

View File

@ -70,10 +70,6 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
}
private fun addClickableBackgrounds() {
if (isMonthDayView) {
return
}
removeAllViews()
monthView = inflater.inflate(R.layout.month_view, this).month_view
wereViewsAdded = true
@ -93,6 +89,10 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
private fun addViewBackground(xPos: Float, yPos: Float, day: DayMonthly) {
inflater.inflate(R.layout.month_view_background, this, false).apply {
if (isMonthDayView) {
background = null
}
layoutParams.width = dayWidth.toInt()
layoutParams.height = dayHeight.toInt()
x = xPos

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<View
xmlns:android="http://schemas.android.com/apk/res/android"
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/month_view_background"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?attr/selectableItemBackground"/>
android:background="?attr/selectableItemBackground" />