mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-27 04:04:43 +01:00
Replace CardView usages with MaterialCardView.
This commit is contained in:
@@ -6,8 +6,8 @@ import android.graphics.Path
|
||||
import android.graphics.Rect
|
||||
import android.graphics.RectF
|
||||
import android.util.AttributeSet
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.core.graphics.withClip
|
||||
import com.google.android.material.card.MaterialCardView
|
||||
|
||||
/**
|
||||
* Adds manual clipping around the card. This ensures that software rendering
|
||||
@@ -16,7 +16,7 @@ import androidx.core.graphics.withClip
|
||||
class ClippedCardView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null
|
||||
) : CardView(context, attrs) {
|
||||
) : MaterialCardView(context, attrs) {
|
||||
|
||||
private val bounds = Rect()
|
||||
private val boundsF = RectF()
|
||||
|
||||
@@ -28,7 +28,7 @@ import kotlin.jvm.functions.Function2;
|
||||
* fill the bounds with a gradient.
|
||||
*
|
||||
* If you wish to apply clipping to this drawable, it is recommended to either use it with
|
||||
* a CardView or utilize {@link org.thoughtcrime.securesms.util.CustomDrawWrapperKt#customizeOnDraw(Drawable, Function2)}
|
||||
* a MaterialCardView or utilize {@link org.thoughtcrime.securesms.util.CustomDrawWrapperKt#customizeOnDraw(Drawable, Function2)}
|
||||
*/
|
||||
public final class RotatableGradientDrawable extends Drawable {
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
|
||||
import com.google.android.flexbox.AlignItems;
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.events.CallParticipant;
|
||||
@@ -116,7 +116,7 @@ public class CallParticipantsLayout extends FlexboxLayout {
|
||||
|
||||
private void update(int index, int count, @NonNull CallParticipant participant) {
|
||||
View view = getChildAt(index);
|
||||
CardView cardView = view.findViewById(R.id.group_call_participant_card_wrapper);
|
||||
MaterialCardView cardView = view.findViewById(R.id.group_call_participant_card_wrapper);
|
||||
CallParticipantView callParticipantView = view.findViewById(R.id.group_call_participant);
|
||||
|
||||
callParticipantView.setCallParticipant(participant);
|
||||
|
||||
Reference in New Issue
Block a user