Fix styling issues

This commit is contained in:
Phillip Thelen 2020-09-15 09:28:34 +02:00
parent 7dd8e8477c
commit e1886f6928
145 changed files with 889 additions and 1169 deletions

View file

@ -158,7 +158,7 @@ android {
multiDexEnabled true
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
versionCode 2531
versionCode 2542
versionName "3.0"
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="1.00" android:color="@color/text_brand_neon" android:state_checkable="true" android:state_checked="true" android:state_enabled="true"/>
<item android:alpha="0.60" android:color="?attr/colorOnSurface" android:state_checkable="true" android:state_checked="false" android:state_enabled="true"/>
<item android:alpha="1.00" android:color="@color/text_brand_neon" android:state_enabled="true"/>
<item android:alpha="0.38" android:color="?attr/colorOnSurface"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/gray_300" />
<solid android:color="@color/dimmed_background" />
<corners android:radius="12dp" />
</shape>

View file

@ -1,10 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/transparent" />
<stroke
android:width="1dip"
android:color="#000000"/>
</shape>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="@dimen/daily_checkbox_corner_radius"/>
<solid android:color="#A6FFFFFF" />
<solid android:color="@color/checkbox_fill" />
<size android:height="20dp" android:width="20dp" />
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="18dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="18dp">
<path android:fillColor="#FFFFFF" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
<path android:fillColor="@color/white" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
</vector>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
<path android:fillColor="#FFFFFF" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
<path android:fillColor="@color/white" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
<path android:fillColor="#7e000000" android:pathData="M7.41,7.84L12,12.42l4.59,-4.58L18,9.25l-6,6 -6,-6z"/>
<path android:fillColor="@color/text_primary" android:pathData="M7.41,7.84L12,12.42l4.59,-4.58L18,9.25l-6,6 -6,-6z"/>
</vector>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
<path android:fillColor="#7e000000" android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z"/>
<path android:fillColor="@color/text_primary" android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z"/>
</vector>

View file

@ -7,12 +7,12 @@
android:pathData="M290.6,290.5C287.6,286.6 284.4,291.1 276.8,290.3C271.8,289.8 271.8,287.6 271.8,257.7C271.8,257.7 271.3,255.9 274.2,254.2C277.1,252.6 285.8,238.1 280.4,225.8C275.1,213.4 278.9,214 281.2,215.3C283.4,216.5 284.5,214.9 283.2,208.2C280.4,194.2 276.1,189.4 266,183.1C259.4,179 261.8,171.5 271.2,172C275.9,172.3 275.9,172.3 276.4,168.7C277.4,163 275.5,153.2 268.5,151.9C263.6,151 257.5,156.2 250.3,152.6C243.1,148.9 231.2,158 226.3,160.1C221.5,162.2 217.4,162.2 211.9,162.1C206.3,162 214.8,171.3 223.3,173.4C230.7,175.2 227.8,176.5 227.4,182.5C226.9,189.2 228.8,192.1 225.7,192.8C220.9,193.8 215.6,181 207.4,175.6C188.7,163.3 177.7,169.2 145.1,133.4C139.5,127.2 141.8,146.4 145.2,156.6C154.5,184 172.5,187.6 181,188.4C188.1,189.1 192.9,187.5 192.9,190.2C192.9,192.2 184.5,193.1 181.3,193.1C178.2,193.1 174.7,192.8 170.7,192.1C164.2,190.9 174.1,207.3 180.5,212.5C191.2,221.3 203.4,224.6 213.3,225.6C216.1,225.9 220.2,225.9 220.2,228.1C220.2,230.2 218,230.7 215.5,230.7C201.7,230.8 193.8,241.9 191.5,254.6C190.1,262.7 191.2,271.9 191.3,278.7L191.9,283.6C193,292.1 162.1,295.5 158,281.6C153.6,266.5 177.9,258.6 178.4,244.2C178.7,235.1 170.4,231 170.4,231L170.4,227.3L170.4,217.7L160.8,217.7L160.8,208.2L151.3,208.2L151.3,198.6L141.7,198.6L141.7,208.2L141.7,217.7L141.7,227.3L151.3,227.3L151.3,236.8L160.8,236.8L167,236.8C170.6,236.8 173.4,239.2 173.1,244.3C172.3,256.8 145.5,264.6 152.9,284.6C158.2,299.1 181.1,299.3 204,299.3L204,299.3L246.9,299.3C248.2,299.3 250.1,298.7 247.3,291.7C245.1,286.2 237.5,290.1 231.1,290.1C224.2,290.1 224,284.3 228.4,278.2C231.1,274.5 234.5,271.7 240.3,269C249.2,264.9 256,270.2 259.4,274.8C264.2,281.4 265.7,289 261.5,290.2C256.3,291.6 254.8,291.8 254.6,296.7C254.5,300.2 256.1,299.2 264.2,299.2L290.9,299.2C295.1,299.2 294.8,296 290.6,290.5"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillColor="#FFFFFF"
android:fillColor="@color/white"
android:strokeWidth="1"/>
<path
android:pathData="M132.2,198.9l9.5,0l0,-9.5l-9.5,0z"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillColor="#FFFFFF"
android:fillColor="@color/white"
android:strokeWidth="1"/>
</vector>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/colorContentBackground" />
<solid android:color="@color/white" />
<corners android:topLeftRadius="@dimen/rounded_button_radius" android:topRightRadius="@dimen/rounded_button_radius" />
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>

View file

@ -1,4 +1,4 @@
<vector android:height="16dp" android:tint="#FFFFFF"
<vector android:height="16dp" android:tint="@color/white"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="#A6FFFFFF" />
<solid android:color="@color/checkbox_fill" />
<size android:height="20dp" android:width="20dp" />
</shape>

View file

@ -32,8 +32,8 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
style="@style/CardView.Default"
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -116,10 +116,10 @@
tools:text="100"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
style="@style/CardView.Default"
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
@ -157,10 +157,10 @@
android:textSize="13sp"
android:drawableTop="@drawable/icon_gift_subscription"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
style="@style/CardView.Default"
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -183,11 +183,11 @@
android:shrinkColumns="1"
android:stretchColumns="0" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:id="@+id/costume_card"
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -210,11 +210,11 @@
android:shrinkColumns="1"
android:stretchColumns="0" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:id="@+id/attributes_card_view"
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
@ -279,11 +279,11 @@
</TableLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
style="@style/CardView.Default"
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -348,12 +348,12 @@
</TableRow>
</TableLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<androidx.cardview.widget.CardView
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:id="@+id/profile_achievements_card"
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -384,7 +384,7 @@
android:scrollbarThumbVertical="@color/scrollbarThumb"
android:scrollbars="vertical" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -106,7 +106,7 @@
<Button
android:id="@+id/gift_button"
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Purple"
android:text="@string/gift_a_subscription"
android:layout_marginTop="24dp"

View file

@ -110,7 +110,7 @@
<Button
android:text="@string/send_gift"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:id="@+id/subscription_button"
style="@style/HabiticaButton.Purple.Small"
android:textAllCaps="false"

View file

@ -104,7 +104,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/only_leader_create_challenge"/>
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/leader_create_challenge_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -40,8 +40,8 @@
android:layout_height="wrap_content"
app:srcCompat="@drawable/cloud_1"
android:id="@+id/left_cloud_view"
android:layout_toLeftOf="@id/cloud_anchor"
android:layout_marginRight="150dp"
android:layout_toStartOf="@id/cloud_anchor"
android:layout_marginEnd="150dp"
android:layout_alignParentBottom="true"
android:scaleType="centerCrop"
android:paddingBottom="460dp"
@ -51,8 +51,8 @@
android:layout_height="wrap_content"
app:srcCompat="@drawable/cloud_2"
android:id="@+id/right_cloud_view"
android:layout_toRightOf="@id/cloud_anchor"
android:layout_marginLeft="170dp"
android:layout_toEndOf="@id/cloud_anchor"
android:layout_marginStart="170dp"
android:layout_alignParentBottom="true"
android:scaleType="centerCrop"
android:paddingBottom="400dp"
@ -87,7 +87,7 @@
android:layout_margin="24dp"
android:contentDescription="@string/brand_name" />
<Button
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/new_game_button"
android:layout_width="@dimen/login_intro_button_size"
android:layout_height="@dimen/login_intro_button_size"
@ -95,9 +95,10 @@
android:layout_gravity="center_vertical|center_horizontal"
android:textColor="@color/white"
android:layout_marginTop="@dimen/spacing_large"
android:background="@drawable/login_begin_button"/>
android:background="@drawable/login_begin_button"
android:backgroundTint="@color/brand_100"/>
<Button
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/show_login_button"
android:layout_width="@dimen/login_intro_button_size"
android:layout_height="@dimen/login_intro_button_size"
@ -105,7 +106,8 @@
android:layout_gravity="center_vertical|center_horizontal"
android:textColor="@color/white"
android:layout_marginTop="@dimen/spacing_large"
android:background="@drawable/login_begin_button"/>
android:background="@drawable/login_begin_button"
android:backgroundTint="@color/brand_100"/>
<ScrollView
android:layout_width="match_parent"
@ -131,7 +133,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_username"
android:drawableRight="@drawable/ic_username"
android:imeOptions="actionNext"
android:inputType="textPersonName"
android:nextFocusDown="@+id/email"
@ -146,12 +147,12 @@
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:imeOptions="actionNext"
android:drawableRight="@drawable/ic_email"
android:nextFocusDown="@+id/password"
android:drawableEnd="@drawable/ic_email"
android:hint="@string/emailAddress"
android:textColor="@color/white_75_alpha"
android:theme="@style/LoginEditTextTheme"
android:autofillHints="emailAddress"
/>
<EditText
@ -161,7 +162,6 @@
android:inputType="textPassword"
android:imeOptions="actionNext"
android:nextFocusDown="@+id/confirm_password"
android:drawableRight="@drawable/ic_password"
android:drawableEnd="@drawable/ic_password"
android:hint="@string/password"
android:textColor="@color/white_75_alpha"
@ -172,12 +172,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:drawableRight="@drawable/ic_password"
android:drawableEnd="@drawable/ic_password"
android:imeOptions="actionDone"
android:hint="@string/confirmpassword"
android:textColor="@color/white_75_alpha"
android:theme="@style/LoginEditTextTheme"/>
android:theme="@style/LoginEditTextTheme"
android:autofillHints="newPassword"/>
<ProgressBar
android:id="@+id/PB_AsyncTask"

View file

@ -46,6 +46,7 @@
android:layout_marginTop="?attr/actionBarSize"
android:layout_marginEnd="@dimen/header_border_spacing"
android:layout_marginStart="@dimen/header_border_spacing"
android:layout_marginBottom="@dimen/spacing_medium"
app:layout_collapseMode="parallax" />
<androidx.appcompat.widget.Toolbar

View file

@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:background="?attr/headerBackgroundColor"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:background="?attr/headerBackgroundColor"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:layout_marginBottom="8dp">
<LinearLayout
android:layout_width="match_parent"
@ -72,7 +73,7 @@
android:drawablePadding="6dp"
android:gravity="center"
android:textColor="?headerTextColor"
android:textSize="14sp"
android:textSize="12sp"
tools:text="Lvl 12 Warrior"/>
<ImageView

View file

@ -34,7 +34,7 @@
android:id="@+id/selected_title_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textColor="?colorPrimaryDistinct"
tools:text="@string/habits"
android:layout_gravity="center"
android:textSize="12sp"

View file

@ -7,7 +7,6 @@
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:clickable="true"
android:background="#fff"
android:orientation="horizontal"
android:baselineAligned="false"
android:paddingEnd="16dp">
@ -36,7 +35,6 @@
android:textColor="@color/gem_icon_color"
android:textSize="17sp"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
@ -54,6 +52,7 @@
style="@style/ChallengeName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_primary"
android:maxLines="3"
tools:text="Name" />

View file

@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:background="@color/window_background"
android:background="@color/content_background"
android:paddingLeft="@dimen/chat_horizontal_inset"
android:paddingRight="@dimen/chat_horizontal_inset"
android:paddingTop="@dimen/spacing_small"
@ -32,6 +32,9 @@
style="@style/CardContent.Compact"
android:background="@drawable/layout_rounded_bg_content"
android:padding="@dimen/spacing_medium">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.habitrpg.android.habitica.ui.views.social.UsernameLabel
android:id="@+id/user_label"
style="@style/ChatMessageUserTextViewStyle"
@ -50,16 +53,16 @@
android:textColor="@color/white"
style="@style/Pill.Purple"
tools:text="Moderator"
android:layout_marginLeft="@dimen/spacing_small"/>
android:layout_marginStart="@dimen/spacing_small"/>
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="1dp"/>
<LinearLayout
android:id="@+id/like_background_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:background="@drawable/layout_rounded_bg">
<TextView
@ -71,6 +74,7 @@
android:gravity="center_vertical"
android:focusable="true" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/subline_textview"
android:layout_width="wrap_content"

View file

@ -12,20 +12,24 @@
android:layout_width="@dimen/button_width"
android:layout_height="match_parent"
tools:background="@color/red_10">
<FrameLayout
<View
android:id="@+id/checkBoxBackground"
android:layout_width="20dp"
android:layout_height="20dp"
android:gravity="center"
android:background="@drawable/checklist_unchecked"
android:layout_gravity="center">
android:layout_gravity="center" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/task_tint_overlay"/>
<ImageView
android:id="@+id/checkmark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:scaleType="center"
android:src="@drawable/checkmark" />
</FrameLayout>
</FrameLayout>
<com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
android:id="@+id/checkedTextView"

View file

@ -16,10 +16,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="@android:color/black" />
<com.facebook.drawee.view.SimpleDraweeView

View file

@ -33,7 +33,6 @@
android:textColor="@color/text_quad"
tools:text="150"
style="@style/Body1"
app:hasLightBackground="true"
android:textSize="15sp"
android:layout_gravity="center" />
</FrameLayout>

View file

@ -31,15 +31,26 @@
<FrameLayout
android:id="@+id/checkBoxHolder"
android:layout_width="@dimen/button_width"
android:layout_height="match_parent">
<CheckBox
android:id="@+id/checkBox"
android:layout_width="@dimen/checkbox_size"
android:layout_height="@dimen/checkbox_size"
android:layout_height="match_parent"
tools:background="@color/red_10">
<View
android:id="@+id/checkBoxBackground"
android:layout_width="24dp"
android:layout_height="24dp"
android:gravity="center"
android:background="@drawable/daily_unchecked"
android:layout_gravity="center" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/task_tint_overlay"/>
<ImageView
android:id="@+id/checkmark"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:button="@drawable/daily_checkbox"
android:gravity="center" />
android:scaleType="center"
android:src="@drawable/checkmark" />
</FrameLayout>
<include layout="@layout/task_main_content" />
<ProgressBar

View file

@ -23,6 +23,5 @@
tools:text="10"
tools:textColor="@color/green_10"
style="@style/Subheader1"
app:hasLightBackground="true"
android:layout_marginStart="12dp"/>
</LinearLayout>

View file

@ -30,7 +30,6 @@
android:id="@+id/currencyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:hasLightBackground="true"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:layout_gravity="center_vertical"/>

View file

@ -28,7 +28,7 @@
<RadioGroup
android:id="@+id/task_filter_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="40dp"
android:orientation="horizontal"
android:layout_marginTop="12dp"
android:layout_marginBottom="24dp">

View file

@ -148,7 +148,7 @@
android:gravity="center"
android:minWidth="20dp"
android:paddingTop="0dp"
android:textColor="#FFF"
android:textColor="@color/white"
android:textSize="12sp"
android:visibility="gone"
tools:text="1"

View file

@ -11,7 +11,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacing_medium">
<TextView
android:layout_width="wrap_content"
@ -20,10 +21,10 @@
android:text="@string/avatar_body"
android:textAppearance="?android:attr/textAppearanceMedium" />
<androidx.cardview.widget.CardView
<FrameLayout
android:background="@drawable/layout_rounded_bg_window"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardView.Default">
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -67,7 +68,7 @@
android:id="@+id/avatarSkinView"
app:equipmentTitle="@string/avatar_skin"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -75,10 +76,10 @@
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/SectionTitle"/>
<androidx.cardview.widget.CardView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardView.Default">
android:background="@drawable/layout_rounded_bg_window">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
@ -118,7 +119,7 @@
android:id="@+id/avatar_headband_view"
app:equipmentTitle="@string/avatar_headband"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -126,10 +127,10 @@
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/SectionTitle"/>
<androidx.cardview.widget.CardView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardView.Default">
android:background="@drawable/layout_rounded_bg_window">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -162,7 +163,7 @@
android:id="@+id/avatarHairMustacheView"
app:equipmentTitle="@string/avatar_mustache" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
@ -171,10 +172,10 @@
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/SectionTitle"/>
<androidx.cardview.widget.CardView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardView.Default">
android:background="@drawable/layout_rounded_bg_window">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -185,6 +186,6 @@
android:id="@+id/avatarBackgroundView"
app:equipmentTitle="@string/avatar_background" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -38,10 +38,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@drawable/layout_rounded_bg"
android:background="@drawable/layout_rounded_bg_window"
android:padding="@dimen/spacing_medium"
android:orientation="vertical"
android:layout_marginRight="@dimen/spacing_medium">
android:layout_marginEnd="@dimen/spacing_medium">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -58,7 +58,7 @@
android:textSize="17sp"
android:textColor="@color/text_secondary"
tools:text="5"
android:layout_marginLeft="@dimen/spacing_small"
android:layout_marginStart="@dimen/spacing_small"
/>
</LinearLayout>
<TextView
@ -73,10 +73,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@drawable/layout_rounded_bg"
android:background="@drawable/layout_rounded_bg_window"
android:padding="@dimen/spacing_medium"
android:orientation="vertical"
android:layout_marginLeft="@dimen/spacing_medium">
android:layout_marginStart="@dimen/spacing_medium">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -93,7 +93,7 @@
android:textSize="17sp"
android:textColor="@color/text_secondary"
tools:text="5"
android:layout_marginLeft="@dimen/spacing_small"
android:layout_marginStart="@dimen/spacing_small"
/>
</LinearLayout>
<TextView

View file

@ -1,10 +1,8 @@
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
android:id="@+id/recyclerView"

View file

@ -32,7 +32,7 @@
android:layout_height="wrap_content"
android:text="@string/equip_automatically"
android:layout_marginEnd="6dp"/>
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/autoEquipSwitch"/>
@ -61,11 +61,10 @@
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:text="@string/wear_costume"/>
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/costumeSwitch"/>
</LinearLayout>
<com.habitrpg.android.habitica.ui.views.equipment.EquipmentOverviewView
android:id="@+id/costume_view"

View file

@ -21,7 +21,7 @@
android:layout_height="wrap_content"
app:subtitle="HP"
app:title="@string/health_points"
app:titleColor="@color/red_10"
app:titleColor="@color/text_red_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -33,7 +33,7 @@
android:layout_height="wrap_content"
app:subtitle="EXP"
app:title="@string/experience_points"
app:titleColor="@color/yellow_50"
app:titleColor="@color/text_yellow_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -44,7 +44,7 @@
android:layout_height="wrap_content"
app:subtitle="MP"
app:title="@string/mana_points"
app:titleColor="@color/blue_10"
app:titleColor="@color/text_blue_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -55,7 +55,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/currency"
app:title="@string/gold_capitalilzed"
app:titleColor="@color/orange_10"
app:titleColor="@color/text_orange_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -66,7 +66,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/premium_currency"
app:title="@string/gems"
app:titleColor="@color/green_10"
app:titleColor="@color/text_green_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -77,7 +77,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/subscriber_currency"
app:title="@string/mystic_hourglasses"
app:titleColor="@color/brand_300"
app:titleColor="@color/text_brand_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -88,7 +88,7 @@
android:layout_height="wrap_content"
app:subtitle="STR, CON, INT, PER"
app:title="@string/stat_allocation"
app:titleColor="#7f3300"
app:titleColor="@color/text_brown_white"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"

View file

@ -59,6 +59,7 @@
android:layout_marginTop="10dp"
android:clipChildren="true"
android:clipToPadding="true"
android:clickable="true"
android:visibility="gone">
<ImageView
android:id="@+id/promo_banner_left_image"
@ -90,7 +91,7 @@
android:id="@+id/promo_banner_duration_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Subheader2"/>
style="@style/Overline"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
@ -130,31 +131,31 @@
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large" />
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:text="@string/gem_purchase_listitem1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/GemPurchaseListItem"
/>
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:text="@string/gem_purchase_listitem2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/GemPurchaseListItem"
/>
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:text="@string/gem_purchase_listitem3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/GemPurchaseListItem"
/>
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:text="@string/gem_purchase_listitem4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/GemPurchaseListItem"
/>
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/no_billing_gems"
@ -228,7 +229,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/gift_sub_gift"
android:layout_marginTop="24dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="6dp" />
<TextView
android:layout_width="match_parent"
@ -253,8 +254,8 @@
android:layout_width="wrap_content"
android:paddingLeft="41dp"
android:paddingRight="41dp"
android:paddingBottom="14dp"
android:paddingTop="14dp"
android:paddingBottom="20dp"
android:paddingTop="20dp"
android:text="@string/gem_purchase_title"
android:layout_gravity="center_horizontal"
android:gravity="center"

View file

@ -9,12 +9,12 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/window_background">
android:background="@color/content_background">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/window_background">
android:background="@color/content_background">
<TextView
android:id="@+id/title_view"
android:layout_width="match_parent"
@ -34,7 +34,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="60dp"
android:background="@drawable/layout_rounded_bg_content"
android:background="@drawable/layout_rounded_bg_window"
android:layout_marginRight="@dimen/spacing_large"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"
@ -68,7 +68,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="60dp"
android:background="@drawable/layout_rounded_bg_content"
android:background="@drawable/layout_rounded_bg_window"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"
android:paddingLeft="@dimen/spacing_medium"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -12,7 +12,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:paddingHorizontal="@dimen/spacing_medium">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -29,6 +30,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:divider="?android:listDivider"
tools:layout_height="50dp"
android:showDividers="middle">
</LinearLayout>
</androidx.cardview.widget.CardView>
@ -36,8 +38,10 @@
android:id="@+id/publicGuildsButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/card_horizontal_padding"
android:text="@string/public_guilds" />
style="@style/HabiticaButton.Offset"
android:textColor="@color/text_primary"
android:text="@string/public_guilds"
android:layout_marginTop="@dimen/spacing_large"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View file

@ -76,10 +76,12 @@
android:textSize="15sp"
android:fontFamily="@string/font_family_medium"
android:layout_marginBottom="@dimen/spacing_large"/>
<Button
<TextView
android:id="@+id/prompt_button"
android:layout_width="match_parent"
android:layout_height="38dp" />
android:layout_height="38dp"
android:textSize="16sp"
android:gravity="center" />
<TextView
android:id="@+id/instructions_title_view"

View file

@ -4,7 +4,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/scrollbarThumb"
android:scrollbars="vertical"
@ -26,7 +25,8 @@
android:id="@+id/leftSparklesView"
android:layout_width="77dp"
android:layout_height="24dp"
android:scaleType="fitCenter"/>
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView
android:id="@+id/numberOfPointsTextView"
android:layout_width="wrap_content"
@ -38,7 +38,8 @@
android:id="@+id/rightSparklesView"
android:layout_width="77dp"
android:layout_height="24dp"
android:scaleType="fitCenter"/>
android:scaleType="fitCenter"
android:contentDescription="@null" />
</LinearLayout>
<TextView
android:id="@+id/unlock_at_level"
@ -53,34 +54,34 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:statsTitle="@string/strength"
app:titleBackgroundColor="@color/red_50"
app:statsColor="@color/red_10"
app:titleBackgroundColor="@color/background_red"
app:statsColor="@color/text_red"
android:layout_marginBottom="12dp"/>
<com.habitrpg.android.habitica.ui.views.stats.StatsView
android:id="@+id/intelligenceStatsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:statsTitle="@string/intelligence"
app:titleBackgroundColor="@color/blue_50"
app:statsColor="@color/blue_10"
app:titleBackgroundColor="@color/background_blue"
app:statsColor="@color/text_blue"
android:layout_marginBottom="12dp"/>
<com.habitrpg.android.habitica.ui.views.stats.StatsView
android:id="@+id/constitutionStatsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:statsTitle="@string/constitution"
app:titleBackgroundColor="@color/yellow_10"
app:statsColor="@color/yellow_5"
app:titleBackgroundColor="@color/background_yellow"
app:statsColor="@color/text_yellow"
android:layout_marginBottom="12dp"/>
<com.habitrpg.android.habitica.ui.views.stats.StatsView
android:id="@+id/perceptionStatsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:statsTitle="@string/perception"
app:titleBackgroundColor="@color/brand_300"
app:statsColor="@color/brand_300"
app:titleBackgroundColor="@color/background_brand"
app:statsColor="@color/text_brand"
android:layout_marginBottom="12dp"/>
<Switch
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/automaticAllocationSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -113,7 +114,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:layout_marginLeft="12dp"/>
android:layout_marginStart="12dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -130,7 +131,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:layout_marginLeft="12dp"/>
android:layout_marginStart="12dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
@ -146,7 +147,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:layout_marginLeft="12dp"/>
android:layout_marginStart="12dp"/>
</LinearLayout>
</LinearLayout>
<View

View file

@ -82,7 +82,7 @@
android:text="@string/subscribe_prompt"
android:gravity="center"
style="@style/Subheader1"
android:textColor="@color/brand_300"
android:textColor="@color/text_brand"
android:lineSpacingExtra="4dp"
android:layout_marginTop="8dp"
android:layout_gravity="center_horizontal"/>
@ -286,7 +286,7 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
style="@style/Subheader1"
android:textColor="@color/brand_300"
android:textColor="@color/text_brand"
android:text="@string/subscribe_options_title"
android:layout_marginBottom="20dp"/>
@ -350,7 +350,7 @@
android:layout_height="wrap_content"
android:text="@string/gift_subscription"
android:background="@color/transparent"
android:textColor="?colorAccent"
android:textColor="@color/text_brand_neon"
android:textAllCaps="false"/>
</LinearLayout>
<LinearLayout

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
@ -83,13 +84,14 @@
android:text="@string/update_app_description"
style="@style/Body2"/>
</LinearLayout>
<TextView
<com.habitrpg.android.habitica.ui.views.DayNightTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/need_more_help"
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/brand_300"
app:dayTextColor="@color/text_brand"
app:nightTextColor="@color/gray_400"
android:textSize="16sp"
android:layout_marginTop="@dimen/spacing_large"
/>
@ -105,7 +107,7 @@
<Button
android:id="@+id/report_bug_button"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Purple"
android:text="@string/report_bug"
android:elevation="0dp"

View file

@ -152,7 +152,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="38dp"
android:text="@string/contact_us"
android:text="@string/submit_feedback"
android:gravity="center"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"

View file

@ -20,14 +20,19 @@
android:id="@+id/btnPlusWrapper"
android:layout_width="@dimen/button_width"
android:layout_height="match_parent">
<ImageView
android:id="@+id/btnPlusIconView"
<View
android:id="@+id/button_plus_circle_view"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"/>
<ImageView
android:id="@+id/btnPlusIconView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="center"
android:layout_gravity="center"
android:src="@drawable/habit_plus" />
android:src="@drawable/habit_plus"
android:background="@color/task_tint_overlay" />
<Button
android:id="@+id/btnPlus"
@ -59,14 +64,19 @@
android:id="@+id/btnMinusWrapper"
android:layout_width="@dimen/button_width"
android:layout_height="match_parent">
<ImageView
android:id="@+id/btnMinusIconView"
<View
android:id="@+id/button_minus_circle_view"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"/>
<ImageView
android:id="@+id/btnMinusIconView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="center"
android:background="@drawable/habit_circle"
android:src="@drawable/habit_minus" />
android:src="@drawable/habit_minus"
android:background="@color/task_tint_overlay" />
<Button
android:id="@+id/btnMinus"
style="@style/HabitButton"

View file

@ -45,23 +45,25 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:layout_alignParentBottom="true"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small">
android:layout_alignParentBottom="true">
<com.habitrpg.android.habitica.ui.views.navigation.BottomNavigationItem
android:id="@+id/habits_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:title="@string/habits"
app:iconDrawable="@drawable/icon_habits_selected"/>
app:iconDrawable="@drawable/icon_habits_selected"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"/>
<com.habitrpg.android.habitica.ui.views.navigation.BottomNavigationItem
android:layout_width="0dp"
android:id="@+id/dailies_tab"
android:layout_height="wrap_content"
android:layout_weight="1"
app:title="@string/dailies"
app:iconDrawable="@drawable/icon_dailies_selected"/>
app:iconDrawable="@drawable/icon_dailies_selected"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"/>
<androidx.legacy.widget.Space
android:layout_width="50dp"
android:layout_height="wrap_content" />
@ -71,14 +73,18 @@
android:layout_height="wrap_content"
android:layout_weight="1"
app:title="@string/todos"
app:iconDrawable="@drawable/icon_todos_selected"/>
app:iconDrawable="@drawable/icon_todos_selected"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"/>
<com.habitrpg.android.habitica.ui.views.navigation.BottomNavigationItem
android:id="@+id/rewards_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:title="@string/rewards"
app:iconDrawable="@drawable/icon_rewards_selected"/>
app:iconDrawable="@drawable/icon_rewards_selected"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"/>
</LinearLayout>
<FrameLayout

View file

@ -17,19 +17,19 @@
android:layout_width="36dp"
android:layout_height="39dp"
android:layout_marginRight="3dp" />
android:layout_marginEnd="3dp" />
<TextView
android:id="@+id/achievement_count_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_gravity="bottom|end"
tools:text="2"
android:background="@drawable/layout_rounded_bg_primary"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:textSize="12sp"
android:textColor="#ffffff" />
android:textColor="@color/white" />
</FrameLayout>
<TextView

View file

@ -43,10 +43,10 @@
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_height="38dp"
android:minWidth="110dp"
style="@style/HabiticaButton.Purple"
android:layout_marginTop="14dp"/>
android:layout_marginTop="10dp"/>
</LinearLayout>
<ImageView
android:id="@+id/left_image_view"

View file

@ -35,10 +35,10 @@
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_height="40dp"
android:minWidth="110dp"
android:text="@string/subscribe"
style="@style/HabiticaButton.Purple"
style="@style/HabiticaButton.Purple.Small"
android:layout_marginTop="14dp"/>
</LinearLayout>
<ImageView

View file

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/gem_view_background"
android:background="@drawable/layout_rounded_bg_window"
android:gravity="center"
android:padding="14dp">
<ImageView
@ -20,14 +20,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<ImageView
android:id="@+id/amount_background_right"
<FrameLayout
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitStart"
android:layout_marginEnd="8dp"
/>
android:clipChildren="true"
android:clipToPadding="true">
<ImageView
android:id="@+id/amount_background_left"
android:layout_width="132dp"
android:layout_height="35dp"
android:layout_gravity="start"
/>
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -37,14 +43,20 @@
android:layout_gravity="center"
android:textSize="36sp"
tools:text="21" />
<ImageView
android:id="@+id/amount_background_left"
<FrameLayout
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitEnd"
android:layout_marginStart="8dp"
/>
android:clipChildren="true"
android:clipToPadding="true">
<ImageView
android:id="@+id/amount_background_right"
android:layout_width="132dp"
android:layout_height="35dp"
android:layout_gravity="end"
/>
</FrameLayout>
</LinearLayout>
<TextView
@ -56,14 +68,18 @@
android:gravity="center"
android:layout_marginBottom="14dp" />
<Button
<TextView
android:layout_width="match_parent"
android:layout_height="38dp"
android:id="@+id/purchase_button"
android:background="@drawable/purchase_button_background"
android:layout_marginHorizontal="8dp"
android:textColor="@color/white"
style="@style/Body1"
android:gravity="center"
android:textSize="16sp"
android:letterSpacing="0.02"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_small"
tools:text="$ 4.99"/>
<TextView
android:id="@+id/footer_text_view"
@ -71,7 +87,6 @@
android:layout_height="wrap_content"
android:textColor="#CAC7CE"
android:visibility="gone"
android:layout_marginTop="2dp"
android:layout_marginBottom="4dp"
android:layout_gravity="center"
android:gravity="center"

View file

@ -3,7 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:clickable="true"
android:background="@color/content_background"
android:focusable="true">
@ -36,7 +35,6 @@
android:textColor="@color/text_quad"
tools:text="150"
style="@style/Body1"
app:hasLightBackground="true"
android:textSize="15sp" />
<TextView
android:id="@+id/unlockLabel"
@ -48,7 +46,7 @@
android:textSize="11sp"
android:textColor="@color/text_quad"
android:paddingStart="2dp"
android:paddingRight="2dp"
android:paddingEnd="2dp"
/>
</LinearLayout>
</LinearLayout>
@ -58,7 +56,7 @@
android:layout_height="@dimen/shopitem_status_size"
android:visibility="gone"
tools:visibility="visible"
android:layout_alignLeft="@id/container"
android:layout_alignStart="@id/container"
android:layout_alignTop="@id/container"
android:gravity="center"
android:scaleType="center"
@ -67,11 +65,11 @@
android:id="@+id/item_detail_indicator"
android:layout_width="@dimen/shopitem_status_size"
android:layout_height="@dimen/shopitem_status_size"
android:layout_gravity="right"
android:layout_gravity="end"
android:visibility="gone"
android:layout_alignRight="@id/container"
android:layout_alignEnd="@id/container"
android:gravity="center"
android:textColor="@color/white"
android:layout_marginRight="-4dp"
android:layout_marginEnd="-4dp"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<mrge xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
@ -26,7 +26,7 @@
android:background="@drawable/name_plate"
android:gravity="center_vertical"
android:textColor="@color/white"
android:layout_marginLeft="45dp"
android:layout_marginStart="45dp"
android:layout_marginTop="83dp"
android:textStyle="bold" />
<TextView
@ -39,4 +39,4 @@
android:layout_marginBottom="4dp"
style="@style/Body1"
tools:text="Welcome to the Market! Stock up on new gear or buy rare eggs and potions. Check in periodically for new stock." />
</mrge>
</FrameLayout>

View file

@ -4,8 +4,8 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="55dp"
android:paddingRight="@dimen/chat_horizontal_inset"
android:paddingStart="55dp"
android:paddingEnd="@dimen/chat_horizontal_inset"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:background="@color/window_background">
@ -16,7 +16,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/spacing_large"
android:textColor="@color/brand_300"
android:textColor="@color/text_brand_neon"
tools:text="System message"
style="@style/Body1"/>
</LinearLayout>

View file

@ -47,6 +47,7 @@
android:layout_height="wrap_content"
style="@style/Caption4"
android:text="@string/pending_approval"
android:textColor="@color/text_quad"
/>
<Space
android:layout_width="wrap_content"
@ -62,16 +63,18 @@
android:layout_height="@dimen/task_icon_size"
android:scaleType="center"
app:srcCompat="@drawable/task_icon_calendar"
android:layout_marginEnd="2dp"/>
android:layout_marginEnd="2dp"
app:tint="@color/text_dimmed"
app:tintMode="multiply"/>
<TextView
android:id="@+id/specialTaskText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/task_secondary_text"
android:visibility="invisible"
style="@style/Caption3"
tools:visibility="visible"
android:textColor="@color/text_quad"
tools:text="special" />
<TextView
@ -79,9 +82,11 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:drawableStart="@drawable/task_icon_streak"
app:drawableStartCompat="@drawable/task_icon_streak"
app:drawableTint="@color/text_dimmed"
app:drawableTintMode="multiply"
android:drawablePadding="2dp"
android:textColor="@color/task_secondary_text"
android:textColor="@color/text_quad"
tools:text="10"
android:gravity="center_vertical"
style="@style/Caption3" />
@ -93,7 +98,9 @@
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/belongs_to_challenge"
android:scaleType="center"
app:srcCompat="@drawable/task_megaphone" />
app:srcCompat="@drawable/task_megaphone"
app:tint="@color/text_dimmed"
app:tintMode="multiply" />
<ImageView
android:id="@+id/iconviewReminder"
android:layout_width="@dimen/task_icon_size"
@ -101,12 +108,14 @@
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/has_reminder"
android:scaleType="center"
app:srcCompat="@drawable/task_icon_reminder" />
app:srcCompat="@drawable/task_icon_reminder"
app:tint="@color/text_dimmed"
app:tintMode="multiply"/>
<TextView
android:id="@+id/reminder_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/task_secondary_text"
android:textColor="@color/text_quad"
style="@style/Caption3" />
</LinearLayout>
</LinearLayout>

View file

@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:background="?attr/colorContentBackground"
android:foreground="?selectableItemBackground"
android:orientation="vertical">
@ -30,14 +31,26 @@
<FrameLayout
android:id="@+id/checkBoxHolder"
android:layout_width="@dimen/button_width"
android:layout_height="match_parent">
<CheckBox
android:id="@+id/checkBox"
android:layout_width="@dimen/checkbox_size"
android:layout_height="@dimen/checkbox_size"
android:layout_height="match_parent"
tools:background="@color/red_10">
<View
android:id="@+id/checkBoxBackground"
android:layout_width="24dp"
android:layout_height="24dp"
android:gravity="center"
android:background="@drawable/todo_unchecked"
android:layout_gravity="center" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/task_tint_overlay"/>
<ImageView
android:id="@+id/checkmark"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:button="@drawable/todo_checkbox"
android:gravity="center" />
android:scaleType="center"
android:src="@drawable/checkmark" />
</FrameLayout>
<include layout="@layout/task_main_content" />
<ProgressBar

View file

@ -107,15 +107,6 @@
android:id="@+id/openChallengeDetail"
app:destination="@id/challengeDetailFragment" />
</fragment>
<fragment
android:id="@+id/shopsFragment"
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.shops.ShopsFragment"
android:label="@string/sidebar_shops" >
<argument
android:name="selectedTab"
app:argType="integer"
android:defaultValue="0" />
</fragment>
<fragment
android:id="@+id/avatarOverviewFragment"
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.customization.AvatarOverviewFragment"
@ -434,5 +425,5 @@
<fragment
android:id="@+id/promoInfoFragment"
android:name="com.habitrpg.android.habitica.ui.fragments.PromoInfoFragment"
android:label="PromoInfoFragment" />
android:label="" />
</navigation>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="tavern.nolikes.background">#121212</color>
<color name="tavern.somelikes.background">#333333</color>
<color name="tavern.nolikes.background">#0A0A0A</color>
<color name="tavern.somelikes.background">#464646</color>
<color name="tavern.userliked.background">@color/text_green</color>
<color name="tavern.nolikes.foreground">#4D4D4D</color>
<color name="tavern.somelikes.foreground">#000000</color>
<color name="tavern.userliked.foreground">#000000</color>
<color name="tavern.nolikes.foreground">@color/gray_400</color>
<color name="tavern.somelikes.foreground">@color/gray_700</color>
<color name="tavern.userliked.foreground">@color/gray_700</color>
</resources>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_accent">@color/brand_300</color>
<color name="color_accent">@color/brand_400</color>
<color name="text_primary">@color/gray_600</color>
<color name="text_secondary">@color/gray_500</color>
<color name="text_ternary">@color/gray_400</color>
<color name="text_quad">@color/gray_400</color>
<color name="text_quad">@color/gray_300</color>
<color name="text_dimmed">@color/gray_200</color>
<color name="text_brand">@color/brand_400</color>
<color name="text_brand_neon">@color/brand_500</color>
@ -26,17 +26,35 @@
<color name="disabled_background">@color/gray_200</color>
<color name="separator">@color/gray_200</color>
<color name="system_bars">@color/gray_1</color>
<color name="habit_inactive_gray">@color/gray_50</color>
<color name="habit_inactive_gray">@color/gray_10</color>
<color name="equipment_overview_background">@color/gray_10</color>
<color name="inverted_background">@color/gray_10</color>
<color name="inverted_background_offset">@color/gray_50</color>
<color name="background_red">@color/red_10</color>
<color name="background_orange">@color/orange_10</color>
<color name="background_yellow">@color/yellow_5</color>
<color name="background_green">@color/green_10</color>
<color name="background_blue">@color/blue_10</color>
<color name="background_teal">@color/teal_10</color>
<color name="background_brand">@color/brand_200</color>
<color name="checkbox_fill">#50ffffff</color>
<color name="checkbox_fill">#40000000</color>
<color name="taskform_gray">#3D3945</color>
<color name="reward_buy_button_text">#FFFFB445</color>
<color name="task_tint_overlay">#4D19171C</color>
<color name="content_95_alpha">#f21A181D</color>
<color name="content_80_alpha">#cc1A181D</color>
<color name="content_75_alpha">#bf1A181D</color>
<color name="content_50_alpha">#7f1A181D</color>
<color name="content_15_alpha">#261A181D</color>
<color name="text_red_white">@color/white</color>
<color name="text_orange_white">@color/white</color>
<color name="text_yellow_white">@color/white</color>
<color name="text_green_white">@color/white</color>
<color name="text_blue_white">@color/white</color>
<color name="text_teal_white">@color/white</color>
<color name="text_brown_white">@color/white</color>
<color name="text_brand_white">@color/white</color>
</resources>

View file

@ -148,4 +148,8 @@
<attr name="maxValue" format="integer" />
<attr name="minValue" format="integer" />
</declare-styleable>
<declare-styleable name="DayNightTextView">
<attr name="dayTextColor" format="color" />
<attr name="nightTextColor" format="color" />
</declare-styleable>
</resources>

View file

@ -99,8 +99,6 @@
<color name="habit_inactive_gray">#F9F9F9</color>
<!-- Preferences -->
<color name="preference_fallback_accent_color">@color/colorAccent</color>
<!-- buttons -->
<color name="btn_success">@color/green_10</color>
<color name="btn_danger">@color/red_10</color>
@ -139,6 +137,7 @@
<color name="hair_red">#EC720E</color>
<color name="hair_black">#313131</color>
<color name="reward_buy_button_bg">#4cfedead</color>
<color name="reward_buy_button_text">#D9784A00</color>
<color name="ic_launcher_background">#331960</color>
<color name="scrollbarThumb">@color/content_background_offset</color>
<color name="setup_background">#efeff4</color>
@ -153,8 +152,6 @@
<color name="orange_1">#7f3300</color>
<color name="color_accent">@color/brand_400</color>
<color name="text_primary">@color/gray_50</color>
@ -185,13 +182,30 @@
<color name="equipment_overview_background">@color/gray_50</color>
<color name="inverted_background">@color/gray_100</color>
<color name="inverted_background_offset">@color/gray_200</color>
<color name="background_red">@color/red_50</color>
<color name="background_orange">@color/orange_50</color>
<color name="background_yellow">@color/yellow_10</color>
<color name="background_green">@color/green_50</color>
<color name="background_blue">@color/blue_50</color>
<color name="background_teal">@color/teal_50</color>
<color name="background_brand">@color/brand_300</color>
<color name="checkbox_fill">#50ffffff</color>
<color name="taskform_gray">#99edecee</color>
<color name="task_tint_overlay">#00000000</color>
<color name="content_95_alpha">#f2ffffff</color>
<color name="content_80_alpha">#ccffffff</color>
<color name="content_75_alpha">#bfffffff</color>
<color name="content_50_alpha">#7fffffff</color>
<color name="content_15_alpha">#26ffffff</color>
<color name="text_red_white">@color/red_10</color>
<color name="text_orange_white">@color/orange_10</color>
<color name="text_yellow_white">@color/yellow_10</color>
<color name="text_green_white">@color/green_10</color>
<color name="text_blue_white">@color/blue_10</color>
<color name="text_teal_white">@color/teal_10</color>
<color name="text_brown_white">#7f3300</color>
<color name="text_brand_white">@color/brand_300</color>
</resources>

View file

@ -1105,4 +1105,5 @@
<string name="dark_mode">Dark Mode</string>
<string name="theme_mode">Theme Mode</string>
<string name="theme_color">Theme Color</string>
<string name="submit_feedback">Submit Feedback</string>
</resources>

View file

@ -4,7 +4,7 @@
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/font_family_condensed
</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">#000</item>
<item name="android:textColor">@color/text_primary</item>
</style>
<style name="ChallengeTaskDetails">

View file

@ -62,9 +62,9 @@
<style name="MainAppTheme.Dark">
<item name="colorPrimary">@color/gray_500</item>
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_300</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
<item name="barColor">@color/gray_1</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_400</item>
</style>
<style name="MainAppTheme.Red">
@ -89,6 +89,7 @@
<style name="MainAppTheme.Red.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Maroon">
@ -112,6 +113,7 @@
<style name="MainAppTheme.Maroon.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Orange">
@ -136,6 +138,7 @@
<style name="MainAppTheme.Orange.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Yellow">
@ -160,6 +163,7 @@
<style name="MainAppTheme.Yellow.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Green">
@ -184,6 +188,7 @@
<style name="MainAppTheme.Green.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Teal">
@ -208,6 +213,7 @@
<style name="MainAppTheme.Teal.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="MainAppTheme.Blue">
@ -232,6 +238,7 @@
<style name="MainAppTheme.Blue.Dark">
<item name="barColor">@color/gray_10</item>
<item name="colorPrimaryOffset">@color/gray_10</item>
<item name="textColorPrimaryDark">@color/gray_200</item>
</style>
<style name="BottomSheetTheme" parent="Theme.AppCompat.NoActionBar">
@ -250,7 +257,7 @@
</style>
<style name="PopupTheme" parent="Widget.AppCompat.Light.PopupMenu">
<style name="PopupTheme" parent="Widget.AppCompat.PopupMenu.Overflow">
<item name="android:popupBackground">@color/content_background</item>
</style>
@ -273,8 +280,9 @@
<item name="android:padding">@dimen/card_padding_compact</item>
</style>
<style name="CardView.Default" parent="CardView">
<style name="CardView.Default" parent="Widget.MaterialComponents.CardView">
<item name="android:layout_margin">@dimen/card_margin</item>
<item name="android:backgroundTint">@color/window_background</item>
</style>
<style name="RowWrapper">
@ -346,7 +354,20 @@
</style>
<style name="AlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@color/brand_400</item>
<item name="colorPrimary">@color/text_brand_neon</item>
<item name="colorAccent">@color/color_accent</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">@style/PositiveButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
</style>
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/text_red</item>
</style>
<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/dialog_button_text_color</item>
</style>
<style name="HabiticaAlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
@ -402,7 +423,8 @@
</style>
<style name="GemPurchaseListItem">
<item name="android:textColor">@color/brand_300</item>
<item name="dayTextColor">@color/text_brand</item>
<item name="nightTextColor">@color/gray_400</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:textSize">12sp</item>
<item name="android:drawableLeft">@drawable/ic_check_purple</item>
@ -548,6 +570,7 @@
<style name="LoginButton" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:shadowColor">@color/transparent</item>
<item name="android:background">@drawable/login_button</item>
<item name="backgroundTint">@color/brand_50</item>
<item name="android:textColor">@color/white</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:textAllCaps">false</item>
@ -588,6 +611,7 @@
<style name="HabiticaButton" parent="@style/Widget.MaterialComponents.Button.TextButton">
<item name="android:textAllCaps">false</item>
<item name="android:textSize">16sp</item>
<item name="android:letterSpacing">0.02</item>
<item name="android:fontFamily">@string/font_family_medium</item>
<item name="android:minHeight">@dimen/button_height</item>
<item name="android:textColor">@color/white</item>
@ -601,6 +625,7 @@
<style name="HabiticaButton.Borderless" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textAllCaps">false</item>
<item name="android:textSize">16sp</item>
<item name="android:letterSpacing">0.02</item>
<item name="android:fontFamily">@string/font_family_medium</item>
<item name="android:minHeight">@dimen/button_height</item>
<item name="android:shadowColor">@color/transparent</item>
@ -612,7 +637,7 @@
<style name="HabiticaButton.Primary" parent="HabiticaButton">
<item name="android:backgroundTint">@color/color_accent</item>
<item name="android:text">?textColorPrimaryDark</item>
<item name="android:textColor">?textColorPrimaryDark</item>
</style>
<style name="HabiticaButton.Small" parent="HabiticaButton">

View file

@ -54,7 +54,6 @@ import com.habitrpg.android.habitica.ui.fragments.inventory.equipment.EquipmentO
import com.habitrpg.android.habitica.ui.fragments.inventory.items.ItemRecyclerFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.items.ItemsFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.shops.ShopFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.shops.ShopsFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.stable.MountDetailRecyclerFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.stable.PetDetailRecyclerFragment;
import com.habitrpg.android.habitica.ui.fragments.inventory.stable.StableFragment;
@ -207,8 +206,6 @@ public interface UserComponent {
void inject(InboxMessageListFragment inboxMessageListFragment);
void inject(ShopsFragment shopsFragment);
void inject(ShopFragment shopFragment);
void inject(PushNotificationManager pushNotificationManager);

View file

@ -11,5 +11,5 @@ interface ContentRepository {
fun retrieveContent(context: Context?): Flowable<ContentResult>
fun retrieveContent(context: Context?, forced: Boolean): Flowable<ContentResult>
fun retrieveWorldState(): Flowable<WorldState>
fun retrieveWorldState(context: Context?): Flowable<WorldState>
}

View file

@ -210,9 +210,9 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
}
override fun feedPet(pet: Pet, food: Food): Flowable<FeedResponse> {
return apiClient.feedPet(pet.key, food.key)
return apiClient.feedPet(pet.key ?: "", food.key)
.doOnNext { feedResponse ->
localRepository.feedPet(food.key, pet.key, feedResponse.value ?: 0, userID)
localRepository.feedPet(food.key, pet.key ?: "", feedResponse.value ?: 0, userID)
}
}

View file

@ -95,7 +95,7 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
}
override fun sleep(user: User): Flowable<User> {
localRepository.executeTransaction { user.preferences?.isSleep = !(user.preferences?.sleep ?: false) }
localRepository.executeTransaction { user.preferences?.sleep = !(user.preferences?.sleep ?: false) }
return apiClient.sleep().map { user }
}
@ -211,7 +211,7 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
.doOnNext { user ->
localRepository.executeTransaction {
user.authentication?.localAuthentication?.username = newLoginName
user.flags?.isVerifiedUsername = true
user.flags?.verifiedUsername = true
}
}
.firstElement()
@ -290,8 +290,8 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
if (user != null && appConfigManager.enableLocalChanges()) {
localRepository.executeTransaction {
when (type) {
"skin" -> user.preferences?.setSkin(identifier)
"shirt" -> user.preferences?.setShirt(identifier)
"skin" -> user.preferences?.skin =identifier
"shirt" -> user.preferences?.shirt = identifier
"hair" -> {
when (category) {
"color" -> user.preferences?.hair?.color = identifier
@ -302,8 +302,8 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
"base" -> user.preferences?.hair?.base = identifier.toInt()
}
}
"background" -> user.preferences?.setBackground(identifier)
"chair" -> user.preferences?.setChair(identifier)
"background" -> user.preferences?.background = identifier
"chair" -> user.preferences?.chair = identifier
}
}
}

