扩大点击范围
This commit is contained in:
@@ -3,9 +3,11 @@ package com.sw.inbound.ui.weight
|
||||
import android.content.Intent
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.combinedClickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -24,6 +26,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
@@ -76,24 +79,30 @@ fun TopTitleBar(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
Text(
|
||||
text = title,
|
||||
style = TextStyle(
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = colorResource(R.color.title),
|
||||
fontSize = 36.sp
|
||||
),
|
||||
modifier = Modifier.wrapContentSize()
|
||||
|
||||
Box(modifier = Modifier
|
||||
.wrapContentSize()
|
||||
.clickable(onClick = {
|
||||
MyApp.instance?.run {
|
||||
startActivity(
|
||||
Intent(this, FoodCollectionActivity::class.java).apply{
|
||||
Intent(this, FoodCollectionActivity::class.java).apply {
|
||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
)
|
||||
})) {
|
||||
Text(
|
||||
text = title,
|
||||
style = TextStyle(
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = colorResource(R.color.title),
|
||||
fontSize = 36.sp
|
||||
),
|
||||
modifier = Modifier
|
||||
.wrapContentSize()
|
||||
.padding(10.dp)
|
||||
)
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.weight(1f))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user