-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.2.0/AN-FEAT, AN-UI] 포켓몬 스탯 프로그레스 바에 애니메이션 적용 #484
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5ab9c82
feat(ProgressBarAnimation): from 에서 to 까지 프로그레스바의 애니메이션
sh1mj1 69a118d
feat(PokemonStatAdapter): progressBar 에 애니메이션 적용
sh1mj1 f5986fa
feat(strings.xml): 스탯 라벨 정의
sh1mj1 01551dc
refactor(StatUiModel): 국제화를 위해 name 프로퍼티를 @StringRes Int 로
sh1mj1 2d0b076
feat(ko-rKR-strings): pokemon stat 한글
sh1mj1 41c8f12
refactor(StatUiModel): name 프로퍼티가 Int
sh1mj1 e3fda63
chore(PokemonDetailUiState): remove useless function
sh1mj1 cdc6658
fix(item_type_result.xml): 내 타입 상성 결과는 visible 이 아닌 invisible 바인딩 어댑터…
sh1mj1 ba92d01
fix(PokemonDetailViewModel): 진화체가 같은 포켓몬이면 선택하지 않는다
sh1mj1 09f0a0f
feat(PokemonEvolutionEvent): 포켓몬 진화체 클릭 이벤트
sh1mj1 544be67
refactor(PokemonDetailViewModel): 진화체 클릭시 이벤트
sh1mj1 f5f91a4
feat(PokemonDetailActivity): 현재 화면과 같은 포켓몬이면 보여주는 토스트 메시지를 지역화
sh1mj1 e7513df
feat(PokemonDetailViewModel): 홈, 특성 상세, 바이옴 상세 네비게이션 이벤트
sh1mj1 aa9db64
refactor(PokemonDetailViewModel, Activity): 홈, 특성 상세, 바이옴 상세 네비게이션 이벤트
sh1mj1 9d2e18c
refactor(PokemonDetailViewModel, Activity): 배틀로 네비게이션하는 이벤트를 한 객체로 합친다
sh1mj1 fe39194
refactor(PokemonDetailViewModel): 배틀로 네비게이션 시에 파이어베이스 로깅 수정
sh1mj1 1db5f42
refactor(PokemonDetailViewModel, Activity): 포켓몬 상세로 가는 이벤트 병합
sh1mj1 f995cc3
refactor(PokemonDetailActivity): 포켓몬 상세로 이동 처리 함수화
sh1mj1 9ad269b
fix(ko-rKR-strings): 현재 화면의 포켓몬과 같은 포켓몬의 상세 화면으로 이동할 때 메시지
sh1mj1 618baaa
Merge branch 'an/fix/pokemon-evolution-navigation' into an/refactor/p…
sh1mj1 bbeac80
chore(ProgressBarAnimation): progressBar 에 progress 를 중복으로 설정해주는 부분 수정
sh1mj1 c73f4d2
Merging an/refactor/pokemon-stats-animation from an/develop
sh1mj1 cfd8bae
Merge branch 'an/develop' into an/refactor/pokemon-stats-animation
sh1mj1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 25 additions & 0 deletions
25
android/app/src/main/java/poke/rogue/helper/presentation/util/view/ProgressBarAnimation.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,25 @@ | ||
package poke.rogue.helper.presentation.util.view | ||
|
||
import android.view.animation.Animation | ||
import android.view.animation.Transformation | ||
import android.widget.ProgressBar | ||
|
||
class ProgressBarAnimation( | ||
private val progressBar: ProgressBar, | ||
private val from: Float, | ||
private val to: Float, | ||
) : Animation() { | ||
override fun applyTransformation( | ||
interpolatedTime: Float, | ||
t: Transformation?, | ||
) { | ||
super.applyTransformation(interpolatedTime, t) | ||
val value = from + to * interpolatedTime | ||
progressBar.progress = value.toInt() | ||
} | ||
} | ||
|
||
fun ProgressBar.animation( | ||
from: Float, | ||
to: Float, | ||
): ProgressBarAnimation = ProgressBarAnimation(this, from, to) |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 생각보다 간단하게 되는 군요 ㅋㅋㅋ