mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Visual tweaks
This commit is contained in:
parent
65ae9ceacd
commit
5b840ab5ae
9 changed files with 24 additions and 18 deletions
|
|
@ -150,7 +150,7 @@ android {
|
|||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||
multiDexEnabled true
|
||||
|
||||
versionCode 2159
|
||||
versionCode 2161
|
||||
versionName "1.10"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<size
|
||||
android:height="4dp"
|
||||
android:height="16dp"
|
||||
android:width="4dp"/>
|
||||
</shape>
|
||||
|
|
@ -8,13 +8,13 @@
|
|||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:paddingLeft="@dimen/spacing_large"
|
||||
android:paddingRight="@dimen/spacing_large">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Overline"
|
||||
tools:text="Title"/>
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Overline"
|
||||
tools:text="Title"/>
|
||||
<TextView
|
||||
android:id="@+id/count_label"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -122,9 +122,10 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/snackbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_alignBottom="@id/bottom_navigation"
|
||||
android:layout_marginBottom="68dp"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="158dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="68dp"/>
|
||||
<com.habitrpg.android.habitica.ui.views.navigation.HabiticaBottomNavigationView
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -35,5 +35,6 @@
|
|||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="124dp"
|
||||
style="@style/Caption2"
|
||||
tools:text="Welcome to the Market! Stock up on new gear or buy rare eggs and potions. Check in periodically for new stock." />
|
||||
</FrameLayout>
|
||||
|
|
@ -101,8 +101,8 @@
|
|||
|
||||
<style name="Caption2">
|
||||
<item name="android:fontFamily">@string/font_family_medium</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:letterSpacing">0.03</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:letterSpacing">0.04</item>
|
||||
</style>
|
||||
|
||||
<style name="Caption2.Regular">
|
||||
|
|
@ -124,6 +124,7 @@
|
|||
<style name="Overline">
|
||||
<item name="android:fontFamily">@string/font_family_regular</item>
|
||||
<item name="android:textSize">10sp</item>
|
||||
<item name="android:letterSpacing">0.15</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -9,6 +9,7 @@ import com.google.android.material.appbar.AppBarLayout
|
|||
import com.google.android.material.tabs.TabLayout
|
||||
import com.habitrpg.android.habitica.data.ApiClient
|
||||
import com.habitrpg.android.habitica.data.UserRepository
|
||||
import com.habitrpg.android.habitica.extensions.setScaledPadding
|
||||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.helpers.SoundManager
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
|
|
@ -57,8 +58,10 @@ abstract class BaseMainFragment : BaseFragment() {
|
|||
|
||||
if (this.usesBottomNavigation) {
|
||||
bottomNavigation?.visibility = View.VISIBLE
|
||||
activity?.snackbarContainer?.setScaledPadding(context, 0, 0, 0, 68)
|
||||
} else {
|
||||
bottomNavigation?.visibility = View.GONE
|
||||
activity?.snackbarContainer?.setScaledPadding(context, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
floatingMenuWrapper?.removeAllViews()
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ class RewardsRecyclerviewFragment : TaskRecyclerViewFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
(layoutManager as GridLayoutManager).spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
(layoutManager as? GridLayoutManager)?.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
override fun getSpanSize(position: Int): Int {
|
||||
return if (recyclerAdapter?.getItemViewType(position) ?: 0 < 2) {
|
||||
(layoutManager as GridLayoutManager).spanCount
|
||||
(layoutManager as? GridLayoutManager)?.spanCount ?: 1
|
||||
} else {
|
||||
1
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ class RewardsRecyclerviewFragment : TaskRecyclerViewFragment() {
|
|||
recyclerView.itemAnimator = SafeDefaultItemAnimator()
|
||||
|
||||
compositeSubscription.add(inventoryRepository.getInAppRewards().subscribe(Consumer {
|
||||
(recyclerAdapter as RewardsRecyclerViewAdapter?)?.updateItemRewards(it)
|
||||
(recyclerAdapter as? RewardsRecyclerViewAdapter)?.updateItemRewards(it)
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class RewardViewHolder(itemView: View, scoreTaskFunc: ((Task, TaskDirection) ->
|
|||
|
||||
if (canBuy) {
|
||||
goldIconView.alpha = 1.0f
|
||||
priceLabel.setTextColor(ContextCompat.getColor(context, R.color.yellow_50))
|
||||
priceLabel.setTextColor(ContextCompat.getColor(context, R.color.yellow_5))
|
||||
} else {
|
||||
goldIconView.alpha = 0.4f
|
||||
priceLabel.setTextColor(ContextCompat.getColor(context, R.color.gray_500))
|
||||
|
|
|
|||
Loading…
Reference in a new issue