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

View File

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