Messaging: Extend AppCompatImageView instead of ImageView

Follow AS recommendation

Change-Id: Id3577cce05e73593183ea33d93c97858f9977a17
This commit is contained in:
Michael W
2025-04-10 13:24:40 +02:00
parent 7acbc6a9ca
commit 37e5757779

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2015 The Android Open Source Project * Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project * Copyright (C) 2024-2025 The LineageOS Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -28,9 +28,9 @@ import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.ImageView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
import com.android.messaging.R; import com.android.messaging.R;
import com.android.messaging.datamodel.binding.Binding; import com.android.messaging.datamodel.binding.Binding;
@@ -53,7 +53,8 @@ import java.util.HashSet;
/** /**
* An ImageView used to asynchronously request an image from MediaResourceManager and render it. * An ImageView used to asynchronously request an image from MediaResourceManager and render it.
*/ */
public class AsyncImageView extends ImageView implements MediaResourceLoadListener<ImageResource> { public class AsyncImageView extends AppCompatImageView implements
MediaResourceLoadListener<ImageResource> {
private static final String TAG = LogUtil.BUGLE_DATAMODEL_TAG; private static final String TAG = LogUtil.BUGLE_DATAMODEL_TAG;
// 100ms delay before disposing the image in case the AsyncImageView is re-added to the UI // 100ms delay before disposing the image in case the AsyncImageView is re-added to the UI
private static final int DISPOSE_IMAGE_DELAY = 100; private static final int DISPOSE_IMAGE_DELAY = 100;