Reputation: 31
So I have styled my android app with material components but didn't found any replacement for ImageView and/or ImageButton.
Upvotes: 3
Views: 1399
Reputation: 364694
About the ImageView
you can use the ShapeableImageView
which extends the AppCompatImageView
.
You can use something like:
<com.google.android.material.imageview.ShapeableImageView
android:scaleType="centerCrop"
android:adjustViewBounds="true"
app:shapeAppearanceOverlay="@style/customImageViewRounded"
app:srcCompat="@drawable/...."
with:
<style name="customImageViewRounded" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">32dp</item>
<item name="cornerFamilyBottomRight">cut</item>
<item name="cornerSizeBottomRight">50%</item>
<item name="cornerSizeBottomLeft">0dp</item>
</style>
Upvotes: 1
Reputation: 20714
Currently in v1.1.0, there's no MaterialImageView
or MaterialImageButton
.
But in v1.2.0, there's ShapeableImageView
coming out which extends AppCompatImageView
Upvotes: 0