Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cee2e35 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make ValuePreference not clickable by default" into main

parents f4a4eedc fcc3a7c9
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -103,14 +103,22 @@ constructor(
        super.onBindViewHolder(holder)
        holder.isDividerAllowedAbove = false
        holder.isDividerAllowedBelow = false
        // ValuePreference should be not clickable
        holder.itemView.isClickable = false

        holder.findViewById(R.id.value_container_1)?.apply {
            // Prevent setting clickable to true when invoking setOnClickListener
            if (onValueClickListener != null) {
                setOnClickListener { onValueClickListener?.onValueClick(FIRST_ITEM) }
            }
            contentDescription = firstContentDescription
        }
        holder.findViewById(R.id.value_container_2)?.apply {
            if (secondaryContainerVisibility) {
                // Prevent setting clickable to true when invoking setOnClickListener
                if (onValueClickListener != null) {
                    setOnClickListener { onValueClickListener?.onValueClick(SECOND_ITEM) }
                }
                visibility = VISIBLE
                contentDescription = secondaryContentDescription
            } else {