From 345c86dda1c5d4ade8272349d1a4ff26810c73b0 Mon Sep 17 00:00:00 2001 From: razeeman Date: Sun, 11 Feb 2024 18:34:05 +0300 Subject: [PATCH] fix big hint background not showing on low apis --- .../simpletimetracker/feature_views/HintBigView.kt | 9 --------- .../src/main/res/layout/hint_big_view_layout.xml | 12 ++++++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/features/feature_views/src/main/java/com/example/util/simpletimetracker/feature_views/HintBigView.kt b/features/feature_views/src/main/java/com/example/util/simpletimetracker/feature_views/HintBigView.kt index 1d9bf6d95..b09b56a35 100644 --- a/features/feature_views/src/main/java/com/example/util/simpletimetracker/feature_views/HintBigView.kt +++ b/features/feature_views/src/main/java/com/example/util/simpletimetracker/feature_views/HintBigView.kt @@ -1,13 +1,11 @@ package com.example.util.simpletimetracker.feature_views import android.content.Context -import android.content.res.ColorStateList import android.util.AttributeSet import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.isVisible import com.example.util.simpletimetracker.feature_views.databinding.HintBigViewLayoutBinding -import com.example.util.simpletimetracker.feature_views.extension.getThemedAttr import com.example.util.simpletimetracker.feature_views.extension.setOnClick class HintBigView @JvmOverloads constructor( @@ -42,7 +40,6 @@ class HintBigView @JvmOverloads constructor( } init { - initProps() initAttrs(context, attrs, defStyleAttr) } @@ -50,12 +47,6 @@ class HintBigView @JvmOverloads constructor( binding.btnHintBigClose.setOnClick(action) } - private fun initProps() { - setBackgroundResource(R.drawable.bg_rounded_corners) - val backgroundTint = context.getThemedAttr(R.attr.appActiveColor) - backgroundTintList = ColorStateList.valueOf(backgroundTint) - } - private fun initAttrs( context: Context, attrs: AttributeSet?, diff --git a/features/feature_views/src/main/res/layout/hint_big_view_layout.xml b/features/feature_views/src/main/res/layout/hint_big_view_layout.xml index e71a0ea8f..7caed2e12 100644 --- a/features/feature_views/src/main/res/layout/hint_big_view_layout.xml +++ b/features/feature_views/src/main/res/layout/hint_big_view_layout.xml @@ -5,10 +5,18 @@ android:id="@+id/containerChangeRecordUntrackedHint" android:layout_width="match_parent" android:layout_height="wrap_content" - tools:background="@drawable/bg_rounded_corners" - tools:backgroundTint="?appActiveColor" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> + +