0

I am using a MaterialButton with an icon, however I need this icon to be mirrored. This icon is external so modify it or creating a copy are not an option.

I have found examples of how to do it with ImageView, but nothing related to just the icon of the button.

<com.google.android.material.button.MaterialButton
                android:id="@+id/id"
                style="@style/style"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="text"
                app:icon="@drawable/icon" />
  • This can help https://stackoverflow.com/questions/36329687/android-mirror-vector-drawable – Zain Jul 16 '21 at 00:13
  • Most of the answers in that link are for flipping Views, I just need to flip the icon. The programmatically option throws me an exception: "VectorDrawable cannot be cast to android.graphics.drawable.BitmapDrawable" – user2327866 Jul 19 '21 at 15:58

0 Answers0