After reviewing the results of ViewCompat.setOnApplyWindowInsetsListener, I found that when the SDK is below 30, the pixel values you receive cannot be used directly and need to be converted to DP. However, for SDK 30 and above, these values can be used as DP directly.