Skip to content

Commit

Permalink
Merge pull request #102 from PawWithU/feature/notice_detail
Browse files Browse the repository at this point in the history
feature/notice detail: TopAppBar에 공유 버튼 추가
  • Loading branch information
kang9366 authored Mar 27, 2024
2 parents 290a499 + 6266cda commit c62a649
Show file tree
Hide file tree
Showing 75 changed files with 41 additions and 14 deletions.
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Divider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -75,11 +77,9 @@ fun DetailScreen(

Scaffold(
topBar = {
ConnectDogTopAppBar(
titleRes = null,
navigationType = TopAppBarNavigationType.BACK,
navigationIconContentDescription = "Navigation icon",
onNavigationClick = onBackClick
DetailTopAppBar(
onBackClick = onBackClick,
onShareClick = {}
)
},
bottomBar = {
Expand Down Expand Up @@ -114,6 +114,27 @@ fun DetailScreen(
}
}

@Composable
private fun DetailTopAppBar(
onBackClick: () -> Unit,
onShareClick: () -> Unit
) {
ConnectDogTopAppBar(
titleRes = null,
navigationType = TopAppBarNavigationType.BACK,
navigationIconContentDescription = "Navigation icon home",
onNavigationClick = onBackClick,
actionButtons = {
IconButton(onClick = onShareClick) {
Icon(
painter = painterResource(id = R.drawable.ic_share),
contentDescription = "Navigate to Search"
)
}
}
)
}

@Composable
fun BookmarkButton(
isBookmark: Boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.kusitms.connectdog.feature.home.screen

import android.util.Log
import android.widget.Toast
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand Down Expand Up @@ -43,7 +42,6 @@ import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.ColorPainter
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
Expand Down Expand Up @@ -115,7 +113,7 @@ private fun HomeScreen(
) {
TopTitle(modifier = Modifier.padding(20.dp))
StatisticBanner(modifier = Modifier.padding(start = 20.dp, end = 20.dp, bottom = 20.dp))
BannerGuideline()
BannerGuideline(onNavigateToSearch)
MoveContent(onClick = { onNavigateToSearch() }, titleRes = R.string.home_navigate_search)
AnnouncementContent(announcementUiState, onClick = onNavigateToDetail)
MoveContent(onClick = { onNavigateToReview() }, titleRes = R.string.home_navigate_review)
Expand Down Expand Up @@ -169,8 +167,7 @@ private fun TopTitle(modifier: Modifier) {
private fun StatisticBanner(modifier: Modifier) {
Column(horizontalAlignment = Alignment.End, modifier = modifier) {
Row(
modifier = Modifier
.padding(end = 10.dp),
modifier = Modifier.padding(end = 10.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
Expand Down Expand Up @@ -261,8 +258,9 @@ private fun StatisticInfoItem(
}

@Composable
private fun BannerGuideline() {
val context = LocalContext.current
private fun BannerGuideline(
onNavigateToReview: () -> Unit
) {
Row(
modifier = Modifier
.fillMaxWidth()
Expand All @@ -278,7 +276,7 @@ private fun BannerGuideline() {
color = MaterialTheme.colorScheme.background
)
Button(
onClick = { Toast.makeText(context, "아직 준비중인 기능입니다.", Toast.LENGTH_SHORT).show() },
onClick = onNavigateToReview,
colors = ButtonDefaults.buttonColors(
containerColor = MaterialTheme.colorScheme.background,
contentColor = MaterialTheme.colorScheme.primary
Expand Down
9 changes: 9 additions & 0 deletions feature/home/src/main/res/drawable/ic_share.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="20dp"
android:viewportWidth="18"
android:viewportHeight="20">
<path
android:pathData="M15,20C14.167,20 13.458,19.708 12.875,19.125C12.292,18.542 12,17.833 12,17C12,16.883 12.008,16.763 12.025,16.638C12.042,16.513 12.067,16.4 12.1,16.3L5.05,12.2C4.767,12.45 4.45,12.646 4.1,12.788C3.75,12.929 3.383,13 3,13C2.167,13 1.458,12.708 0.875,12.125C0.292,11.542 0,10.833 0,10C0,9.167 0.292,8.458 0.875,7.875C1.458,7.292 2.167,7 3,7C3.383,7 3.75,7.071 4.1,7.213C4.45,7.354 4.767,7.55 5.05,7.8L12.1,3.7C12.067,3.6 12.042,3.487 12.025,3.362C12.008,3.237 12,3.117 12,3C12,2.167 12.292,1.458 12.875,0.875C13.458,0.292 14.167,0 15,0C15.833,0 16.542,0.292 17.125,0.875C17.708,1.458 18,2.167 18,3C18,3.833 17.708,4.542 17.125,5.125C16.542,5.708 15.833,6 15,6C14.617,6 14.25,5.929 13.9,5.787C13.55,5.646 13.233,5.45 12.95,5.2L5.9,9.3C5.933,9.4 5.958,9.512 5.975,9.637C5.992,9.762 6,9.883 6,10C6,10.117 5.992,10.238 5.975,10.363C5.958,10.488 5.933,10.6 5.9,10.7L12.95,14.8C13.233,14.55 13.55,14.354 13.9,14.212C14.25,14.071 14.617,14 15,14C15.833,14 16.542,14.292 17.125,14.875C17.708,15.458 18,16.167 18,17C18,17.833 17.708,18.542 17.125,19.125C16.542,19.708 15.833,20 15,20ZM15,4C15.283,4 15.521,3.904 15.712,3.713C15.904,3.521 16,3.283 16,3C16,2.717 15.904,2.479 15.712,2.287C15.521,2.096 15.283,2 15,2C14.717,2 14.479,2.096 14.288,2.287C14.096,2.479 14,2.717 14,3C14,3.283 14.096,3.521 14.288,3.713C14.479,3.904 14.717,4 15,4ZM3,11C3.283,11 3.521,10.904 3.713,10.712C3.904,10.521 4,10.283 4,10C4,9.717 3.904,9.479 3.713,9.288C3.521,9.096 3.283,9 3,9C2.717,9 2.479,9.096 2.287,9.288C2.096,9.479 2,9.717 2,10C2,10.283 2.096,10.521 2.287,10.712C2.479,10.904 2.717,11 3,11ZM15,18C15.283,18 15.521,17.904 15.712,17.712C15.904,17.521 16,17.283 16,17C16,16.717 15.904,16.479 15.712,16.288C15.521,16.096 15.283,16 15,16C14.717,16 14.479,16.096 14.288,16.288C14.096,16.479 14,16.717 14,17C14,17.283 14.096,17.521 14.288,17.712C14.479,17.904 14.717,18 15,18Z"
android:fillColor="#1C1B1F"/>
</vector>
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.kusitms.connectdog.core.data.api.model.intermediator.IntermediatorProfileInfoResponseItem;
import com.kusitms.connectdog.core.data.repository.InterManagementRepository;
import com.kusitms.connectdog.core.model.DataUiState;
import com.kusitms.connectdog.core.model.InterApplication;
Expand Down
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.

0 comments on commit c62a649

Please sign in to comment.