mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
improve display
This commit is contained in:
parent
04e6b9596b
commit
90524ea4b9
6 changed files with 27 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/red_100" />
|
||||
<solid android:color="@color/maroon_100" />
|
||||
<corners android:radius="100dp" />
|
||||
<stroke android:width="1dp" android:color="@color/black_20_alpha" />
|
||||
</shape>
|
||||
</shape>
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
tools:text="This is the Title"
|
||||
android:gravity="center"
|
||||
style="@style/Title2"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"/>
|
||||
|
|
@ -49,8 +48,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
tools:text="This is the Content"
|
||||
android:gravity="center"
|
||||
style="@style/Body1"
|
||||
android:textSize="13sp"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"/>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,15 @@ import android.os.Bundle
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.habitrpg.android.habitica.models.shops.Shop
|
||||
import com.habitrpg.android.habitica.ui.fragments.purchases.EventOutcomeSubscriptionBottomSheetFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.purchases.SubscriptionBottomSheetFragment
|
||||
import com.habitrpg.android.habitica.ui.views.CurrencyText
|
||||
import com.habitrpg.common.habitica.helpers.launchCatching
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@AndroidEntryPoint
|
||||
class TimeTravelersShopFragment : ShopFragment() {
|
||||
|
|
@ -22,6 +28,17 @@ class TimeTravelersShopFragment : ShopFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
initializeCurrencyViews()
|
||||
|
||||
lifecycleScope.launchCatching {
|
||||
val user = userViewModel.user.value
|
||||
if (user?.isSubscribed != true) {
|
||||
delay(2.seconds)
|
||||
val subscriptionBottomSheet = EventOutcomeSubscriptionBottomSheetFragment().apply {
|
||||
eventType = EventOutcomeSubscriptionBottomSheetFragment.EVENT_HOURGLASS_SHOP_OPENED
|
||||
}
|
||||
activity?.supportFragmentManager?.let { subscriptionBottomSheet.show(it, SubscriptionBottomSheetFragment.TAG) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initializeCurrencyViews() {
|
||||
|
|
|
|||
|
|
@ -380,10 +380,7 @@ class PurchaseDialog(
|
|||
}
|
||||
parentActivity?.let { activity -> subscriptionBottomSheet.show(activity.supportFragmentManager, SubscriptionBottomSheetFragment.TAG) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,11 @@ class RecyclerViewStateAdapter(val showLoadingAsEmpty: Boolean = false) : Recycl
|
|||
animation1.duration = 300
|
||||
animation1.startOffset = 500
|
||||
animation1.fillAfter = true
|
||||
view.findViewById<ProgressBar>(R.id.loading_indicator).startAnimation(animation1)
|
||||
view.findViewById<ProgressBar>(R.id.compose_view).setContent {
|
||||
HabiticaTheme {
|
||||
HabiticaCircularProgressView(Modifier.size(60.dp))
|
||||
}
|
||||
}
|
||||
object : RecyclerView.ViewHolder(view) {}
|
||||
}
|
||||
1 -> FailedViewHolder(parent.inflate(R.layout.failed_item))
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
NAME=4.3
|
||||
CODE=6681
|
||||
CODE=6691
|
||||
Loading…
Reference in a new issue