You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are currently more and more users using large-screen Android devices, and these devices often allow users to resize the App window, which makes it necessary for us to display layouts correctly when the user resizes the window.
In my application, I have integrated the CropImageView from your project and set its width and height attributes to match_parent. However, upon resizing the window, the CropImageView fails to respect the match_parent setting, as illustrated in the attached screen recording:
2024-01-28.215508_o.mp4
To facilitate your understanding of the problem, I've prepared a simple, minimal reproducible project following these steps:
Created an Empty Views Activity project.
Added the dependency com.vanniktech:android-image-cropper:4.5.0.
Set MainActivity to android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|density|screenSize|smallestScreenSize" in AndroidManifest.xml to prevent the Android system from recreating the entire activity upon changes in the application's window size.
Placed a photo named image.webp in /res/raw/.
Defined the contents of activity_main.xml and MainActivity.kt as provided in the attached code snippet:
While the screen recording was captured in the Windows Subsystem for Android, I have validated that this issue persists across Desktop virtual devices (in Android Studio) and MIUI physical devices.
Ideally, when the width and height of the CropImageView are set to match_parent, its size should consistently adhere to that of the parent layout, maintaining parity with the behavior of other Views, such as the ImageView below:
2024-01-28.224837_o.mp4
I would greatly appreciate any insights or assistance you can provide in resolving this matter. Please let me know if further clarification or additional information is needed from my end. Thank you for your attention to this issue, and I look forward to your response.
The text was updated successfully, but these errors were encountered:
There are currently more and more users using large-screen Android devices, and these devices often allow users to resize the App window, which makes it necessary for us to display layouts correctly when the user resizes the window.
In my application, I have integrated the
CropImageView
from your project and set its width and height attributes tomatch_parent
. However, upon resizing the window, theCropImageView
fails to respect thematch_parent
setting, as illustrated in the attached screen recording:2024-01-28.215508_o.mp4
To facilitate your understanding of the problem, I've prepared a simple, minimal reproducible project following these steps:
Empty Views Activity
project.com.vanniktech:android-image-cropper:4.5.0
.MainActivity
toandroid:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|density|screenSize|smallestScreenSize"
inAndroidManifest.xml
to prevent the Android system from recreating the entire activity upon changes in the application's window size.image.webp
in/res/raw/
.activity_main.xml
andMainActivity.kt
as provided in the attached code snippet:You may download this project file to quickly verify the issue: CropperViewSizeIssue.zip
While the screen recording was captured in the Windows Subsystem for Android, I have validated that this issue persists across Desktop virtual devices (in Android Studio) and MIUI physical devices.
Ideally, when the width and height of the
CropImageView
are set tomatch_parent
, its size should consistently adhere to that of the parent layout, maintaining parity with the behavior of other Views, such as the ImageView below:2024-01-28.224837_o.mp4
I would greatly appreciate any insights or assistance you can provide in resolving this matter. Please let me know if further clarification or additional information is needed from my end. Thank you for your attention to this issue, and I look forward to your response.
The text was updated successfully, but these errors were encountered: