mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Tweaks
This commit is contained in:
parent
69c54d8199
commit
409c3f6a34
5 changed files with 25 additions and 11 deletions
|
|
@ -165,7 +165,7 @@ android {
|
|||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||
resConfigs 'en', 'bg', 'de', 'en-rGB', 'es', 'fr', 'hr-rHR', 'in', 'it', 'iw', 'ja', 'ko', 'lt', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'tr', 'zh', 'zh-rTW'
|
||||
|
||||
versionCode 3502
|
||||
versionCode 3503
|
||||
versionName "3.6"
|
||||
|
||||
targetSdkVersion 32
|
||||
|
|
|
|||
|
|
@ -39,10 +39,15 @@
|
|||
android:id="@+id/icon_wrapper"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="158dp"
|
||||
android:background="@drawable/circle_gray_700"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginBottom="23dp"
|
||||
android:visibility="invisible">
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible">
|
||||
<ImageView
|
||||
android:layout_width="158dp"
|
||||
android:layout_height="158dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/circle_gray_700" />
|
||||
<ImageView
|
||||
android:id="@+id/icon_view"
|
||||
android:layout_width="136dp"
|
||||
|
|
@ -86,10 +91,13 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="You wrestle with the Armoire and gain Experience. Take that!"
|
||||
android:layout_marginHorizontal="50dp"
|
||||
android:textColor="@color/text_ternary"
|
||||
android:layout_marginHorizontal="60dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="20sp"
|
||||
android:letterSpacing="0.04"
|
||||
android:lineSpacingExtra="2dp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Space
|
||||
|
|
@ -103,7 +111,7 @@
|
|||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingTop="28dp">
|
||||
android:paddingTop="36dp">
|
||||
<TextView
|
||||
android:id="@+id/equipment_count_view"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.habitrpg.android.habitica.helpers
|
|||
import android.view.View
|
||||
import android.view.ViewAnimationUtils
|
||||
import android.view.animation.AccelerateDecelerateInterpolator
|
||||
import android.view.animation.AccelerateInterpolator
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.Animation.INFINITE
|
||||
|
|
@ -54,6 +55,7 @@ object Animations {
|
|||
val finalRadius = Math.hypot(cx.toDouble(), cy.toDouble()).toFloat()
|
||||
val anim = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0f, finalRadius)
|
||||
anim.duration = duration
|
||||
anim.interpolator = AccelerateInterpolator()
|
||||
view.visibility = View.VISIBLE
|
||||
anim.start()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ import kotlinx.coroutines.withContext
|
|||
import org.json.JSONObject
|
||||
import retrofit2.HttpException
|
||||
import java.util.Date
|
||||
import kotlin.time.DurationUnit
|
||||
import kotlin.time.toDuration
|
||||
|
||||
class PurchaseHandler(
|
||||
private val context: Context,
|
||||
|
|
@ -270,7 +272,7 @@ class PurchaseHandler(
|
|||
pendingGifts[validationRequest.sku]?.let { gift ->
|
||||
// If the gift and the purchase happened within 5 minutes, we consider them to match.
|
||||
// Otherwise the gift is probably an old one that wasn't cleared out correctly
|
||||
if (kotlin.math.abs(gift.first.time - purchase.purchaseTime) < 300000) {
|
||||
if (kotlin.math.abs(gift.first.time - purchase.purchaseTime) < 5.toDuration(DurationUnit.MINUTES).inWholeMilliseconds) {
|
||||
validationRequest.gift = IAPGift(gift.second)
|
||||
} else {
|
||||
removeGift(validationRequest.sku ?: "")
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import com.habitrpg.android.habitica.helpers.AdType
|
|||
import com.habitrpg.android.habitica.helpers.Animations
|
||||
import com.habitrpg.android.habitica.helpers.AppConfigManager
|
||||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.ui.helpers.loadImage
|
||||
import com.habitrpg.android.habitica.ui.viewmodels.MainUserViewModel
|
||||
import com.habitrpg.android.habitica.ui.views.ads.AdButton
|
||||
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaBottomSheetDialog
|
||||
|
|
@ -27,7 +28,6 @@ import com.plattysoft.leonids.ParticleSystem
|
|||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
import com.habitrpg.android.habitica.ui.helpers.loadImage
|
||||
|
||||
class ArmoireActivity: BaseActivity() {
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ class ArmoireActivity: BaseActivity() {
|
|||
lifecycleScope.launch {
|
||||
delay(100)
|
||||
if (binding.iconWrapper.isAttachedToWindow) {
|
||||
Animations.circularReveal(binding.iconWrapper, 400)
|
||||
Animations.circularReveal(binding.iconWrapper, 300)
|
||||
}
|
||||
binding.leftSparkView.startAnimating()
|
||||
binding.rightSparkView.startAnimating()
|
||||
|
|
@ -163,13 +163,13 @@ class ArmoireActivity: BaseActivity() {
|
|||
|
||||
binding.titleView.animate().apply {
|
||||
alpha(1f)
|
||||
duration = 400
|
||||
duration = 300
|
||||
startDelay = 600
|
||||
start()
|
||||
}
|
||||
binding.subtitleView.animate().apply {
|
||||
alpha(1f)
|
||||
duration = 400
|
||||
duration = 300
|
||||
startDelay = 900
|
||||
start()
|
||||
}
|
||||
|
|
@ -206,7 +206,9 @@ class ArmoireActivity: BaseActivity() {
|
|||
else -> {
|
||||
binding.subtitleView.text = getString(R.string.armoireExp_new, value)
|
||||
binding.iconView.setImageResource(R.drawable.armoire_experience)
|
||||
binding.iconView.layoutParams = RelativeLayout.LayoutParams(108.dpToPx(this), 122.dpToPx(this))
|
||||
val layoutParams = RelativeLayout.LayoutParams(108.dpToPx(this), 122.dpToPx(this))
|
||||
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT)
|
||||
binding.iconView.layoutParams = layoutParams
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue