feat: #259 编辑页面 FAB 支持随输入法上下移动
This commit is contained in:
parent
47abaa12cc
commit
2fe9c9df6c
2 changed files with 10 additions and 6 deletions
|
|
@ -34,7 +34,7 @@ android {
|
||||||
applicationId = "cn.super12138.todo"
|
applicationId = "cn.super12138.todo"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 690
|
versionCode = 701
|
||||||
versionName = "2.1.2"
|
versionName = "2.1.2"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.imePadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.sizeIn
|
import androidx.compose.foundation.layout.sizeIn
|
||||||
|
|
@ -126,7 +127,8 @@ fun TodoEditorPage(
|
||||||
text = stringResource(R.string.action_delete),
|
text = stringResource(R.string.action_delete),
|
||||||
expanded = true,
|
expanded = true,
|
||||||
containerColor = MaterialTheme.colorScheme.errorContainer,
|
containerColor = MaterialTheme.colorScheme.errorContainer,
|
||||||
onClick = { showDeleteConfirmDialog = true }
|
onClick = { showDeleteConfirmDialog = true },
|
||||||
|
modifier = Modifier.imePadding()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
AnimatedExtendedFloatingActionButton(
|
AnimatedExtendedFloatingActionButton(
|
||||||
|
|
@ -152,10 +154,12 @@ fun TodoEditorPage(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
modifier = Modifier.sharedElement(
|
modifier = Modifier
|
||||||
sharedContentState = rememberSharedContentState(key = Constants.KEY_TODO_FAB_TRANSITION),
|
.imePadding()
|
||||||
animatedVisibilityScope = animatedVisibilityScope
|
.sharedElement(
|
||||||
)
|
sharedContentState = rememberSharedContentState(key = Constants.KEY_TODO_FAB_TRANSITION),
|
||||||
|
animatedVisibilityScope = animatedVisibilityScope
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue