Возникла проблема с использованием ShapeableImageView
компонента материала и установите shapeAppearanceOverlay
, чтобы сделать его круговым изображением. Это не отображается в окне просмотра. Похоже, мы установили видимость на GONE
. Тем не менее, он отлично показывает на устройстве.
Есть ли способ это исправить? или поскольку он все еще находится в 1.2.0-alpha05
, так что в разработке или известной ошибке?
Снимок экрана Viewport
Снимок экрана устройства
Библиотека материалов
implementation 'com.google.android.material:material:1.2.0-alpha05'
XML Код
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/v_blog_card_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/splash_background"
android:scaleType="centerCrop"
app:shapeAppearanceOverlay="@style/ImageCircleTheme"
app:layout_constraintTop_toBottomOf="@+id/v_blog_card_divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"/>
Стиль
<style name="ImageCircleTheme">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
</style>