Skip to content

Target SDK 35 Migration For Chucker#110

Merged
aryan-meesho merged 5 commits intodevelopfrom
Target-SDK-35-Migration-Chucker
Aug 12, 2025
Merged

Target SDK 35 Migration For Chucker#110
aryan-meesho merged 5 commits intodevelopfrom
Target-SDK-35-Migration-Chucker

Conversation

@aryan-meesho
Copy link
Copy Markdown

@aryan-meesho aryan-meesho commented Aug 10, 2025

Jira: APT-4739

Added window insets handling for Android 15 (Target SDK 35) devices.

Before handling insets:

Screenshot_20250810_195059

After handling insets:

Screenshot_20250810_195034

*/
private fun setWindowInsets(view: View) {
if (Build.VERSION.SDK_INT >= 35) {
ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
        val systemBars = insets.getInsets(
            WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()
        )
        val ime = insets.getInsets(WindowInsetsCompat.Type.ime())

        // Prevent flicker between nav bar and keyboard
        v.updatePadding(
            left = systemBars.left,
            top = systemBars.top,
            right = systemBars.right,
            bottom = max(systemBars.bottom, ime.bottom)
        )

        // Pass through for children to handle too
        insets
    }

Copy link
Copy Markdown
Collaborator

@Prakhar-kuls Prakhar-kuls Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this work instead

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works the same as before. Have made these changes

* This handles system bars, display cutout, and IME insets.
*/
private fun setWindowInsets(view: View) {
if (Build.VERSION.SDK_INT >= 35) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can put this to caller site, wont need to come to this func itself if build version is less 35

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of these changes, should check this parent repo, and merge update for change logs
Chucker

Comment thread build.gradle Outdated
buildscript {
ext {
kotlinVersion = '1.6.21'
kotlinVersion = '1.7.20'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are similar to what we have in supply ?

Copy link
Copy Markdown
Collaborator

@Prakhar-kuls Prakhar-kuls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aryan-meesho aryan-meesho merged commit 4f32ce9 into develop Aug 12, 2025
2 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants