@@ -446,7 +446,7 @@ class OrderStatusFragment :
|
||||
binding.rewardLottie.isVisible = true
|
||||
viewModel.setRewardLottieVisibility(true)
|
||||
|
||||
setSpringAnimation(binding.rewardLottie, 400, 250)
|
||||
setSpringAnimation(binding.rewardLottie, 600, 200)
|
||||
|
||||
// Start the Lottie animation
|
||||
binding.rewardLottie.setAnimation(lottieUrl)
|
||||
@@ -467,13 +467,11 @@ class OrderStatusFragment :
|
||||
val density = resources.displayMetrics.density
|
||||
// Creating the spring like animation for scratch card
|
||||
// Create the first animation: from screenWidth to -8dp
|
||||
val translationX1 =
|
||||
ObjectAnimator.ofFloat(binding.rewardLottie, "translationX", screenWidth, -8 * density)
|
||||
val translationX1 = ObjectAnimator.ofFloat(view, "translationX", screenWidth, -8 * density)
|
||||
translationX1.duration = firstTransitionDuration
|
||||
|
||||
// Create the second animation: from -8dp to 0dp
|
||||
val translationX2 =
|
||||
ObjectAnimator.ofFloat(binding.rewardLottie, "translationX", -8 * density, 0f)
|
||||
val translationX2 = ObjectAnimator.ofFloat(view, "translationX", -8 * density, 0f)
|
||||
translationX2.duration = secondTransitionDuration
|
||||
|
||||
// Combine animations in an AnimatorSet
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
android:visibility="@{learnMoreNoteData != null ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/timeline"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_update"
|
||||
app:note="@{learnMoreNoteData}" />
|
||||
|
||||
<com.navi.amc.common.view.InformationView
|
||||
@@ -130,7 +130,29 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/learn_more_note"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="gone" />
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/rewardLottie"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_note" />
|
||||
|
||||
<include
|
||||
android:id="@+id/reward_text"
|
||||
layout="@layout/reward_text"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rewardLottie" />
|
||||
|
||||
<include
|
||||
android:id="@+id/nudge_banner"
|
||||
@@ -143,30 +165,9 @@
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/order_update"
|
||||
app:layout_constraintTop_toBottomOf="@id/reward_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/rewardLottie"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/nudge_banner" />
|
||||
|
||||
<include
|
||||
android:id="@+id/reward_text"
|
||||
layout="@layout/reward_text"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/nudge_banner" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -63,7 +63,11 @@ class NaviLocationManager(private val context: Context) : Application.ActivityLi
|
||||
override fun onLocationResult(locationResult: LocationResult) {
|
||||
val location = locationResult.lastLocation
|
||||
val userLocation =
|
||||
UserLocation(location?.latitude.toString(), location?.longitude.toString())
|
||||
UserLocation(
|
||||
location?.latitude.toString(),
|
||||
location?.longitude.toString(),
|
||||
location?.time.toString()
|
||||
)
|
||||
NaviPreferenceManager.setObjectPreference(
|
||||
Constants.USER_LOCATION_DATA,
|
||||
userLocation
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/dp_4"
|
||||
android:layout_marginVertical="@dimen/dp_6"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -36,7 +36,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginVertical="@dimen/dp_4"
|
||||
android:layout_marginVertical="@dimen/dp_6"
|
||||
app:layout_constraintStart_toEndOf="@id/leftLottie"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -46,7 +46,7 @@
|
||||
android:id="@+id/tvSubtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/dp_4"
|
||||
android:layout_marginVertical="@dimen/dp_6"
|
||||
app:layout_constraintStart_toEndOf="@id/tvAmount"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user