-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-compose' into feat/search_compose_paging
- Loading branch information
Showing
33 changed files
with
5,391 additions
and
104 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
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
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/boostcamp/dailyfilm/presentation/playfilm/base/ContentShowState.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,18 @@ | ||
package com.boostcamp.dailyfilm.presentation.playfilm.base | ||
|
||
import com.airbnb.lottie.compose.LottieClipSpec | ||
|
||
class ContentShowState(init: Boolean): LottieState(init) { | ||
override val clipSpec: LottieClipSpec | ||
get() = if (state) { | ||
LottieClipSpec.Progress(START, MID) | ||
} else { | ||
LottieClipSpec.Progress(MID, FINISH) | ||
} | ||
|
||
companion object { | ||
const val START = 0.67f | ||
const val MID = 0.25f | ||
const val FINISH = 0.67f | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/boostcamp/dailyfilm/presentation/playfilm/base/LottieState.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,16 @@ | ||
package com.boostcamp.dailyfilm.presentation.playfilm.base | ||
|
||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.setValue | ||
import com.airbnb.lottie.compose.LottieClipSpec | ||
|
||
abstract class LottieState(initial: Boolean) { | ||
var state by mutableStateOf(initial) | ||
|
||
abstract val clipSpec: LottieClipSpec | ||
|
||
fun updateState() { | ||
state = !state | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/boostcamp/dailyfilm/presentation/playfilm/base/MuteState.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,19 @@ | ||
package com.boostcamp.dailyfilm.presentation.playfilm.base | ||
|
||
import com.airbnb.lottie.compose.LottieClipSpec | ||
|
||
class MuteState(init: Boolean): LottieState(init) { | ||
|
||
override val clipSpec: LottieClipSpec | ||
get() = if (state) { | ||
LottieClipSpec.Progress(START, MID) | ||
} else { | ||
LottieClipSpec.Progress(MID, FINISH) | ||
} | ||
|
||
companion object { | ||
const val START = 0.0f | ||
const val MID = 0.5f | ||
const val FINISH = 1.0f | ||
} | ||
} |
Oops, something went wrong.