View file

@ -4,7 +4,7 @@ import android.content.Context
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.models.inventory.Animal
fun Animal.getTranslatedType(c: Context?): String {
fun Animal.getTranslatedType(c: Context?): String? {
if (c == null) {
return type
}
@ -15,7 +15,7 @@ fun Animal.getTranslatedType(c: Context?): String {
"wacky" -> c.getString(R.string.wacky)
"special" -> c.getString(R.string.special)
"premium" -> c.getString(R.string.magic_potion)
else -> {
else -> {
type
}
}

View file

@ -1,6 +1,7 @@
package com.habitrpg.android.habitica.helpers
import android.os.Bundle
import android.util.Log
import androidx.navigation.NavController
import androidx.navigation.NavDirections
import java.lang.ref.WeakReference
@ -21,7 +22,11 @@ object MainNavigationController {
lastNavigation = Date()
try {
navController?.get()?.navigate(transactionId, args)
} catch (_: IllegalArgumentException) {}
} catch (e: IllegalArgumentException) {
Log.e("Main Navigation", e.localizedMessage)
} catch (error: Exception) {
Log.e("Main Navigation", error.localizedMessage)
}
}
}

View file

@ -124,7 +124,7 @@ class ScoreTaskLocallyInteractor {
var totalPerception = levelStat
totalStrength += user.stats?.buffs?.str?.toInt() ?: 0
totalIntelligence += user.stats?.buffs?.get_int()?.toInt() ?: 0
totalIntelligence += user.stats?.buffs?._int?.toInt() ?: 0
totalConstitution += user.stats?.buffs?.con?.toInt() ?: 0
totalPerception += user.stats?.buffs?.per?.toInt() ?: 0

View file

@ -12,10 +12,10 @@ interface Avatar {
val sleep: Boolean
val stats: Stats?
val preferences: AvatarPreferences?
val gemCount: Int?
val hourglassCount: Int?
val gemCount: Int
val hourglassCount: Int
val costume: Outfit?
val equipped: Outfit?
fun hasClass(): Boolean
val isValid: Boolean
fun isValid(): Boolean
}

View file

@ -4,9 +4,9 @@ interface Animal {
var key: String?
var text: String?
var type: String?
var animal: String?
var color: String?
var animal: String
var color: String
var premium: Boolean
var numberOwned: Int?
var totalNumber: Int?
var numberOwned: Int
var totalNumber: Int
}

View file

@ -1,99 +0,0 @@
package com.habitrpg.android.habitica.models.inventory;
import io.realm.RealmObject;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;
public class Mount extends RealmObject implements Animal {
@PrimaryKey
String key;
String animal, color, text, type;
boolean premium;
@Ignore
private Integer numberOwned;
@Ignore
private Integer totalNumber;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Override
public String getText() {
return text;
}
@Override
public void setText(String text) {
this.text = text;
}
@Override
public String getType() {
return type;
}
@Override
public void setType(String type) {
this.type = type;
}
public String getAnimal() {
if (animal == null) {
return key.split("-")[0];
}
return animal;
}
public void setAnimal(String animal) {
this.animal = animal;
}
public String getColor() {
if (color == null) {
return key.split("-")[1];
}
return color;
}
public void setColor(String color) {
this.color = color;
}
public boolean getPremium() {
return premium;
}
public void setPremium(boolean premium) {
this.premium = premium;
}
public Integer getNumberOwned() {
if (numberOwned == null) {
return 0;
}
return numberOwned;
}
public void setNumberOwned(Integer numberOwned) {
this.numberOwned = numberOwned;
}
public Integer getTotalNumber() {
if (totalNumber == null) {
return 0;
}
return totalNumber;
}
public void setTotalNumber(Integer totalNumber) {
this.totalNumber = totalNumber;
}
}

View file

@ -0,0 +1,31 @@
package com.habitrpg.android.habitica.models.inventory
import io.realm.RealmObject
import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
open class Mount : RealmObject(), Animal {
@PrimaryKey
override var key: String? = null
override var animal: String = ""
get() {
return if (field.isBlank()) {
key?.split("-")?.toTypedArray()?.get(0) ?: ""
} else field
}
override var color: String = ""
get() {
return if (field.isBlank()) {
key?.split("-")?.toTypedArray()?.get(1) ?: ""
} else field
}
override var text: String? = null
override var type: String? = null
override var premium = false
@Ignore
override var numberOwned: Int = 0
@Ignore
override var totalNumber: Int = 0
}

View file

@ -1,101 +0,0 @@
package com.habitrpg.android.habitica.models.inventory;
import io.realm.RealmObject;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;
public class Pet extends RealmObject implements Animal{
@PrimaryKey
String key;
String animal, color, text, type;
boolean premium;
@Ignore
private Integer numberOwned;
@Ignore
private Integer totalNumber;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Override
public String getText() {
return text;
}
@Override
public void setText(String text) {
this.text = text;
}
@Override
public String getType() {
return type;
}
@Override
public void setType(String type) {
this.type = type;
}
public String getAnimal() {
if (animal == null) {
return getKey().split("-")[0];
}
return animal;
}
public void setAnimal(String animal) {
this.animal = animal;
}
public String getColor() {
if (color == null) {
return getKey().split("-")[1];
}
return color;
}
public void setColor(String color) {
this.color = color;
}
public boolean getPremium() {
return premium;
}
public void setPremium(boolean premium) {
this.premium = premium;
}
public Integer getNumberOwned() {
if (numberOwned == null) {
return 0;
}
return numberOwned;
}
public void setNumberOwned(Integer numberOwned) {
this.numberOwned = numberOwned;
}
public Integer getTotalNumber() {
if (totalNumber == null) {
return 0;
}
return totalNumber;
}
public void setTotalNumber(Integer totalNumber) {
this.totalNumber = totalNumber;
}
}

View file

@ -0,0 +1,30 @@
package com.habitrpg.android.habitica.models.inventory
import io.realm.RealmObject
import io.realm.annotations.Ignore
import io.realm.annotations.PrimaryKey
open class Pet : RealmObject(), Animal {
@PrimaryKey
override var key: String? = null
override var animal: String = ""
get() {
return if (field.isBlank()) {
key?.split("-")?.toTypedArray()?.get(0) ?: ""
} else field
}
override var color: String = ""
get() {
return if (field.isBlank()) {
key?.split("-")?.toTypedArray()?.get(1) ?: ""
} else field
}
override var text: String? = null
override var type: String? = null
override var premium = false
@Ignore
override var numberOwned: Int = 0
@Ignore
override var totalNumber: Int = 0
}

View file

@ -10,7 +10,6 @@ import io.realm.annotations.PrimaryKey
open class Member : RealmObject(), Avatar {
@PrimaryKey
@SerializedName("_id")
var id: String? = null
@ -27,7 +26,7 @@ open class Member : RealmObject(), Avatar {
this.inbox?.userId = subID
}
if (preferences != null && preferences?.isManaged != true) {
preferences?.setUserId(subID)
preferences?.userId = subID
}
if (this.profile != null && this.profile?.isManaged != true) {
this.profile?.userId = subID
@ -45,7 +44,13 @@ open class Member : RealmObject(), Avatar {
this.authentication?.userId = subID
}
}
private var stats: Stats? = null
override var stats: Stats? = null
set(value) {
field = value
if (value != null && this.id != null && !value.isManaged) {
field?.userId = this.id
}
}
var inbox: Inbox? = null
set(inbox) {
field = inbox
@ -53,7 +58,17 @@ open class Member : RealmObject(), Avatar {
inbox.userId = this.id
}
}
private var preferences: MemberPreferences? = null
override var preferences: MemberPreferences? = null
set(value) {
field = value
if (value != null && this.id != null && !value.isManaged) {
field?.userId = this.id
}
}
override val gemCount: Int
get() = 0
override val hourglassCount: Int
get() = 0
var profile: Profile? = null
set(profile) {
field = profile
@ -96,11 +111,23 @@ open class Member : RealmObject(), Avatar {
items.userId = this.id
}
}
private var costume: Outfit? = null
private var equipped: Outfit? = null
override var costume: Outfit? = null
set(value) {
field = value
if (value != null && this.id != null) {
field?.userId = this.id + "costume"
}
}
override var equipped: Outfit? = null
set(value) {
field = value
if (value != null && this.id != null) {
field?.userId = this.id + "equipped"
}
}
private var currentMount: String? = null
private var currentPet: String? = null
override var currentMount: String? = null
override var currentPet: String? = null
var participatesInQuest: Boolean? = null
var loginIncentives: Int = 0
@ -120,79 +147,10 @@ open class Member : RealmObject(), Avatar {
val formattedUsername: String?
get() = if (username != null) "@$username" else null
override fun getPreferences(): MemberPreferences? {
return preferences
}
fun setPreferences(preferences: MemberPreferences?) {
this.preferences = preferences
if (preferences != null && this.id != null && !preferences.isManaged) {
preferences.setUserId(this.id ?: "")
}
}
override fun getStats(): Stats? {
return stats
}
fun setStats(stats: Stats?) {
this.stats = stats
if (stats != null && this.id != null && !stats.isManaged) {
stats.userId = this.id
}
}
override fun getGemCount(): Int? {
return 0
}
override fun getHourglassCount(): Int? {
return 0
}
override fun getCostume(): Outfit? {
return costume
}
fun setCostume(costume: Outfit?) {
this.costume = costume
if (costume != null && this.id != null) {
costume.userId = this.id + "costume"
}
}
override fun getEquipped(): Outfit? {
return equipped
}
override fun hasClass(): Boolean {
return preferences?.disableClasses == false && stats?.habitClass?.isNotEmpty() == true
}
fun setEquipped(equipped: Outfit?) {
this.equipped = equipped
if (equipped != null && this.id != null) {
equipped.userId = this.id + "equipped"
}
}
override fun getCurrentMount(): String? {
return currentMount
}
fun setCurrentMount(currentMount: String) {
this.currentMount = currentMount
}
override fun getCurrentPet(): String? {
return currentPet
}
fun setCurrentPet(currentPet: String) {
this.currentPet = currentPet
}
override fun getSleep(): Boolean {
return getPreferences()?.sleep ?: false
}
override val sleep: Boolean
get() = preferences?.sleep ?: false
}

View file

@ -10,104 +10,31 @@ import io.realm.annotations.PrimaryKey
open class MemberPreferences : RealmObject(), AvatarPreferences {
@PrimaryKey
private var userId: String? = null
private var hair: Hair? = null
private var costume: Boolean = false
private var disableClasses: Boolean = false
private var sleep: Boolean = false
private var shirt: String? = null
private var skin: String? = null
private var size: String? = null
private var background: String? = null
private var chair: String? = null
fun setUserId(userId: String) {
this.userId = userId
if (hair != null && !hair!!.isManaged) {
hair!!.userId = userId
override var userId: String? = null
set(value) {
field = value
if (hair?.isManaged != true) {
hair?.userId = userId
}
}
override fun getUserId(): String? {
return userId
}
override fun getHair(): Hair? {
return hair
}
fun setHair(hair: Hair) {
this.hair = hair
}
override fun getCostume(): Boolean {
return costume
}
fun setCostume(costume: Boolean) {
this.costume = costume
}
override fun getDisableClasses(): Boolean {
return disableClasses
}
fun setDisableClasses(disableClasses: Boolean) {
this.disableClasses = disableClasses
}
override fun getSleep(): Boolean {
return sleep
}
fun setSleep(sleep: Boolean) {
this.sleep = sleep
}
override fun getShirt(): String? {
return shirt
}
fun setShirt(shirt: String) {
this.shirt = shirt
}
override fun getSkin(): String? {
return skin
}
fun setSkin(skin: String) {
this.skin = skin
}
override fun getSize(): String? {
return size
}
fun setSize(size: String) {
this.size = size
}
override fun getBackground(): String? {
return background
}
fun setBackground(background: String) {
this.background = background
}
override fun getChair(): String? {
return if (chair != null && chair != "none") {
if (chair!!.length > 5 && chair!!.substring(0, 6) != "chair_") {
chair
override var hair: Hair? = null
override var costume: Boolean = false
override var disableClasses: Boolean = false
override var sleep: Boolean = false
override var shirt: String? = null
override var skin: String? = null
override var size: String? = null
override var background: String? = null
override var chair: String? = null
get() {
return if (field != null && field != "none") {
if (field!!.length > 5 && field?.substring(0, 6) != "chair_") {
field
} else {
"chair_" + chair!!
"chair_$field"
}
} else null
}
fun setChair(chair: String) {
this.chair = chair
}
}

View file

@ -23,8 +23,8 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic
get() = "fall_extra_gems"
override val promoType: PromoType
get() = PromoType.GEMS_AMOUNT
override val startDate: Date = startDate ?: DateUtils.createDate(2020, 9, 22)
override val endDate: Date = endDate ?: DateUtils.createDate(2020, 9, 30)
override val startDate: Date = startDate ?: DateUtils.createDate(2020, 8, 22)
override val endDate: Date = endDate ?: DateUtils.createDate(2020, 8, 30)
override fun pillBackgroundDrawable(context: Context): Drawable {
return ContextCompat.getDrawable(context, R.drawable.fall_promo_pill_bg) ?: ShapeDrawable()
@ -57,7 +57,7 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic
ContextCompat.getDrawable(context, R.drawable.fall_promo_menu_right)
)
view.binding.button.background = ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_gray_1)
view.binding.button.backgroundTintList = ContextCompat.getColorStateList(context, R.color.gray_1)
view.binding.button.setText(R.string.learn_more)
view.binding.button.setTextColor(ContextCompat.getColor(context, R.color.white))
view.binding.button.setOnClickListener {
@ -136,7 +136,7 @@ class FallExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habitic
fragment.binding?.promptButton?.setOnClickListener { MainNavigationController.navigate(R.id.gemPurchaseActivity) }
fragment.binding?.instructionDescriptionView?.text = context.getString(R.string.fall_promo_info_instructions, formatter.format(startDate), formatter.format(endDate))
val limitationsFormatter = SimpleDateFormat.getDateTimeInstance()
val limitationsFormatter = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.LONG, SimpleDateFormat.LONG)
fragment.binding?.limitationsDescriptionView?.text = context.getString(R.string.gems_promo_info_limitations, limitationsFormatter.format(startDate), limitationsFormatter.format(endDate))
}
}

View file

@ -38,8 +38,8 @@ abstract class HabiticaPromotion {
fun getHabiticaPromotionFromKey(key: String, startDate: Date?, endDate: Date?): HabiticaPromotion? {
return when (key) {
"fall_extra_gems" -> FallExtraGemsHabiticaPromotion(startDate, endDate)
"spooky_extra_gems" -> SpookyExtraGemsHabiticaPromotion(startDate, endDate)
"fall_extra_gems", "fall2020", "testFall2020" -> FallExtraGemsHabiticaPromotion(startDate, endDate)
"spooky_extra_gems", "fall2020SecondPromo", "spooky2020" -> SpookyExtraGemsHabiticaPromotion(startDate, endDate)
else -> null
}
}

View file

@ -23,19 +23,19 @@ class SpookyExtraGemsHabiticaPromotion(startDate: Date?, endDate: Date?) : Habit
get() = "spooky_extra_gems"
override val promoType: PromoType
get() = PromoType.GEMS_AMOUNT
override val startDate: Date = startDate ?: DateUtils.createDate(2020, 10, 29)
override val endDate: Date = endDate ?: DateUtils.createDate(2020, 11, 2)
override val startDate: Date = startDate ?: DateUtils.createDate(2020, 9, 29)
override val endDate: Date = endDate ?: DateUtils.createDate(2020, 10, 2)
override fun pillBackgroundDrawable(context: Context): Drawable {
return ContextCompat.getDrawable(context, R.drawable.spooky_promo_pill_bg) ?: ShapeDrawable()
}
override fun backgroundColor(context: Context): Int {
return ContextCompat.getColor(context, R.color.gray_1)
return ContextCompat.getColor(context, R.color.gray_10)
}
override fun promoBackgroundDrawable(context: Context): Drawable {
return ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_gray_1)
return ContextCompat.getDrawable(context, R.drawable.layout_rounded_bg_gray_10)
?: ShapeDrawable()
}

View file

@ -1,7 +1,6 @@
package com.habitrpg.android.habitica.models.social
import com.habitrpg.android.habitica.models.Avatar
import com.habitrpg.android.habitica.models.AvatarPreferences
import com.habitrpg.android.habitica.models.user.Items
import com.habitrpg.android.habitica.models.user.Outfit
import com.habitrpg.android.habitica.models.user.Preferences
@ -18,47 +17,32 @@ open class UserStyles : RealmObject(), Avatar {
preferences?.userId = id
items?.userId = id
}
override fun getCurrentMount(): String? {
return items?.currentMount
}
override fun getCurrentPet(): String? {
return items?.currentPet
}
override val currentMount: String?
get() = items?.currentMount
override fun getSleep(): Boolean {
return false
}
override val currentPet: String?
get() = items?.currentPet
override fun getStats(): Stats? {
return stats
}
override val sleep: Boolean
get() = false
override fun getPreferences(): AvatarPreferences? {
return preferences
}
override val gemCount: Int
get() = 0
override val hourglassCount: Int
get() = 0
override fun getGemCount(): Int {
return 0
}
override val costume: Outfit?
get() = items?.gear?.costume
override fun getHourglassCount(): Int {
return 0
}
override fun getCostume(): Outfit? {
return items?.gear?.costume
}
override fun getEquipped(): Outfit? {
return items?.gear?.equipped
}
override val equipped: Outfit?
get() = items?.gear?.equipped
override fun hasClass(): Boolean {
return false
}
private var stats: Stats? = null
private var preferences: Preferences? = null
override var stats: Stats? = null
override var preferences: Preferences? = null
private var items: Items? = null
}

View file

@ -19,7 +19,7 @@ open class Flags : RealmObject() {
var armoireEnabled = false
var armoireOpened = false
var armoireEmpty = false
var isCommunityGuidelinesAccepted = false
var isVerifiedUsername = false
var communityGuidelinesAccepted = false
var verifiedUsername = false
var isWarnedLowHealth = false
}

View file

@ -11,23 +11,41 @@ import java.util.*
open class Preferences : RealmObject(), AvatarPreferences {
@PrimaryKey
private var userId: String? = null
override var userId: String? = null
set(value) {
field = value
if (hair?.isManaged == false) {
hair?.userId = value
}
if (suppressModals?.isManaged == false) {
suppressModals?.userId = value
}
}
private var hair: Hair? = null
override var hair: Hair? = null
var suppressModals: SuppressedModals? = null
private var costume: Boolean = false
override var costume: Boolean = false
@SerializedName("disableClasses")
var isDisableClasses: Boolean = false
override var disableClasses: Boolean = false
@SerializedName("sleep")
var isSleep: Boolean = false
override var sleep: Boolean = false
var dailyDueDefaultView: Boolean = false
var automaticAllocation: Boolean = false
var allocationMode: String? = null
private var shirt: String? = null
private var skin: String? = null
private var size: String? = null
private var background: String? = null
private var chair: String? = null
override var shirt: String? = null
override var skin: String? = null
override var size: String? = null
override var background: String? = null
override var chair: String? = null
get() {
return if (field != null && field != "none") {
if (field?.contains("chair_") == true) {
field
} else {
"chair_" + field!!
}
} else null
}
var language: String? = null
var sound: String? = null
var dayStart: Int = 0
@ -37,90 +55,6 @@ open class Preferences : RealmObject(), AvatarPreferences {
var emailNotifications: EmailNotificationsPreference? = null
var autoEquip: Boolean = true
override fun getBackground(): String? {
return background
}
fun setBackground(background: String) {
this.background = background
}
override fun getCostume(): Boolean {
return costume
}
fun setCostume(costume: Boolean) {
this.costume = costume
}
override fun getDisableClasses(): Boolean {
return isDisableClasses
}
override fun getSleep(): Boolean {
return isSleep
}
override fun getShirt(): String? {
return shirt
}
fun setShirt(shirt: String) {
this.shirt = shirt
}
override fun getSkin(): String? {
return skin
}
fun setSkin(skin: String) {
this.skin = skin
}
override fun getSize(): String? {
return size
}
fun setSize(size: String) {
this.size = size
}
override fun getHair(): Hair? {
return hair
}
fun setHair(hair: Hair) {
this.hair = hair
}
override fun getChair(): String? {
return if (chair != null && chair != "none") {
if (chair?.contains("chair_") == true) {
chair
} else {
"chair_" + chair!!
}
} else null
}
fun setChair(chair: String) {
this.chair = chair
}
override fun getUserId(): String? {
return userId
}
fun setUserId(userId: String?) {
this.userId = userId
if (hair?.isManaged == false) {
hair?.userId = userId
}
if (suppressModals?.isManaged == false) {
suppressModals?.userId = userId
}
}
fun hasTaskBasedAllocation(): Boolean {
return allocationMode?.toLowerCase(Locale.ROOT) == "taskbased" && automaticAllocation
}

View file

@ -63,7 +63,13 @@ open class User : RealmObject(), Avatar, VersionedObject {
override var versionNumber: Int = 0
var balance: Double = 0.toDouble()
private var stats: Stats? = null
override var stats: Stats? = null
set(value) {
field = value
if (value != null && this.id != null && !value.isManaged) {
field?.userId = this.id
}
}
var inbox: Inbox? = null
set(inbox) {
field = inbox
@ -71,7 +77,13 @@ open class User : RealmObject(), Avatar, VersionedObject {
inbox.userId = this.id
}
}
private var preferences: Preferences? = null
override var preferences: Preferences? = null
set(value) {
field = value
if (value != null && this.id != null && !value.isManaged) {
field?.userId = this.id
}
}
var profile: Profile? = null
set(profile) {
field = profile
@ -174,59 +186,29 @@ open class User : RealmObject(), Avatar, VersionedObject {
val formattedUsername: String?
get() = if (username != null) "@$username" else null
override fun getPreferences(): Preferences? {
return preferences
}
override val gemCount: Int
get() = (this.balance * 4).toInt()
fun setPreferences(preferences: Preferences?) {
this.preferences = preferences
if (preferences != null && this.id != null && !preferences.isManaged) {
preferences.userId = this.id
}
}
override val hourglassCount: Int
get() = purchased?.plan?.consecutive?.trinkets ?: 0
override fun getStats(): Stats? {
return stats
}
override val costume: Outfit?
get() = items?.gear?.costume
fun setStats(stats: Stats?) {
this.stats = stats
if (stats != null && this.id != null && !stats.isManaged) {
stats.userId = this.id
}
}
override fun getGemCount(): Int {
return (this.balance * 4).toInt()
}
override fun getHourglassCount(): Int {
return purchased?.plan?.consecutive?.trinkets ?: 0
}
override fun getCostume(): Outfit? {
return items?.gear?.costume
}
override fun getEquipped(): Outfit? {
return items?.gear?.equipped
}
override val equipped: Outfit?
get() = items?.gear?.equipped
override fun hasClass(): Boolean {
return preferences?.disableClasses != true && flags?.classSelected == true && stats?.habitClass?.isNotEmpty() == true
}
override fun getCurrentMount(): String? {
return items?.currentMount ?: ""
}
override val currentMount: String?
get() = items?.currentMount ?: ""
override val currentPet: String?
get() = items?.currentPet ?: ""
override fun getCurrentPet(): String? {
return items?.currentPet ?: ""
}
override fun getSleep(): Boolean {
return preferences?.sleep ?: false
}
override val sleep: Boolean
get() = preferences?.sleep ?: false
fun hasParty(): Boolean {
return this.party?.id?.length ?: 0 > 0

View file

@ -202,7 +202,7 @@ class AvatarView : View {
private fun getAvatarLayerMap(avatar: Avatar, substitutions: Map<String, Map<String, String>>): EnumMap<LayerType, String> {
val layerMap = EnumMap<LayerType, String>(LayerType::class.java)
if (!avatar.isValid) {
if (!avatar.isValid()) {
return layerMap
}
@ -449,7 +449,7 @@ class AvatarView : View {
initAvatarRectMatrix()
// draw only when user is set
if (avatar?.isValid != true) return
if (avatar?.isValid() != true) return
// request image layers if not yet processed
if (multiDraweeHolder.size() == 0) {

View file

@ -78,8 +78,8 @@ class AvatarWithBarsViewModel(private val context: Context, private val binding:
binding.currencyView.gold = stats.gp ?: 0.0
if (user is User) {
binding.currencyView.hourglasses = user.hourglassCount.toDouble()
binding.currencyView.gems = user.gemCount.toDouble()
binding.currencyView.hourglasses = user.hourglassCount?.toDouble() ?: 0.0
binding.currencyView.gems = user.gemCount?.toDouble() ?: 0.0
}
binding.currencyView.setOnClickListener {

View file

@ -87,6 +87,7 @@ abstract class BaseActivity : AppCompatActivity() {
loadTheme(PreferenceManager.getDefaultSharedPreferences(this))
}
override fun onPause() {
isActivityVisible = false
super.onPause()

View file

@ -405,7 +405,7 @@ class FullProfileActivity : BaseActivity() {
addAttributeRow(getString(R.string.profile_allocated), stats.strength?.toFloat() ?: 0f, stats.intelligence?.toFloat() ?: 0f, stats.constitution?.toFloat() ?: 0f, stats.per?.toFloat() ?: 0f, true, false)
addAttributeRow(getString(R.string.buffs), buffs?.str
?: 0f, buffs?.get_int() ?: 0f, buffs?.con ?: 0f, buffs?.per ?: 0f, roundDown = true, isSummary = false)
?: 0f, buffs?._int ?: 0f, buffs?.con ?: 0f, buffs?.per ?: 0f, roundDown = true, isSummary = false)
// Summary row
addAttributeRow("", attributeStrSum, attributeIntSum, attributeConSum, attributePerSum, roundDown = false, isSummary = true)

View file

@ -26,7 +26,6 @@ class GemPurchaseActivity : BaseActivity() {
lateinit var userRepository: UserRepository
internal var fragment: CheckoutFragment? = null
var isActive = false
var purchaseHandler: PurchaseHandler? = null
override fun getLayoutResId(): Int {
@ -74,16 +73,6 @@ class GemPurchaseActivity : BaseActivity() {
purchaseHandler?.startListening()
}
override fun onResume() {
super.onResume()
isActive = true
}
override fun onPause() {
super.onPause()
isActive = false
}
public override fun onStop() {
purchaseHandler?.stopListening()
super.onStop()
@ -113,7 +102,7 @@ class GemPurchaseActivity : BaseActivity() {
@Subscribe
fun onConsumablePurchased(event: ConsumablePurchasedEvent) {
if (isActive) {
if (isActivityVisible) {
purchaseHandler?.consumePurchase(event.purchase)
compositeSubscription.add(userRepository.retrieveUser(false).subscribe({}, RxErrorHandler.handleEmptyError()))
}

View file

@ -39,7 +39,7 @@ class IntroActivity : BaseActivity(), View.OnClickListener, ViewPager.OnPageChan
super.onCreate(savedInstanceState)
setupIntro()
//binding.viewPagerIndicator.setViewPager(binding.viewPager)
binding.viewPagerIndicator.setViewPager(binding.viewPager)
binding.skipButton.setOnClickListener(this)
binding.finishButton.setOnClickListener(this)

View file

@ -258,12 +258,20 @@ class LoginActivity : BaseActivity(), Consumer<UserAuthResponse> {
if (this.isRegistering) {
binding.loginBtn.text = getString(R.string.register_btn)
binding.username.setHint(R.string.username)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.username.setAutofillHints("newUsername")
binding.password.setAutofillHints("newPassword")
}
binding.password.imeOptions = EditorInfo.IME_ACTION_NEXT
binding.fbLoginButton.setText(R.string.register_btn_fb)
binding.googleLoginButton.setText(R.string.register_btn_google)
} else {
binding.loginBtn.text = getString(R.string.login_btn)
binding.username.setHint(R.string.email_username)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.username.setAutofillHints("username")
binding.password.setAutofillHints("password")
}
binding.password.imeOptions = EditorInfo.IME_ACTION_DONE
binding.fbLoginButton.setText(R.string.login_btn_fb)
binding.googleLoginButton.setText(R.string.login_btn_google)

View file

@ -417,7 +417,7 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
displayDeathDialogIfNeeded()
YesterdailyDialog.showDialogIfNeeded(this, user?.id, userRepository, taskRepository)
if (user?.flags?.isVerifiedUsername == false && isActivityVisible) {
if (user?.flags?.verifiedUsername == false && isActivityVisible) {
val intent = Intent(this, VerifyUsernameActivity::class.java)
startActivity(intent)
}
@ -595,7 +595,7 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
pushNotificationManager.addPushDeviceUsingStoredToken()
}
.flatMap { contentRepository.retrieveContent(this,false) }
.flatMap { contentRepository.retrieveWorldState() }
.flatMap { contentRepository.retrieveWorldState(this) }
.subscribe({ }, RxErrorHandler.handleEmptyError()))
}
}

View file

@ -177,7 +177,7 @@ class CustomizationRecyclerViewAdapter : androidx.recyclerview.widget.RecyclerVi
val dialog = HabiticaAlertDialog(itemView.context)
dialog.setMessage(R.string.purchase_from_timetravel_shop)
dialog.addButton(R.string.go_shopping, true) { _, _ ->
MainNavigationController.navigate(R.id.shopsFragment, bundleOf(Pair("selectedTab", 3)))
MainNavigationController.navigate(R.id.timeTravelersShopFragment)
}
dialog.addButton(R.string.reward_dialog_dismiss, false)
dialog.show()

Some files were not shown because too many files have changed in this diff Show more