Android Studio ImageView Change Only Width and Maintain Aspect Ratio
I've got an imageview, like this: <ImageView android:id="@+id/add_image_signup" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/other_text" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" app:srcCompat="@drawable/add_button" /> which I'm trying to scale programmatically (based on device size) with Layout Params. Something like this works great: val displayMetrics = DisplayMetrics() windowManager.defaultDisplay.getMetrics(displayMetrics) val height…