Skip to content
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

Thumbs-up function 👍 #626

Merged
merged 45 commits into from
Feb 16, 2020
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
44b8b10
Implement posting thumbs-up count to firestore
mkeeda Jan 26, 2020
b49b8b0
Fix multiple counter to single counter, and adopt realtime updates
mkeeda Jan 29, 2020
4a2de25
Apply some fixes for thumbs up
takahirom Feb 2, 2020
286d6bd
Debugging thumbs-up function of firestore
mkeeda Feb 1, 2020
bf57b49
Success to show thumbs-up counts if shards are already exists
mkeeda Feb 2, 2020
da8e92f
Remove a white space
mkeeda Feb 2, 2020
075e3b2
Change processing whether shard exists into checking a shard that sha…
mkeeda Feb 3, 2020
a4c3287
Bind error to SystemViewModel
mkeeda Feb 3, 2020
6f6b1c0
Apply some thumbs-up button designs
mkeeda Feb 3, 2020
3cf94b8
Add a thumbs-up icon
mkeeda Feb 3, 2020
0b0483b
Fix indent and variable name
mkeeda Feb 3, 2020
0cd8484
Adjust thumbs-up button styles
mkeeda Feb 4, 2020
707fb7b
Show outlined button if thumbs-up count is zero
mkeeda Feb 4, 2020
f0db2dd
Fix grradlew.bat
mkeeda Feb 5, 2020
856e3ac
Merge branch 'master' into thumb-up
mkeeda Feb 5, 2020
6ebcbfa
Change number of shards; 10 -> 5
mkeeda Feb 5, 2020
e478ca9
Remove unnecessary changes
mkeeda Feb 5, 2020
ab883b9
Fix SessionDetailViewModelTest
mkeeda Feb 8, 2020
3bac614
Add test to get thumbs-up count
mkeeda Feb 8, 2020
8e26ef0
Count up at intervals for FireStore charges
takahirom Feb 7, 2020
59aad5a
Apply ktlintFormat
mkeeda Feb 8, 2020
67e699a
Separate incremented count flow from total count flow
mkeeda Feb 9, 2020
6f07494
Display incremented thumbs-up count by own
mkeeda Feb 11, 2020
7d102fd
Pop-up and drop-out animation
mkeeda Feb 12, 2020
ea1e3d4
Use resource string placeholder
mkeeda Feb 13, 2020
8c64427
Apply ktlintFormat
mkeeda Feb 14, 2020
54940d7
Pass lintDebug task
mkeeda Feb 14, 2020
035602c
Fix thumbsUpCount test
mkeeda Feb 14, 2020
5f1c524
Bind error of incrementation thumbs-up
mkeeda Feb 14, 2020
c88056a
Merge the 2 increment liveDatas
mkeeda Feb 14, 2020
f9d5066
Appley ktlintFormat
mkeeda Feb 15, 2020
7e54b27
Fix SessionDetailViewModelTest; separate error
mkeeda Feb 15, 2020
bc6dad4
Extract animation functions from SessionDetailTileItem
mkeeda Feb 15, 2020
6d1c674
Suppress useless cast for lintDebug task
mkeeda Feb 15, 2020
5889f99
Merge branch 'master' into thumb-up
takahirom Feb 15, 2020
e1cba55
Tweak thumb up animation
takahirom Feb 15, 2020
dbe94a2
Merge branch 'thumb-up' of github.com:mkeeda/conference-app-2020 into…
mkeeda Feb 16, 2020
e556cac
Use UiModel.error
takahirom Feb 15, 2020
489fb21
Scale animation when users continually press thumbs-up
mkeeda Feb 16, 2020
69c94e9
Apply ktlintFormat
mkeeda Feb 16, 2020
521ba2d
Restore error checking
mkeeda Feb 16, 2020
eb5daa5
Minor adjustment ui design
mkeeda Feb 16, 2020
48c71ba
Remove ⭐ and rewrite debug logging messages
mkeeda Feb 16, 2020
3d4c670
LintDebug task can success without type cast
mkeeda Feb 16, 2020
808f2b2
Fix stroke color of blue thumbs-up button
mkeeda Feb 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak thumb up animation
takahirom committed Feb 15, 2020
commit e1cba55dea09d9749b65ff23da6acf6e1e0e9782
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ import android.text.Spannable
import android.text.SpannableStringBuilder
import android.text.style.BackgroundColorSpan
import android.view.View
import android.view.animation.AccelerateInterpolator
import android.view.animation.DecelerateInterpolator
import android.widget.TextView
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.view.doOnPreDraw
@@ -129,15 +131,17 @@ class SessionDetailTitleItem @AssistedInject constructor(
lifecycleCoroutineScope.launch {
target.isVisible = true
target.awaitNextLayout()
val popupHeight = (target.height / 2).toFloat()
val popupHeight = (target.height / 3).toFloat()
target.translationY = popupHeight

val fadeIn = async {
target.alpha = 0f
ObjectAnimator.ofFloat(
target,
View.ALPHA,
1f
).run {
interpolator = DecelerateInterpolator()
start()
awaitEnd()
}
@@ -149,6 +153,7 @@ class SessionDetailTitleItem @AssistedInject constructor(
View.TRANSLATION_Y,
-popupHeight
).run {
interpolator = DecelerateInterpolator()
duration = 100
start()
awaitEnd()
@@ -164,14 +169,15 @@ class SessionDetailTitleItem @AssistedInject constructor(
val target = this

lifecycleCoroutineScope.launch {
val popupHeight = (target.height / 2).toFloat()
val popupHeight = (target.height / 3).toFloat()

val fadeOut = async {
ObjectAnimator.ofFloat(
target,
View.ALPHA,
0f
).run {
interpolator = AccelerateInterpolator()
duration = 100
start()
awaitEnd()
@@ -184,6 +190,7 @@ class SessionDetailTitleItem @AssistedInject constructor(
View.TRANSLATION_Y,
popupHeight
).run {
interpolator = AccelerateInterpolator()
duration = 100
start()
awaitEnd()