mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 20:29:02 +00:00
layout tweaks
This commit is contained in:
parent
15a61aa146
commit
f6829e587b
5 changed files with 56 additions and 47 deletions
|
|
@ -74,7 +74,8 @@
|
|||
android:layout_margin="@dimen/spacing_large"
|
||||
android:gravity="center"
|
||||
android:text="@string/faint_broken_equipment"
|
||||
android:textColor="@color/text_secondary" />
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -55,13 +55,19 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
app:boxBackgroundMode="none"
|
||||
android:hint="@string/health"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/healthEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -70,12 +76,6 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -98,12 +98,17 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/experience_points"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/experienceEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -112,12 +117,6 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -140,12 +139,17 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/mana_points"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/manaEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -154,12 +158,6 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -182,12 +180,17 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/gold_capitalized"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/goldEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -196,12 +199,6 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -224,12 +221,17 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/character_level"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/levelEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -238,12 +240,6 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -267,12 +263,17 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/streak_label"
|
||||
android:paddingStart="16dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/streakEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<ImageView
|
||||
|
|
@ -281,13 +282,7 @@
|
|||
android:layout_height="56dp"
|
||||
android:scaleType="center"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorContentBackgroundOffset"
|
||||
android:layout_marginEnd="56dp"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -299,7 +299,14 @@ class InventoryRepositoryImpl(
|
|||
}
|
||||
|
||||
override suspend fun purchaseItem(purchaseType: String, key: String, purchaseQuantity: Int): Void? {
|
||||
return apiClient.purchaseItem(purchaseType, key, purchaseQuantity)
|
||||
val response = apiClient.purchaseItem(purchaseType, key, purchaseQuantity)
|
||||
if (key == "gem") {
|
||||
val user = localRepository.getLiveUser(currentUserID)
|
||||
localRepository.executeTransaction {
|
||||
user?.purchased?.plan?.gemsBought = purchaseQuantity + (user?.purchased?.plan?.gemsBought ?: 0)
|
||||
}
|
||||
}
|
||||
return response
|
||||
}
|
||||
|
||||
override suspend fun togglePinnedItem(item: ShopItem): List<ShopItem>? {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,10 @@ class ArmoireActivity : BaseActivity() {
|
|||
|
||||
binding.openArmoireSubscriberButton.setOnClickListener {
|
||||
giveUserArmoire()
|
||||
binding.openArmoireSubscriberWrapper.visibility = View.INVISIBLE
|
||||
lifecycleScope.launchCatching {
|
||||
delay(400)
|
||||
binding.openArmoireSubscriberWrapper.startAnimation(Animations.fadeOutAnimation())
|
||||
}
|
||||
}
|
||||
|
||||
binding.subscribeModalButton.setOnClickListener {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,10 @@ class DeathActivity : BaseActivity() {
|
|||
sharedPreferences.edit {
|
||||
putLong("last_sub_revive", Date().time)
|
||||
}
|
||||
binding.reviveSubscriberWrapper.visibility = View.INVISIBLE
|
||||
lifecycleScope.launchCatching {
|
||||
delay(400)
|
||||
binding.reviveSubscriberWrapper.startAnimation(Animations.fadeOutAnimation())
|
||||
}
|
||||
lifecycleScope.launch(ExceptionHandler.coroutine()) {
|
||||
userRepository.updateUser("stats.hp", 1)
|
||||
finish()
|
||||
|
|
|
|||
Loading…
Reference in a new issue