|
@@ -1,19 +1,12 @@
|
|
|
package com.ys.bdtp.adm.mvvm.ui.screen.offline
|
|
|
|
|
|
-import androidx.compose.foundation.BorderStroke
|
|
|
import androidx.compose.foundation.Image
|
|
|
import androidx.compose.foundation.background
|
|
|
-import androidx.compose.foundation.layout.Box
|
|
|
-import androidx.compose.foundation.layout.Row
|
|
|
-import androidx.compose.foundation.layout.Spacer
|
|
|
-import androidx.compose.foundation.layout.fillMaxHeight
|
|
|
-import androidx.compose.foundation.layout.fillMaxSize
|
|
|
-import androidx.compose.foundation.layout.height
|
|
|
-import androidx.compose.foundation.layout.width
|
|
|
+import androidx.compose.foundation.border
|
|
|
+import androidx.compose.foundation.clickable
|
|
|
+import androidx.compose.foundation.layout.*
|
|
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
-import androidx.compose.material.Surface
|
|
|
import androidx.compose.material.Text
|
|
|
-import androidx.compose.material.TextButton
|
|
|
import androidx.compose.runtime.Composable
|
|
|
import androidx.compose.ui.Alignment
|
|
|
import androidx.compose.ui.Modifier
|
|
@@ -31,49 +24,61 @@ fun OfflineHeadMiddle() {
|
|
|
.width(300.dp)
|
|
|
.height(52.dp)
|
|
|
) {
|
|
|
-
|
|
|
- Row(
|
|
|
- modifier = Modifier
|
|
|
- .width(279.dp)
|
|
|
+ Row(modifier = Modifier.align(Alignment.Center)) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .width(139.dp)
|
|
|
.height(32.dp)
|
|
|
- .align(Alignment.Center)
|
|
|
-
|
|
|
- ) {
|
|
|
- // 全部同步
|
|
|
- Surface(
|
|
|
- shape = RoundedCornerShape(topStart = 4.dp, bottomStart = 4.dp, topEnd = 0.dp, bottomEnd = 0.dp),
|
|
|
- modifier = Modifier
|
|
|
- .weight(1f)
|
|
|
+ .background(
|
|
|
+ Color(0xFF0091FF),
|
|
|
+ shape = RoundedCornerShape(
|
|
|
+ topStart = 4.dp,
|
|
|
+ bottomStart = 4.dp,
|
|
|
+ topEnd = 0.dp,
|
|
|
+ bottomEnd = 0.dp
|
|
|
+ )
|
|
|
+ )
|
|
|
+ .clickable {}
|
|
|
) {
|
|
|
- TextButton(
|
|
|
- onClick = {},
|
|
|
- modifier = Modifier.width(139.dp).fillMaxHeight().background(Color(0xFF0091FF))
|
|
|
- ) {
|
|
|
- Text(text = "全部同步", color = Color.White, fontSize = 14.sp)
|
|
|
- }
|
|
|
+ Text(
|
|
|
+ text = "全部同步",
|
|
|
+ color = Color.White,
|
|
|
+ fontSize = 14.sp,
|
|
|
+ modifier = Modifier.align(Alignment.Center)
|
|
|
+ )
|
|
|
}
|
|
|
-
|
|
|
- // 停止同步
|
|
|
- Box(modifier = Modifier.weight(1f).fillMaxHeight()) {
|
|
|
-
|
|
|
- Surface(
|
|
|
- shape = RoundedCornerShape(
|
|
|
- topStart = 0.dp,
|
|
|
- bottomStart = 0.dp,
|
|
|
- topEnd = 4.dp,
|
|
|
- bottomEnd = 4.dp
|
|
|
- ),
|
|
|
- border = BorderStroke(1.dp, Color(0xFF9CA2A9)),
|
|
|
+ Box {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .width(140.dp)
|
|
|
+ .height(32.dp)
|
|
|
+ .background(
|
|
|
+ Color(0xFFFFFFFF),
|
|
|
+ shape = RoundedCornerShape(
|
|
|
+ topStart = 0.dp,
|
|
|
+ bottomStart = 0.dp,
|
|
|
+ topEnd = 4.dp,
|
|
|
+ bottomEnd = 4.dp
|
|
|
+ )
|
|
|
+ )
|
|
|
+ .border(
|
|
|
+ width = 1.dp,
|
|
|
+ color = Color.Gray,
|
|
|
+ shape = RoundedCornerShape(
|
|
|
+ topStart = 0.dp,
|
|
|
+ bottomStart = 0.dp,
|
|
|
+ topEnd = 4.dp,
|
|
|
+ bottomEnd = 4.dp
|
|
|
+ )
|
|
|
+ )
|
|
|
+ .clickable {}
|
|
|
) {
|
|
|
- TextButton(
|
|
|
- onClick = {},
|
|
|
- modifier = Modifier.width(140.dp).fillMaxHeight().background(Color.White),
|
|
|
-
|
|
|
- ) {
|
|
|
- Text(text = "停止同步", color = Color(0xFFD5D5D5), fontSize = 14.sp)
|
|
|
- }
|
|
|
+ Text(
|
|
|
+ text = "停止同步",
|
|
|
+ color = Color(0xFFD5D5D5),
|
|
|
+ fontSize = 14.sp,
|
|
|
+ modifier = Modifier.align(Alignment.Center)
|
|
|
+ )
|
|
|
}
|
|
|
- Spacer(modifier = Modifier.width(1.dp).fillMaxHeight().background(Color(0xFF0091FF)))
|
|
|
+ Spacer(modifier = Modifier.width(1.dp).height(32.dp).background(Color(0xFF0091FF)))
|
|
|
}
|
|
|
}
|
|
|
|