mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-14 02:01:56 +00:00
Merge pull request #1954 from Hafizzle/Fiz/all-gear-owned-armoire-UI
Update state / message shown when you have all armoire items
This commit is contained in:
commit
c9726049d1
3 changed files with 11 additions and 1 deletions
|
|
@ -34,6 +34,7 @@
|
|||
android:layout_height="68dp" />
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/footer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/offset_background_30"
|
||||
|
|
|
|||
|
|
@ -1382,6 +1382,7 @@
|
|||
<string name="change_class_to_x">Change class to %s</string>
|
||||
<string name="shop_armoire_title">You own all %s gear</string>
|
||||
<string name="shop_armoire_description">New gear is released during the seasonal Galas. Until then, theres %d pieces of gear in the Enchanted Armoire to find!</string>
|
||||
<string name="shop_armoire_empty_description">New gear is released during the seasonal Galas. The Enchanted Armoire gets new stock every month too!</string>
|
||||
<string name="unlock_gear_and_skills">Unlock %s gear and skills</string>
|
||||
|
||||
<plurals name="you_x_others">
|
||||
|
|
|
|||
|
|
@ -298,7 +298,15 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<Vi
|
|||
|
||||
fun bind(className: String, armoireCount: Int) {
|
||||
binding.titleView.text = itemView.context.getString(R.string.shop_armoire_title, className)
|
||||
binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_description, armoireCount)
|
||||
if (armoireCount > 0) {
|
||||
binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_description, armoireCount)
|
||||
binding.footerLayout.visibility = View.VISIBLE
|
||||
binding.iconView.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.descriptionView.text = itemView.context.getString(R.string.shop_armoire_empty_description)
|
||||
binding.footerLayout.visibility = View.INVISIBLE
|
||||
binding.iconView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue