mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
Fix minor bugs
This commit is contained in:
parent
d86704c080
commit
499fca1d34
42 changed files with 232 additions and 188 deletions
|
|
@ -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 2552
|
||||
versionCode 2554
|
||||
versionName "3.0"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/red_100" />
|
||||
<solid android:color="@color/background_red" />
|
||||
<corners android:radius="@dimen/rounded_button_radius"/>
|
||||
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
|
||||
</shape>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/healthEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/experienceEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/manaEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/goldEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberDecimal"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/levelEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -266,13 +266,13 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:background="@color/transparent"
|
||||
android:hint="@string/streak_label"
|
||||
android:paddingStart="16dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/streakEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:background="@android:color/transparent"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,38 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:id="@+id/blocked_disclaimer_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/FlatCardView"
|
||||
android:background="@drawable/layout_rounded_bg_red"
|
||||
android:visibility="gone">
|
||||
<LinearLayout
|
||||
style="@style/CardContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardTitle"
|
||||
android:text="@string/user_is_blocked"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="center" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardText"
|
||||
android:text="@string/user_is_blocked_explanation"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
style="@style/FlatCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -119,7 +150,7 @@
|
|||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
|
|
@ -134,6 +165,7 @@
|
|||
android:text="@string/profile_send_message"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:textAllCaps="false"
|
||||
android:drawableTint="?colorPrimary"
|
||||
android:textSize="13sp"
|
||||
android:drawableTop="@drawable/icon_messages"/>
|
||||
<Button
|
||||
|
|
@ -143,6 +175,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/profile_gift_gems"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:drawableTint="?colorPrimary"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="13sp"
|
||||
android:drawableTop="@drawable/icon_gift_gems"/>
|
||||
|
|
@ -153,6 +186,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/profile_gift_subscription"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:drawableTint="?colorPrimary"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="13sp"
|
||||
android:drawableTop="@drawable/icon_gift_subscription"/>
|
||||
|
|
@ -160,10 +194,9 @@
|
|||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/CardContent"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -186,7 +219,7 @@
|
|||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/costume_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
|
@ -213,7 +246,7 @@
|
|||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/attributes_card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -283,7 +316,7 @@
|
|||
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
|
@ -352,7 +385,7 @@
|
|||
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/profile_achievements_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
|
|
|||
|
|
@ -13,68 +13,68 @@
|
|||
android:layout_marginBottom="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.AvatarView
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="@dimen/avatar_header_width"
|
||||
android:layout_height="@dimen/avatar_header_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:contentDescription="@string/sidebar_avatar"
|
||||
app:showBackground="true"
|
||||
app:showMount="true"
|
||||
app:showPet="true"/>
|
||||
android:id="@+id/avatarView"
|
||||
android:layout_width="@dimen/avatar_header_width"
|
||||
android:layout_height="@dimen/avatar_header_height"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:contentDescription="@string/sidebar_avatar"
|
||||
app:showBackground="true"
|
||||
app:showMount="true"
|
||||
app:showPet="true"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.ValueBar
|
||||
android:id="@+id/hpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginBottom="@dimen/header_bar_spacing"
|
||||
app:barForegroundColor="@color/background_red"
|
||||
app:barBackgroundColor="@color/window_background"
|
||||
app:description="@string/HP_default"/>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.ValueBar
|
||||
android:id="@+id/hpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/header_bar_spacing"
|
||||
app:barForegroundColor="@color/hpColor"
|
||||
android:id="@+id/xpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/header_bar_spacing"
|
||||
app:barForegroundColor="@color/background_yellow"
|
||||
app:barBackgroundColor="@color/window_background"
|
||||
app:description="@string/HP_default"/>
|
||||
app:description="@string/XP_default"/>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.ValueBar
|
||||
android:id="@+id/xpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/header_bar_spacing"
|
||||
app:barForegroundColor="@color/xpColor"
|
||||
android:id="@+id/mpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:barForegroundColor="@color/background_blue"
|
||||
app:barBackgroundColor="@color/window_background"
|
||||
app:description="@string/XP_default"/>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.ValueBar
|
||||
android:id="@+id/mpBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:barForegroundColor="@color/mpColor"
|
||||
app:barBackgroundColor="@color/window_background"
|
||||
app:description="@string/MP_default"/>
|
||||
app:description="@string/MP_default"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lvl_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
tools:text="Lvl 12 Warrior"/>
|
||||
android:id="@+id/lvl_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
tools:text="Lvl 12 Warrior"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/buffImageView"
|
||||
|
|
@ -85,13 +85,13 @@
|
|||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.CurrencyViews
|
||||
android:id="@+id/currencyView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:id="@+id/currencyView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -21,8 +21,7 @@
|
|||
android:layout_gravity="center" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/task_tint_overlay"/>
|
||||
android:layout_height="match_parent"/>
|
||||
<ImageView
|
||||
android:id="@+id/checkmark"
|
||||
android:layout_width="20dp"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/card_view"
|
||||
style="@style/FlatCardView"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent">
|
||||
<RelativeLayout
|
||||
|
|
@ -32,4 +33,4 @@
|
|||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
|
|
@ -40,10 +40,6 @@
|
|||
android:gravity="center"
|
||||
android:background="@drawable/daily_checked"
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/owned"
|
||||
android:textColor="@color/textColorLight"
|
||||
android:textColor="@color/text_primary"
|
||||
android:paddingStart="8dp" />
|
||||
|
||||
<CheckBox
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/not_owned"
|
||||
android:textColor="@color/textColorLight"
|
||||
android:textColor="@color/text_primary"
|
||||
android:paddingStart="8dp"/>
|
||||
</LinearLayout>
|
||||
</com.habitrpg.android.habitica.ui.MaxHeightLinearLayout>
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
@ -28,8 +26,6 @@
|
|||
android:id="@+id/passwordEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
|
|||
|
|
@ -22,16 +22,11 @@
|
|||
android:layout_height="match_parent"
|
||||
tools:background="@color/red_10">
|
||||
<View
|
||||
android:id="@+id/checkBoxBackground"
|
||||
android:id="@+id/checkbox_background"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/daily_checked"
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@
|
|||
style="@style/SectionTitle"
|
||||
android:text="@string/my_guilds"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
<androidx.cardview.widget.CardView
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default">
|
||||
style="@style/FlatCardView">
|
||||
<LinearLayout
|
||||
android:id="@+id/my_guilds_listview"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
tools:layout_height="50dp"
|
||||
android:showDividers="middle">
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
<Button
|
||||
android:id="@+id/publicGuildsButton"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
android:orientation="vertical"
|
||||
android:paddingBottom="?android:actionBarSize">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/invitationWrapper">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.social.InvitationsView
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardContent" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noPartyWrapper"
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<androidx.cardview.widget.CardView
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/party_invitation_wrapper">
|
||||
|
||||
<com.habitrpg.android.habitica.ui.views.social.InvitationsView
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardContent" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_view"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<RelativeLayout
|
||||
android:id="@+id/promo_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="103dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
android:id="@+id/promo_banner_duration_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Subheader2"/>
|
||||
style="@style/Subheader1"/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -75,14 +75,15 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:id="@+id/subscriptionDetails"/>
|
||||
|
||||
<TextView
|
||||
<com.habitrpg.android.habitica.ui.views.DayNightTextView
|
||||
android:id="@+id/subscribeBenefitsTitle"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/subscribe_prompt"
|
||||
android:gravity="center"
|
||||
style="@style/Subheader1"
|
||||
android:textColor="@color/text_brand"
|
||||
app:dayTextColor="@color/text_brand"
|
||||
app:nightTextColor="@color/gray_400"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/habit_plus"
|
||||
android:background="@color/task_tint_overlay" />
|
||||
android:src="@drawable/habit_plus" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnPlus"
|
||||
|
|
@ -75,8 +74,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/habit_minus"
|
||||
android:background="@color/task_tint_overlay" />
|
||||
android:src="@drawable/habit_minus"/>
|
||||
<Button
|
||||
android:id="@+id/btnMinus"
|
||||
style="@style/HabitButton"
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@
|
|||
android:layout_gravity="center" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/task_tint_overlay"/>
|
||||
android:layout_height="match_parent"/>
|
||||
<ImageView
|
||||
android:id="@+id/checkmark"
|
||||
android:layout_width="24dp"
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/CardView.Default"
|
||||
style="@style/FlatCardView"
|
||||
android:id="@+id/party_invitation_wrapper">
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
|
|
@ -67,5 +67,5 @@
|
|||
android:background="@drawable/party_invite_reject" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -858,7 +858,7 @@
|
|||
<string name="sent_card">%sを送りました</string>
|
||||
<string name="share_challenge_with">チャレンジをシェアする</string>
|
||||
<string name="details">詳細</string>
|
||||
<string name="create_task">%sを作成する</string>
|
||||
<string name="create_task">%s を作成する</string>
|
||||
<string name="confirm_deletion">削除を承認する</string>
|
||||
<string name="take_me_back">戻る</string>
|
||||
<string name="setup_task_habit_2_notes">または編集画面から削除しましょう</string>
|
||||
|
|
|
|||
|
|
@ -31,12 +31,12 @@
|
|||
<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_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_200</color>
|
||||
|
||||
<color name="checkbox_fill">#40000000</color>
|
||||
|
|
@ -44,7 +44,6 @@
|
|||
<color name="checkbox_fill_selected">#40ffffff</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>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@
|
|||
<color name="colorPrimaryDark">@color/brand_50</color>
|
||||
<!-- text -->
|
||||
<color name="textColorSecondaryDark">@color/brand_500</color>
|
||||
<color name="textColorLight">#212121</color>
|
||||
|
||||
<!-- Cards -->
|
||||
<color name="text_light">#66000000</color>
|
||||
|
|
@ -184,19 +183,18 @@
|
|||
<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_red">@color/red_100</color>
|
||||
<color name="background_orange">@color/orange_100</color>
|
||||
<color name="background_yellow">@color/yellow_100</color>
|
||||
<color name="background_green">@color/green_100</color>
|
||||
<color name="background_blue">@color/blue_100</color>
|
||||
<color name="background_teal">@color/teal_100</color>
|
||||
<color name="background_brand">@color/brand_300</color>
|
||||
|
||||
<color name="checkbox_fill">#50ffffff</color>
|
||||
<color name="checkbox_fill_inactive">#99FFFFFF</color>
|
||||
<color name="checkbox_fill_selected">@color/gray_600</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>
|
||||
|
|
|
|||
|
|
@ -1107,4 +1107,6 @@
|
|||
<string name="theme_mode">Theme Mode</string>
|
||||
<string name="theme_color">Theme Color</string>
|
||||
<string name="submit_feedback">Submit Feedback</string>
|
||||
<string name="user_is_blocked">You blocked this user</string>
|
||||
<string name="user_is_blocked_explanation">A blocked user cannot send you Private Messages but you will still see their posts in Tavern or Guilds.</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
<item name="textColorPrimaryDark">@color/brand_600</item>
|
||||
<item name="textColorSecondaryDark">@color/brand_500</item>
|
||||
<item name="android:textColorPrimary">@color/text_primary</item>
|
||||
<item name="android:textColorSecondary">@color/text_ternary</item>
|
||||
<item name="barColor">@color/brand_200</item>
|
||||
<item name="android:textColorSecondary">@color/text_ternary</item>te
|
||||
<item name="barColor">@color/brand_300</item>
|
||||
|
||||
<item name="colorContentBackground">@color/content_background</item>
|
||||
<item name="colorWindowBackground">@color/window_background</item>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
<item name="colorPrimary">@color/gray_500</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/brand_500</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
||||
<style name="MainAppTheme.Red">
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Red.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Maroon.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Orange.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Yellow.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -186,7 +186,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Green.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Teal.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -236,7 +236,7 @@
|
|||
</style>
|
||||
|
||||
<style name="MainAppTheme.Blue.Dark">
|
||||
<item name="barColor">@color/gray_10</item>
|
||||
<item name="barColor">@color/gray_1</item>
|
||||
<item name="colorPrimaryOffset">@color/gray_10</item>
|
||||
<item name="textColorPrimaryDark">@color/gray_200</item>
|
||||
</style>
|
||||
|
|
@ -280,11 +280,6 @@
|
|||
<item name="android:padding">@dimen/card_padding_compact</item>
|
||||
</style>
|
||||
|
||||
<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">
|
||||
<item name="android:padding">@dimen/row_padding</item>
|
||||
<item name="android:background">@drawable/selection_highlight</item>
|
||||
|
|
@ -750,7 +745,7 @@
|
|||
|
||||
<style name="TextInputLayoutAppearance" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
|
||||
<item name="boxBackgroundColor">@color/taskform_gray</item>
|
||||
<item name="android:textColor">@color/textColorLight</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textColorHint">@color/text_quad</item>
|
||||
</style>
|
||||
|
||||
|
|
@ -802,4 +797,9 @@
|
|||
<style name="PreferenceThemeOverlay.v14" tools:override="true">
|
||||
<item name="android:background">@color/content_background</item>
|
||||
</style>
|
||||
|
||||
<style name="FlatCardView">
|
||||
<item name="android:background">@drawable/layout_rounded_bg_window</item>
|
||||
<item name="android:layout_margin">@dimen/spacing_medium</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -6,9 +6,7 @@ import android.view.Window
|
|||
|
||||
fun Window.updateStatusBarColor(color: Int, isLight: Boolean) {
|
||||
statusBarColor = color
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
isStatusBarContrastEnforced = true
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
@Suppress("DEPRECATION")
|
||||
decorView.systemUiVisibility = if (isLight) View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR else View.SYSTEM_UI_FLAG_VISIBLE
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ open class ShopItem : RealmObject() {
|
|||
get() = "eggs" == purchaseType || "hatchingPotions" == purchaseType || "food" == purchaseType || "gems" == purchaseType
|
||||
|
||||
fun canAfford(user: User?, quantity: Int): Boolean = when(currency) {
|
||||
"gold" -> (value * quantity) <= user?.stats?.gp ?: 0.0
|
||||
"gold" -> (value * quantity) <= (user?.stats?.gp ?: 0.0)
|
||||
else -> true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import com.habitrpg.android.habitica.data.SocialRepository
|
|||
import com.habitrpg.android.habitica.data.UserRepository
|
||||
import com.habitrpg.android.habitica.databinding.ActivityFullProfileBinding
|
||||
import com.habitrpg.android.habitica.extensions.addCancelButton
|
||||
import com.habitrpg.android.habitica.extensions.getThemeColor
|
||||
import com.habitrpg.android.habitica.helpers.MainNavigationController
|
||||
import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
||||
import com.habitrpg.android.habitica.helpers.UserStatComputer
|
||||
|
|
@ -91,6 +92,9 @@ class FullProfileActivity : BaseActivity() {
|
|||
avatarWithBars = AvatarWithBarsViewModel(this, binding.avatarWithBars)
|
||||
|
||||
binding.avatarWithBars.root.setBackgroundColor(ContextCompat.getColor(this, R.color.transparent))
|
||||
binding.avatarWithBars.hpBar.barBackgroundColor = getThemeColor(R.color.content_background)
|
||||
binding.avatarWithBars.xpBar.barBackgroundColor = getThemeColor(R.color.content_background)
|
||||
binding.avatarWithBars.mpBar.barBackgroundColor = getThemeColor(R.color.content_background)
|
||||
|
||||
attributeRows.clear()
|
||||
binding.attributesCardView.setOnClickListener { toggleAttributeDetails() }
|
||||
|
|
@ -100,6 +104,7 @@ class FullProfileActivity : BaseActivity() {
|
|||
binding.giftSubscriptionButton.setOnClickListener { MainNavigationController.navigate(R.id.giftSubscriptionActivity, bundleOf(Pair("userID", userID), Pair("username", null))) }
|
||||
compositeSubscription.add(userRepository.getUser().subscribe({
|
||||
blocks = it.inbox?.blocks ?: listOf()
|
||||
binding.blockedDisclaimerView.visibility = if (isUserBlocked()) View.VISIBLE else View.GONE
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +117,7 @@ class FullProfileActivity : BaseActivity() {
|
|||
val inflater = menuInflater
|
||||
inflater.inflate(R.menu.menu_full_profile, menu)
|
||||
val item = menu?.findItem(R.id.block_user)
|
||||
if (blocks.contains(userID)) {
|
||||
if (isUserBlocked()) {
|
||||
item?.title = getString(R.string.unblock_user)
|
||||
} else {
|
||||
item?.title = getString(R.string.block)
|
||||
|
|
@ -121,6 +126,10 @@ class FullProfileActivity : BaseActivity() {
|
|||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
private fun isUserBlocked(): Boolean {
|
||||
return blocks.contains(userID)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
android.R.id.home -> {
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ import io.reactivex.schedulers.Schedulers
|
|||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
||||
|
|
@ -261,11 +262,13 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
}
|
||||
|
||||
private fun updateToolbarTitle(destination: NavDestination, arguments: Bundle?) {
|
||||
binding.toolbarTitle.text = if (destination.id == R.id.petDetailRecyclerFragment || destination.id == R.id.mountDetailRecyclerFragment) {
|
||||
binding.toolbarTitle.text = if (destination.id == R.id.promoInfoFragment) {
|
||||
""
|
||||
} else if (destination.id == R.id.petDetailRecyclerFragment || destination.id == R.id.mountDetailRecyclerFragment) {
|
||||
arguments?.getString("type")
|
||||
} else if (destination.label.isNullOrEmpty() && user?.isValid == true) {
|
||||
user?.profile?.name
|
||||
} else if (user?.isValid == true && user?.profile != null) {
|
||||
} else if (destination.label != null) {
|
||||
destination.label
|
||||
} else {
|
||||
""
|
||||
|
|
@ -360,6 +363,9 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
|
||||
launchTrace?.stop()
|
||||
launchTrace = null
|
||||
|
||||
val navigationController = findNavController(R.id.nav_host_fragment)
|
||||
navigationController.currentDestination?.let { updateToolbarTitle(it, null) }
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
|||
|
|
@ -28,17 +28,17 @@ class HabiticaClassArrayAdapter(context: Context, resource: Int, objects: List<C
|
|||
when (getItem(position)) {
|
||||
Stats.WARRIOR -> {
|
||||
textView?.text = context.getString(R.string.warrior)
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.red_10))
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.text_red))
|
||||
imageView?.setImageBitmap(HabiticaIconsHelper.imageOfWarriorLightBg())
|
||||
}
|
||||
Stats.MAGE -> {
|
||||
textView?.text = context.getString(R.string.mage)
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.blue_10))
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.text_blue))
|
||||
imageView?.setImageBitmap(HabiticaIconsHelper.imageOfMageLightBg())
|
||||
}
|
||||
Stats.HEALER -> {
|
||||
textView?.text = context.getString(R.string.healer)
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.yellow_10))
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.text_yellow))
|
||||
imageView?.setImageBitmap(HabiticaIconsHelper.imageOfHealerLightBg())
|
||||
}
|
||||
Stats.ROGUE -> {
|
||||
|
|
@ -48,7 +48,7 @@ class HabiticaClassArrayAdapter(context: Context, resource: Int, objects: List<C
|
|||
}
|
||||
else -> {
|
||||
textView?.text = context.getString(R.string.classless)
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.textColorLight))
|
||||
textView?.setTextColor(ContextCompat.getColor(context, R.color.text_primary))
|
||||
imageView?.setImageBitmap(null)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package com.habitrpg.android.habitica.ui.adapter.social
|
||||
|
||||
import android.view.ViewGroup
|
||||
import androidx.paging.DataSource
|
||||
import androidx.paging.PagedList
|
||||
import androidx.paging.PagedListAdapter
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import com.habitrpg.android.habitica.R
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@ class PromoInfoFragment : BaseMainFragment<FragmentPromoInfoBinding>() {
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
val promo = context?.let { configManager.activePromo(it) }
|
||||
promo?.configureInfoFragment(this)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity?.title = ""
|
||||
}
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ class DayStartPreferenceDialogFragment : PreferenceDialogFragmentCompat() {
|
|||
picker = TimePicker(context)
|
||||
descriptionTextView = TextView(context)
|
||||
@Suppress("DEPRECATION")
|
||||
descriptionTextView?.setTextColor(resources.getColor(R.color.textColorLight))
|
||||
descriptionTextView?.setTextColor(resources.getColor(R.color.text_primary))
|
||||
val padding = resources.getDimension(R.dimen.card_padding).toInt()
|
||||
descriptionTextView?.setPadding(padding, padding, padding, padding)
|
||||
val lp = LinearLayout.LayoutParams(
|
||||
|
|
|
|||
|
|
@ -73,22 +73,21 @@ class InboxMessageListFragment : BaseMainFragment<FragmentInboxMessageListBindin
|
|||
|
||||
val layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this.getActivity())
|
||||
binding?.recyclerView?.layoutManager = layoutManager
|
||||
compositeSubscription.add(apiClient.getMember(replyToUserUUID!!).subscribe( Consumer
|
||||
{ member ->
|
||||
compositeSubscription.add(apiClient.getMember(replyToUserUUID!!).subscribe( { member ->
|
||||
chatAdapter = InboxAdapter(user, member)
|
||||
viewModel?.messages?.observe(this.viewLifecycleOwner, Observer { chatAdapter?.submitList(it) })
|
||||
viewModel?.messages?.observe(this.viewLifecycleOwner, { chatAdapter?.submitList(it) })
|
||||
|
||||
binding?.recyclerView?.adapter = chatAdapter
|
||||
binding?.recyclerView?.itemAnimator = SafeDefaultItemAnimator()
|
||||
binding?.recyclerView?.adapter = chatAdapter
|
||||
binding?.recyclerView?.itemAnimator = SafeDefaultItemAnimator()
|
||||
chatAdapter?.let { adapter ->
|
||||
compositeSubscription.add(adapter.getUserLabelClickFlowable().subscribe(Consumer<String> {
|
||||
compositeSubscription.add(adapter.getUserLabelClickFlowable().subscribe({
|
||||
FullProfileActivity.open(it)
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getDeleteMessageFlowable().subscribe(Consumer { this.showDeleteConfirmationDialog(it) }, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getFlagMessageClickFlowable().subscribe(Consumer { this.showFlagConfirmationDialog(it) }, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getCopyMessageFlowable().subscribe(Consumer { this.copyMessageToClipboard(it) }, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getDeleteMessageFlowable().subscribe({ this.showDeleteConfirmationDialog(it) }, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getFlagMessageClickFlowable().subscribe({ this.showFlagConfirmationDialog(it) }, RxErrorHandler.handleEmptyError()))
|
||||
compositeSubscription.add(adapter.getCopyMessageFlowable().subscribe({ this.copyMessageToClipboard(it) }, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
}))
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
|
||||
binding?.chatBarView?.sendAction = { sendMessage(it) }
|
||||
binding?.chatBarView?.maxChatLength = configManager.maxChatLength()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import androidx.core.content.ContextCompat
|
|||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.databinding.ChatItemBinding
|
||||
import com.habitrpg.android.habitica.databinding.TavernChatIntroItemBinding
|
||||
import com.habitrpg.android.habitica.extensions.dpToPx
|
||||
import com.habitrpg.android.habitica.extensions.getAgoString
|
||||
import com.habitrpg.android.habitica.extensions.setScaledPadding
|
||||
|
|
@ -23,7 +24,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
|||
import io.reactivex.schedulers.Schedulers
|
||||
import com.habitrpg.android.habitica.models.members.Member
|
||||
|
||||
open class ChatRecyclerViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {}
|
||||
open class ChatRecyclerViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
|
||||
|
||||
class ChatRecyclerIntroViewHolder(itemView: View, replyToUUID: String) : ChatRecyclerViewHolder(itemView) {
|
||||
private val binding = TavernChatIntroItemBinding.bind(itemView)
|
||||
|
|
@ -40,7 +41,7 @@ class ChatRecyclerIntroViewHolder(itemView: View, replyToUUID: String) : ChatRec
|
|||
binding.avatarView.setAvatar(member)
|
||||
binding.displayNameTextview.username = member.displayName
|
||||
binding.displayNameTextview.tier = member.contributor?.level ?: 0
|
||||
binding.sublineTextview.text = "@" + member.username
|
||||
binding.sublineTextview.text = member.formattedUsername
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class HabitViewHolder(itemView: View, scoreTaskFunc: ((Task, TaskDirection) -> U
|
|||
btnPlusCircleView.background = drawable
|
||||
this.btnPlus.visibility = View.VISIBLE
|
||||
this.btnPlus.isClickable = true
|
||||
//btnPlusIconView.background.alpha = 255
|
||||
} else {
|
||||
this.btnPlusWrapper.setBackgroundResource(R.color.habit_inactive_gray)
|
||||
val plusIcon = ContextCompat.getDrawable(context, R.drawable.habit_plus)
|
||||
|
|
@ -50,7 +49,6 @@ class HabitViewHolder(itemView: View, scoreTaskFunc: ((Task, TaskDirection) -> U
|
|||
btnPlusCircleView.background = ContextCompat.getDrawable(context, R.drawable.habit_circle_disabled)
|
||||
this.btnPlus.visibility = View.GONE
|
||||
this.btnPlus.isClickable = false
|
||||
btnPlusIconView.background.alpha = 0
|
||||
}
|
||||
|
||||
if (data.down == true) {
|
||||
|
|
@ -66,7 +64,6 @@ class HabitViewHolder(itemView: View, scoreTaskFunc: ((Task, TaskDirection) -> U
|
|||
btnMinusCircleView.background = drawable
|
||||
this.btnMinus.visibility = View.VISIBLE
|
||||
this.btnMinus.isClickable = true
|
||||
//btnMinusIconView.background.alpha = 255
|
||||
} else {
|
||||
this.btnMinusWrapper.setBackgroundResource(R.color.habit_inactive_gray)
|
||||
val minusIcon = ContextCompat.getDrawable(context, R.drawable.habit_minus)
|
||||
|
|
@ -76,7 +73,6 @@ class HabitViewHolder(itemView: View, scoreTaskFunc: ((Task, TaskDirection) -> U
|
|||
btnMinusCircleView.background = ContextCompat.getDrawable(context, R.drawable.habit_circle_disabled)
|
||||
this.btnMinus.visibility = View.GONE
|
||||
this.btnMinus.isClickable = false
|
||||
btnMinusIconView.background.alpha = 0
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -97,13 +97,10 @@ private class MessagesDataSource(val socialRepository: SocialRepository, var rec
|
|||
if (recipientID?.isNotBlank() != true) { return@launch }
|
||||
val page = ceil(params.startPosition.toFloat() / params.loadSize.toFloat()).toInt()
|
||||
socialRepository.retrieveInboxMessages(recipientID ?: "", page)
|
||||
.subscribe(Consumer {
|
||||
.subscribe( {
|
||||
if (it.size < 10) {
|
||||
lastFetchWasEnd = true
|
||||
if (footer != null)
|
||||
callback.onResult(it.plusElement(footer!!))
|
||||
else
|
||||
callback.onResult(it)
|
||||
callback.onResult(it)
|
||||
}
|
||||
else
|
||||
callback.onResult(it)
|
||||
|
|
@ -130,7 +127,7 @@ private class MessagesDataSource(val socialRepository: SocialRepository, var rec
|
|||
Flowable.just(it)
|
||||
}
|
||||
}
|
||||
.subscribe(Consumer {
|
||||
.subscribe( {
|
||||
if (it.size < 10 && footer != null)
|
||||
callback.onResult(it.plusElement(footer!!), 0)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.habitrpg.android.habitica.extensions.dpToPx
|
|||
import com.habitrpg.android.habitica.extensions.getThemeColor
|
||||
import com.habitrpg.android.habitica.extensions.isUsingNightModeResources
|
||||
import com.habitrpg.android.habitica.extensions.layoutInflater
|
||||
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
|
||||
import java.math.RoundingMode
|
||||
import java.text.NumberFormat
|
||||
|
||||
|
|
@ -31,6 +32,24 @@ class ValueBar(context: Context, attrs: AttributeSet?) : FrameLayout(context, at
|
|||
private var currentValue: Double = 0.0
|
||||
private var maxValue: Double = 0.0
|
||||
|
||||
var barForegroundColor: Int
|
||||
get() = binding.progressBar.barForegroundColor
|
||||
set(value) {
|
||||
binding.progressBar.barForegroundColor = value
|
||||
}
|
||||
|
||||
var barPendingColor: Int
|
||||
get() = binding.progressBar.barPendingColor
|
||||
set(value) {
|
||||
binding.progressBar.barPendingColor = value
|
||||
}
|
||||
|
||||
var barBackgroundColor: Int
|
||||
get() = binding.progressBar.barBackgroundColor
|
||||
set(value) {
|
||||
binding.progressBar.barBackgroundColor = value
|
||||
}
|
||||
|
||||
var pendingValue: Double = 0.0
|
||||
set(value) {
|
||||
if (field != value) {
|
||||
|
|
|
|||
|
|
@ -73,14 +73,6 @@ class TaskFilterDialog(context: Context, component: UserComponent?) : HabiticaAl
|
|||
|
||||
taskFilters.setOnCheckedChangeListener(this)
|
||||
|
||||
this.setButton(BUTTON_POSITIVE, context.getString(R.string.done)) { _, _ ->
|
||||
if (isEditing) {
|
||||
stopEditing()
|
||||
}
|
||||
listener?.onFilterCompleted(filterType, activeTags)
|
||||
this.dismiss()
|
||||
}
|
||||
|
||||
clearButton = addButton(R.string.clear, false, false, false) { _, _ ->
|
||||
if (isEditing) {
|
||||
stopEditing()
|
||||
|
|
@ -89,7 +81,13 @@ class TaskFilterDialog(context: Context, component: UserComponent?) : HabiticaAl
|
|||
setActiveTags(null)
|
||||
}
|
||||
|
||||
addButton(R.string.done, false)
|
||||
addButton(R.string.done, false) { _, _ ->
|
||||
if (isEditing) {
|
||||
stopEditing()
|
||||
}
|
||||
listener?.onFilterCompleted(filterType, activeTags)
|
||||
this.dismiss()
|
||||
}
|
||||
buttonAxis = LinearLayout.HORIZONTAL
|
||||
|
||||
tagsEditButton.setOnClickListener { editButtonClicked() }
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class TaskDifficultyButtons @JvmOverloads constructor(
|
|||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
removeAllViews()
|
||||
addAllButtons()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,11 +118,14 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
|
|||
val completed = !task.isDisplayedActive
|
||||
val checkmark = taskView.findViewById<View>(R.id.checkmark)
|
||||
val checkboxHolder = taskView.findViewById<View>(R.id.checkBoxHolder)
|
||||
var checkboxBackground = taskView.findViewById<View>(R.id.checkbox_background)
|
||||
checkmark?.visibility = if (completed) View.VISIBLE else View.GONE
|
||||
if (completed) {
|
||||
checkboxHolder.setBackgroundResource(R.color.window_background)
|
||||
checkboxBackground.setBackgroundResource(R.drawable.daily_checked)
|
||||
} else {
|
||||
checkboxHolder.setBackgroundResource(task.lightTaskColor)
|
||||
checkboxBackground.setBackgroundResource(R.drawable.daily_unchecked)
|
||||
}
|
||||
|
||||
val emojiView = taskView.findViewById<View>(R.id.text_view) as? HabiticaEmojiTextView
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"properties": [],
|
||||
"versionCode": 2551,
|
||||
"versionCode": 2554,
|
||||
"versionName": "3.0",
|
||||
"enabled": true,
|
||||
"outputFile": "Habitica-staff-release.apk"
|
||||
|
|
|
|||
Loading…
Reference in a new issue