-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from mash-up-kr/feat/home_update
[Feat] 홈 변경사항 반영
- Loading branch information
Showing
7 changed files
with
230 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="16dp" | ||
android:height="17dp" | ||
android:viewportWidth="16" | ||
android:viewportHeight="17"> | ||
<path | ||
android:pathData="M4.4,2.1L11.067,2.1A2,2 0,0 1,13.067 4.1L13.067,12.9A2,2 0,0 1,11.067 14.9L4.4,14.9A2,2 0,0 1,2.4 12.9L2.4,4.1A2,2 0,0 1,4.4 2.1z" | ||
android:strokeWidth="1.59994" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M7.833,10.5V6.5M7.833,6.5L5.833,7.833M7.833,6.5L9.833,7.833" | ||
android:strokeWidth="1.59994" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
</vector> |
158 changes: 81 additions & 77 deletions
158
core/designsystem/src/main/res/drawable/logo_farmeme.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="recommendation_title">추천</string> | ||
<string name="recommendation_title">둘러보기</string> | ||
<string name="search_title">검색</string> | ||
<string name="mypage_title">마이</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
feature/recommendation/src/main/java/team/ppac/recommendation/component/UploadButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package team.ppac.recommendation.component | ||
|
||
import androidx.compose.animation.core.LinearEasing | ||
import androidx.compose.animation.core.RepeatMode | ||
import androidx.compose.animation.core.animateFloat | ||
import androidx.compose.animation.core.infiniteRepeatable | ||
import androidx.compose.animation.core.rememberInfiniteTransition | ||
import androidx.compose.animation.core.tween | ||
import androidx.compose.foundation.background | ||
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.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.material.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.draw.drawWithContent | ||
import androidx.compose.ui.graphics.Brush | ||
import androidx.compose.ui.graphics.drawscope.rotate | ||
import androidx.compose.ui.unit.dp | ||
import team.ppac.designsystem.FarmemeTheme | ||
import team.ppac.designsystem.foundation.FarmemeIcon | ||
import team.ppac.designsystem.foundation.FarmemeRadius | ||
import team.ppac.designsystem.util.extension.noRippleClickable | ||
|
||
@Composable | ||
internal fun UploadButton( | ||
modifier: Modifier = Modifier, | ||
onClick: () -> Unit, | ||
) { | ||
val transition = rememberInfiniteTransition(label = "transition") | ||
val angle by transition.animateFloat( | ||
initialValue = 0f, | ||
targetValue = 360f, | ||
animationSpec = infiniteRepeatable( | ||
animation = tween(1000, easing = LinearEasing), | ||
repeatMode = RepeatMode.Restart, | ||
), | ||
label = "angle animation" | ||
) | ||
val brush = Brush.sweepGradient( | ||
colors = buildList { | ||
add(FarmemeTheme.backgroundColor.brand) | ||
add(FarmemeTheme.backgroundColor.primary) | ||
} | ||
) | ||
Box( | ||
modifier = modifier | ||
.clip(FarmemeRadius.Radius10.shape) | ||
.noRippleClickable(onClick = onClick), | ||
contentAlignment = Alignment.Center | ||
) { | ||
Box( | ||
modifier = Modifier | ||
.clip(FarmemeRadius.Radius10.shape) | ||
.padding(1.5.dp) | ||
.drawWithContent { | ||
rotate(angle) { | ||
drawCircle( | ||
brush = brush, | ||
radius = size.width, | ||
) | ||
} | ||
drawContent() | ||
}, | ||
) { | ||
Row( | ||
modifier = Modifier | ||
.height(36.dp) | ||
.clip(FarmemeRadius.Radius10.shape) | ||
.background(color = FarmemeTheme.backgroundColor.primary) | ||
.padding(horizontal = 15.dp), | ||
horizontalArrangement = Arrangement.Center, | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
FarmemeIcon.Upload() | ||
Spacer(Modifier.width(4.dp)) | ||
Text( | ||
text = "나도 밈 올리기", | ||
style = FarmemeTheme.typography.body.medium.semibold, | ||
color = FarmemeTheme.textColor.inverse, | ||
) | ||
} | ||
} | ||
} | ||
|
||
} |