-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Update SDK 35 with Theme Fixing #1729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update SDK 35 with Theme Fixing #1729
Conversation
|
I'm adding a workaround to Roborazzi that uses |
|
Since we can reduce the number of screenshot changes, I updated the SDK and changed the theme. If you prefer, I can split this PR. We can change the theme first and then update the SDK to review the screenshot changes separately. |
|
@takahirom thank you so much for this, amazing work! And thanks for filing that bug. Quick question: why are some screenshots bigger than the references? |
|
@JoseAlcerreca The old screenshot height is 1403px, and the new screenshot height is 1500px.
The activity height might be 1000dp, and the old height might be 936dp. (1500 - 1403) / 1.5 The ActionBar height might be 64dp: I think the width has changed proportionally to the height. 1500 * 561 / 1403 |

As a maintainer of Roborazzi, I've created this Pull Request, but feel free to modify it as you like. Alternatively, you can use it as a reference and implement a different solution, then close this PR—there's no problem with that.
What I Have Done and Why
compileSdkVersionandtargetSdkVersionto 35.By default, when using
createComposeRulewithtargetSdkVersion35, the activity includes anActionBar. However, the framework does not provide padding for theActionBar, which results in overlapping screenshots.This is tracked in this issue.
https://issuetracker.google.com/issues/383368165
In this PR, we can specify the theme by using
android:themeforHiltComponentActivity.As a workaround, we can also specify
application android:theme="@android:style/Theme.Material.NoActionBar"for Compose.