我正在开发一个带有手势系统的应用程序,基本上如果我将iPhone转向左,我的应用程序将执行一项功能,如果我将iPhone转为右,其他功能,与其他人的手势.
我不知道如何使用它,我正在尝试搜索谷歌但不工作,结果只是触摸手势而不是动作手势.
有人有一个教程来帮助我吗?
我正在使用 jetpack compose (1.0.0-beta09) 在我的项目上实现一个屏幕,但我在屏幕上遇到了一个问题,即使键盘打开,页脚也需要始终可见,我知道我们有android 上的“adjustResize”在正常活动中解决了这个问题(我有很多带有这种页脚类型的屏幕并且它正在工作),但是在撰写时,如果我将 adjustmentResize 放在清单上或活动的 onCreate 方法上,键盘将继续隐藏页脚:
这是我没有打开键盘的屏幕,只是为了弄清楚我在说什么
这就是键盘打开的屏幕
清单活动标签,我试图打开屏幕,键盘已经打开,页脚在他上方可见:
<activity
android:name=".presentation.creation.billing.NewBookingBillingActivity"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppThemeBase.Compose"
android:windowSoftInputMode="stateVisible|adjustResize"/>Run Code Online (Sandbox Code Playgroud)
onCreate方法:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
injectFeature()
initView()
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
setContent {
BuildScreen()
}
}Run Code Online (Sandbox Code Playgroud)
我知道在清单和 onCreate 上使用 setSoftInputMode 是多余的,但我正在尝试任何方法。
-
我的屏幕合成范围:
Column(fillMaxSize){
- AppBar
- Box(fillMaxSize){
//lazycolumn used to enable scroll with bottom padding to prevent last item to be hided below the footer
- LazyColumn(fillMaxSize | contentPadding) {
//TextFields of the screen
}
//footer
- Box(fillMaxWidth | …Run Code Online (Sandbox Code Playgroud)android android-manifest window-soft-input-mode adjustpan android-jetpack-compose