Skip to content

Commit

Permalink
refactor: casts as a more generic ViewGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz committed Dec 30, 2023
1 parent d4dcd6f commit ca1b607
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.view.View
import android.view.ViewGroup
import android.widget.PopupMenu
import androidx.appcompat.app.AlertDialog
import androidx.cardview.widget.CardView
import androidx.lifecycle.findViewTreeLifecycleOwner
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
Expand Down Expand Up @@ -97,7 +96,7 @@ class FlexibleAdapter(
simpleKeyPin.visibility = if (bean.pinned) View.VISIBLE else View.INVISIBLE

// if (background != null) viewHolder.itemView.setBackground(background);
(itemView as CardView).background =
(itemView as ViewGroup).background =
theme.colors.getDrawable(
"long_text_back_color",
"key_border",
Expand Down

0 comments on commit ca1b607

Please sign in to comment.