UI调整
This commit is contained in:
@@ -72,37 +72,42 @@ fun NoticeScreenHeader(
|
|||||||
) {
|
) {
|
||||||
val nav = LocalNavController.current
|
val nav = LocalNavController.current
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
Row(
|
Box(modifier = Modifier.fillMaxWidth()) {
|
||||||
modifier = Modifier.fillMaxWidth(),
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
modifier = Modifier.fillMaxWidth(),
|
||||||
) {
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
//返回tab
|
) {
|
||||||
Image(
|
//返回tab
|
||||||
painter = painterResource(id = R.drawable.rider_pro_back_icon,),
|
|
||||||
contentDescription = title,
|
|
||||||
modifier = Modifier.size(24.dp).clickable(
|
|
||||||
indication = null,
|
|
||||||
interactionSource = remember { MutableInteractionSource() }
|
|
||||||
) {
|
|
||||||
nav.navigateUp()
|
|
||||||
},
|
|
||||||
colorFilter = ColorFilter.tint(AppColors.text)
|
|
||||||
)
|
|
||||||
Spacer(modifier = Modifier.size(12.dp))
|
|
||||||
Spacer(modifier = Modifier.width(110.dp))
|
|
||||||
Text(title, fontWeight = FontWeight.W800, fontSize = 17.sp, color = AppColors.text)
|
|
||||||
if (moreIcon) {
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
painter = painterResource(id = R.drawable.rider_pro_back_icon,),
|
||||||
contentDescription = "More",
|
contentDescription = title,
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp).clickable(
|
||||||
|
indication = null,
|
||||||
|
interactionSource = remember { MutableInteractionSource() }
|
||||||
|
) {
|
||||||
|
nav.navigateUp()
|
||||||
|
},
|
||||||
|
colorFilter = ColorFilter.tint(AppColors.text)
|
||||||
)
|
)
|
||||||
}
|
|
||||||
if (rightIcon != null) {
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
rightIcon()
|
if (moreIcon) {
|
||||||
|
Image(
|
||||||
|
painter = painterResource(id = R.drawable.rider_pro_more_horizon),
|
||||||
|
contentDescription = "More",
|
||||||
|
modifier = Modifier.size(24.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (rightIcon != null) {
|
||||||
|
rightIcon()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Text(
|
||||||
|
title, fontWeight = FontWeight.W800,
|
||||||
|
fontSize = 17.sp,
|
||||||
|
color = AppColors.text,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.Center)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ fun CommentNoticeScreen() {
|
|||||||
) {
|
) {
|
||||||
androidx.compose.foundation.Image(
|
androidx.compose.foundation.Image(
|
||||||
painter = painterResource(id = R.mipmap.rider_pro_followers_empty),
|
painter = painterResource(id = R.mipmap.rider_pro_followers_empty),
|
||||||
contentDescription = null,
|
contentDescription = "No Comment",
|
||||||
modifier = Modifier.size(140.dp)
|
modifier = Modifier.size(140.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.size(24.dp))
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
|
|||||||
@@ -69,8 +69,9 @@ fun FollowerNoticeScreen() {
|
|||||||
if (followers.itemCount == 0) {
|
if (followers.itemCount == 0) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize(),
|
.fillMaxSize()
|
||||||
contentAlignment = Alignment.Center
|
.padding(top=188.dp),
|
||||||
|
contentAlignment = Alignment.TopCenter
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
@@ -78,17 +79,17 @@ fun FollowerNoticeScreen() {
|
|||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(id = R.mipmap.rider_pro_followers_empty),
|
painter = painterResource(id = R.mipmap.rider_pro_followers_empty),
|
||||||
contentDescription = null,
|
contentDescription = "No Followers",
|
||||||
modifier = Modifier.size(140.dp)
|
modifier = Modifier.size(140.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.size(32.dp))
|
Spacer(modifier = Modifier.size(24.dp))
|
||||||
androidx.compose.material.Text(
|
androidx.compose.material.Text(
|
||||||
text = "No followers yet",
|
text = "No followers yet",
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.W600
|
fontWeight = FontWeight.W600
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.size(16.dp))
|
Spacer(modifier = Modifier.size(8.dp))
|
||||||
androidx.compose.material.Text(
|
androidx.compose.material.Text(
|
||||||
text = "Share your life and get more followers.",
|
text = "Share your life and get more followers.",
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ fun Agent() {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.height(36.dp)
|
.height(36.dp)
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.clip(shape = RoundedCornerShape(18.dp))
|
.clip(shape = RoundedCornerShape(8.dp))
|
||||||
.background(AppColors.inputBackground)
|
.background(AppColors.inputBackground)
|
||||||
.padding(horizontal = 8.dp, vertical = 0.dp)
|
.padding(horizontal = 8.dp, vertical = 0.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.aiosman.ravenow.ui.index.tabs.search
|
|||||||
|
|
||||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
@@ -12,10 +13,12 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.navigationBars
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
|
import androidx.compose.foundation.layout.offset
|
||||||
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.systemBars
|
import androidx.compose.foundation.layout.systemBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.layout.wrapContentHeight
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.pager.HorizontalPager
|
import androidx.compose.foundation.pager.HorizontalPager
|
||||||
import androidx.compose.foundation.pager.PagerState
|
import androidx.compose.foundation.pager.PagerState
|
||||||
@@ -60,6 +63,9 @@ import com.aiosman.ravenow.R
|
|||||||
import com.aiosman.ravenow.entity.AccountProfileEntity
|
import com.aiosman.ravenow.entity.AccountProfileEntity
|
||||||
import com.aiosman.ravenow.ui.composables.CustomAsyncImage
|
import com.aiosman.ravenow.ui.composables.CustomAsyncImage
|
||||||
import com.aiosman.ravenow.ui.composables.MomentCard
|
import com.aiosman.ravenow.ui.composables.MomentCard
|
||||||
|
import com.aiosman.ravenow.ui.composables.TabItem
|
||||||
|
import com.aiosman.ravenow.ui.composables.TabSpacer
|
||||||
|
import com.aiosman.ravenow.ui.index.tabs.message.tab.AgentChatListViewModel
|
||||||
import com.aiosman.ravenow.ui.modifiers.noRippleClickable
|
import com.aiosman.ravenow.ui.modifiers.noRippleClickable
|
||||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -137,6 +143,45 @@ fun SearchScreen() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加user、dynamic和ai标签页
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.wrapContentHeight()
|
||||||
|
.padding(start = 16.dp, top = 16.dp),
|
||||||
|
horizontalArrangement = Arrangement.Start,
|
||||||
|
verticalAlignment = Alignment.Bottom
|
||||||
|
) {
|
||||||
|
Box {
|
||||||
|
TabItem(
|
||||||
|
text = stringResource(R.string.users),
|
||||||
|
isSelected = pagerState.currentPage == 0,
|
||||||
|
onClick = {
|
||||||
|
// TODO: 实现点击逻辑
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
TabSpacer()
|
||||||
|
Box {
|
||||||
|
TabItem(
|
||||||
|
text = stringResource(R.string.index_dynamic),
|
||||||
|
isSelected = pagerState.currentPage == 1,
|
||||||
|
onClick = {
|
||||||
|
// TODO: 实现点击逻辑
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
TabSpacer()
|
||||||
|
Box {
|
||||||
|
TabItem(
|
||||||
|
text = stringResource(R.string.chat_ai),
|
||||||
|
isSelected = pagerState.currentPage == 2,
|
||||||
|
onClick = {
|
||||||
|
// TODO: 实现点击逻辑
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.showResult) {
|
if (model.showResult) {
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ fun LikeNoticeScreen() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spacer(modifier = Modifier.height(28.dp))
|
|
||||||
if (likes.itemCount == 0) {
|
if (likes.itemCount == 0) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize()
|
||||||
contentAlignment = Alignment.Center
|
.padding(top=188.dp),
|
||||||
|
contentAlignment = Alignment.TopCenter
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
@@ -98,12 +98,19 @@ fun LikeNoticeScreen() {
|
|||||||
contentDescription = "No Notice",
|
contentDescription = "No Notice",
|
||||||
modifier = Modifier.size(140.dp)
|
modifier = Modifier.size(140.dp)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(32.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
Text(
|
Text(
|
||||||
text = "Your like notification box is feeling lonely",
|
text = "Your like notification box is feeling lonely~",
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.W500,
|
fontWeight = FontWeight.W600,
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.size(8.dp))
|
||||||
|
Text(
|
||||||
|
text = "Agent&&friends might come upon seeing this~",
|
||||||
|
color = AppColors.text,
|
||||||
|
fontSize = 16.sp,
|
||||||
|
fontWeight = FontWeight.W400
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
<string name="bio">Signature</string>
|
<string name="bio">Signature</string>
|
||||||
<string name="nickname">Name</string>
|
<string name="nickname">Name</string>
|
||||||
<string name="comment">Comment</string>
|
<string name="comment">COMMENTS</string>
|
||||||
<string name="order_comment_default">Default</string>
|
<string name="order_comment_default">Default</string>
|
||||||
<string name="order_comment_latest">Latest</string>
|
<string name="order_comment_latest">Latest</string>
|
||||||
<string name="order_comment_earliest">Earliest</string>
|
<string name="order_comment_earliest">Earliest</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user