Skip to content

兼容WindowInsets #1

@xiaocydx

Description

@xiaocydx

对feat/insets分支的MainActivity补充window.setSoftInputMode(SOFT_INPUT_ADJUST_RESIZE),就能触发Insets回调:

import android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE

class MainActivity : AppCompatActivity() {
   override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         window.setSoftInputMode(SOFT_INPUT_ADJUST_RESIZE)
   }
}

在AndroidX的兼容基础上还需要兼容什么?这份文档总结了WindowInsets问题的根源及兼容方案,希望有帮助。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions