Fix: dynamically position title/content input fields below image grid based on layout type
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Fri Mar 06 23:02:01 CST 2026
|
||||
#Fri Mar 06 23:09:36 CST 2026
|
||||
path.4=14/classes.dex
|
||||
path.3=12/classes.dex
|
||||
path.2=10/classes.dex
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
פ8מ)ת*ר'‗&ט%<EFBFBD>!רש#
|
||||
פ8מ)ת*ר'‗&ט%<EFBFBD>!רש#<EFBFBD>#
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
40
|
||||
41
|
||||
0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
ëXè¾ú¹Ñ~Ì>Ňôï`ý¿ÄJùÉïNÔ›î×úbå4å²×?Í#à“À2èjÓ*ú3ð²À
|
||||
ëXè¾ú¹Ñ~Ì>Ňôï`ý¿ÄJùÉïNÔ›î×úbå4å²×?Í#à“À2èjÓ*ú3ð²ÀÚëð2ã;
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -258,27 +258,47 @@ fun MergeScreen(
|
||||
}
|
||||
}
|
||||
|
||||
// 图片网格
|
||||
LazyVerticalGrid(
|
||||
columns = GridCells.Fixed(layoutType.cols),
|
||||
contentPadding = PaddingValues(16.dp),
|
||||
// 图片网格 - 根据布局类型动态调整高度
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
) {
|
||||
itemsIndexed(images) { index, imageWithCache ->
|
||||
// 图片网格
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
) {
|
||||
// 动态创建行
|
||||
for (row in 0 until layoutType.rows) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||
) {
|
||||
for (col in 0 until layoutType.cols) {
|
||||
val index = row * layoutType.cols + col
|
||||
if (index < images.size || index < layoutType.maxImages) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f)
|
||||
.aspectRatio(1f)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color.LightGray)
|
||||
.clickable {
|
||||
.then(
|
||||
if (index < images.size) {
|
||||
Modifier.clickable {
|
||||
selectedImageIndex = index
|
||||
imagePickerLauncher.launch("image/*")
|
||||
}
|
||||
} else {
|
||||
Modifier.clickable {
|
||||
imagePickerLauncher.launch("image/*")
|
||||
}
|
||||
}
|
||||
)
|
||||
) {
|
||||
if (index < images.size) {
|
||||
val imageWithCache = images[index]
|
||||
AsyncImage(
|
||||
model = ImageRequest.Builder(context)
|
||||
.data(imageWithCache.uri)
|
||||
@@ -304,35 +324,7 @@ fun MergeScreen(
|
||||
modifier = Modifier.size(16.dp)
|
||||
)
|
||||
}
|
||||
|
||||
// 替换图标
|
||||
Icon(
|
||||
Icons.Default.Refresh,
|
||||
contentDescription = "替换",
|
||||
tint = Color.White,
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomEnd)
|
||||
.size(32.dp)
|
||||
.padding(4.dp)
|
||||
.background(Color.Black.copy(alpha = 0.5f), CircleShape)
|
||||
.padding(4.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 添加图片按钮
|
||||
if (images.size < layoutType.maxImages) {
|
||||
item {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.aspectRatio(1f)
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(Color.LightGray.copy(alpha = 0.5f))
|
||||
.clickable {
|
||||
imagePickerLauncher.launch("image/*")
|
||||
},
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
} else {
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
contentDescription = "添加图片",
|
||||
@@ -341,6 +333,15 @@ fun MergeScreen(
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
}
|
||||
}
|
||||
}
|
||||
if (row < layoutType.rows - 1) {
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user