mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
nicer customization display
This commit is contained in:
parent
57b780bece
commit
72d4c8742c
4 changed files with 11 additions and 7 deletions
|
|
@ -13,10 +13,9 @@
|
|||
android:layout_height="76dp">
|
||||
<com.habitrpg.common.habitica.views.PixelArtView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="60dp"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_gravity="start"
|
||||
android:scaleType="fitCenter" />
|
||||
android:layout_gravity="center" />
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/buy_button"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Pill.Content"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ open class Customization : RealmObject(), BaseObject {
|
|||
return if (type == "background") {
|
||||
"icon_background_$identifier"
|
||||
} else {
|
||||
getImageName(userSize, hairColor)
|
||||
"icon_" + getImageName(userSize, hairColor)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,8 +167,13 @@ open class ShopItem : RealmObject(), BaseObject {
|
|||
item.path = customization.path
|
||||
item.unlockPath = customization.unlockPath
|
||||
item.pinType = customization.type
|
||||
item.purchaseType = if (customization.type == "background") "background" else "customization"
|
||||
item.imageName = customization.getImageName(userSize, hairColor)
|
||||
if (customization.type == "background") {
|
||||
item.purchaseType = "background"
|
||||
item.imageName = customization.getImageName(userSize, hairColor)
|
||||
} else {
|
||||
item.purchaseType = "customization"
|
||||
item.imageName = customization.getIconName(userSize, hairColor)
|
||||
}
|
||||
return item
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue