Merge branch 'develop' into patch-1

This commit is contained in:
Phillip Thelen 2020-08-04 17:37:00 +02:00 committed by GitHub
commit 5a7be388a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
141 changed files with 1800 additions and 773 deletions

View file

@ -104,7 +104,7 @@ dependencies {
}
//Tests
testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.0.0'
testImplementation 'androidx.test:core:1.2.0'
testImplementation "com.google.truth:truth:1.0.1"
testImplementation 'org.assertj:assertj-core:2.6.0'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
@ -119,11 +119,11 @@ dependencies {
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
//Push Notifications
implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-config:19.1.1'
implementation 'com.google.firebase:firebase-perf:19.0.5'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.google.firebase:firebase-messaging:20.2.3'
implementation 'com.google.firebase:firebase-config:19.2.0'
implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'io.realm:android-adapters:3.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'
@ -132,8 +132,8 @@ dependencies {
implementation 'androidx.core:core-ktx:1.3.0'
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
implementation "androidx.paging:paging-runtime-ktx:2.1.2"
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
@ -162,8 +162,8 @@ 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 2462
versionName "2.7"
versionCode 2500
versionName "2.8"
}
viewBinding {

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:color="?attr/colorPrimary" android:state_focused="true"/>
<item android:alpha="0.87" android:color="?attr/colorPrimary" android:state_hovered="true"/>
<item android:alpha="0.12" android:color="?attr/colorPrimary" android:state_enabled="false"/>
<item android:alpha="0.38" android:color="?attr/colorPrimary"/>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

View file

@ -3,5 +3,5 @@
<solid android:color="@color/gray_700" />
<corners android:radius="@dimen/rounded_button_radius"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
<stroke android:color="@color/brand_300" android:width="2dp" />
<stroke android:color="@color/brand_400" android:width="2dp" />
</shape>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#801A181D" />
<corners android:radius="@dimen/bar_radius"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>

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="@color/pill_gray"/>
<solid android:color="@color/gray_700"/>
<corners android:radius="20dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>

View file

@ -89,7 +89,6 @@
android:layout_marginBottom="@dimen/spacing_medium"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:progressBackgroundTint="@color/gray_600"
android:progressBackgroundTintMode="src_over"
android:progressTint="@color/yellow_50"/>
<LinearLayout

View file

@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:titleEnabled="false"
app:contentScrim="?attr/colorPrimary"
app:contentScrim="?attr/colorPrimaryDark"
app:expandedTitleMarginEnd="?attr/actionBarSize"
app:expandedTitleMarginStart="0dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
@ -51,6 +51,7 @@
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar"
android:background="?attr/colorPrimaryDark"
app:layout_collapseMode="pin"
app:popupTheme="@style/Theme.AppCompat.Light">
<RelativeLayout
@ -87,7 +88,7 @@
android:layout_width="match_parent"
android:layout_height="54dp"
android:layout_gravity="bottom"
android:background="?colorPrimaryOffset"
android:background="?colorPrimary"
android:elevation="0dp"
android:fillViewport="false"

View file

@ -17,7 +17,6 @@
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Toolbar"
android:background="@color/brand_300"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
@ -43,20 +42,29 @@
android:paddingEnd="@dimen/spacing_large"
android:paddingBottom="@dimen/spacing_large">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TaskFormTextInputLayoutAppearance">
style="@style/TaskFormTextInputLayoutAppearance"
app:boxStrokeColor="?attr/colorPrimary"
android:backgroundTint="?attr/colorPrimary"
android:alpha="0.75">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/text_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/task_title"
android:textColor="?attr/colorPrimaryText"
android:inputType="textCapSentences|textAutoCorrect"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/notes_input_layout"
style="@style/TaskFormTextInputLayoutAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
app:boxStrokeColor="?attr/colorPrimary"
android:backgroundTint="?attr/colorPrimary"
android:alpha="0.75">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/notes_edit_text"
android:layout_width="match_parent"
@ -64,8 +72,19 @@
android:hint="@string/notes"
android:minLines="3"
android:gravity="top"
android:textColor="?attr/colorPrimaryText"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"/>
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/challenge_name_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
style="@style/Caption1"
android:gravity="center"
android:textColor="@color/gray_10"
tools:visibility="visible"
tools:text="Challenge Name"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"

View file

@ -6,7 +6,7 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:background="?colorPrimary"
android:background="?colorPrimaryDark"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
@ -24,8 +24,8 @@
android:layout_width="@dimen/avatar_header_width"
android:layout_height="@dimen/avatar_header_height"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="2dp"
android:contentDescription="@string/sidebar_avatar"
app:showBackground="true"
app:showMount="true"

View file

@ -3,18 +3,29 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="65dp"
android:paddingTop="16dp"
android:gravity="bottom"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp">
android:layout_height="55dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:gravity="bottom">
<TextView
android:id="@+id/label"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium"/>
tools:text="Test header"
style="@style/Overline"
android:textColor="@color/gray_200"/>
<TextView
android:id="@+id/count_pill"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:visibility="gone"
style="@style/Pill"
android:textSize="10sp"
android:textAllCaps="true"
android:letterSpacing="0.15"
android:gravity="center"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="40dp"

View file

@ -0,0 +1,103 @@
<?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"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="@dimen/spacing_small"
android:layout_marginBottom="@dimen/spacing_large">
<RelativeLayout
android:layout_width="60dp"
android:layout_height="80dp">
<FrameLayout
android:id="@+id/egg_frame_view"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/layout_rounded_bg_gray_700"
android:layout_centerVertical="true"
android:layout_alignParentStart="true">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/egg_view"
android:layout_width="@dimen/gear_image_size"
android:layout_height="@dimen/gear_image_size"
android:layout_gravity="center"/>
</FrameLayout>
<TextView
android:id="@+id/egg_count_view"
android:layout_width="24dp"
android:layout_height="24dp"
style="@style/Pill"
android:padding="0dp"
android:gravity="center"
tools:text="12"
android:layout_alignEnd="@id/egg_frame_view"
android:layout_alignTop="@id/egg_frame_view"
android:layout_marginEnd="-8dp"
android:layout_marginTop="-8dp"/>
</RelativeLayout>
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:background="@drawable/layout_rounded_bg_gray_700"
android:layout_marginEnd="13dp"
android:layout_marginStart="@dimen/spacing_small">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/pet_view"
android:layout_width="@dimen/gear_image_size"
android:layout_height="@dimen/gear_image_size"
android:alpha="0.1"
android:layout_gravity="center" />
</FrameLayout>
<RelativeLayout
android:layout_width="60dp"
android:layout_height="80dp">
<FrameLayout
android:id="@+id/potion_frame_view"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/layout_rounded_bg_gray_700"
android:layout_centerVertical="true"
android:layout_alignParentStart="true">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/hatchingPotion_view"
android:layout_width="@dimen/gear_image_size"
android:layout_height="@dimen/gear_image_size"
android:layout_gravity="center"/>
</FrameLayout>
<TextView
android:id="@+id/potion_count_view"
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="0dp"
android:gravity="center"
style="@style/Pill"
tools:text="12"
android:layout_alignEnd="@id/potion_frame_view"
android:layout_alignTop="@id/potion_frame_view"
android:layout_marginEnd="-8dp"
android:layout_marginTop="-8dp" />
</RelativeLayout>
</LinearLayout>
<TextView
android:id="@+id/pet_title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Subheader2"
android:textColor="@color/gray_100"
android:gravity="center_horizontal"
android:layout_marginBottom="@dimen/spacing_medium"/>
<TextView
android:id="@+id/description_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Body2"
android:textColor="@color/gray_200"
android:gravity="center_horizontal"
android:layout_marginBottom="@dimen/spacing_medium"/>
</LinearLayout>

View file

@ -68,7 +68,8 @@
android:background="@color/transparent"
android:src="@drawable/menu_notifications"
android:layout_centerVertical="true"
android:clickable="false" />
android:clickable="false"
android:contentDescription="@string/notifications" />
<TextView
android:id="@+id/notificationsBadge"
@ -100,7 +101,8 @@
android:background="@color/transparent"
android:src="@drawable/menu_messages"
android:layout_centerVertical="true"
android:clickable="false" />
android:clickable="false"
android:contentDescription="@string/inbox" />
<TextView
android:id="@+id/messagesBadge"
@ -131,8 +133,8 @@
android:layout_height="wrap_content"
android:background="@color/transparent"
android:src="@drawable/menu_settings"
android:layout_centerVertical="true"/>
android:layout_centerVertical="true"
android:contentDescription="@string/PS_settings_title" />
<TextView
android:id="@+id/settingsBadge"
android:layout_width="wrap_content"

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/scrollbarThumb"
android:scrollbars="vertical"
android:clipToPadding="false"
android:background="@color/white"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/emptyView"
style="@style/EmptyView"
android:visibility="gone"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -5,7 +5,8 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="android.widget.RelativeLayout">
tools:parentTag="android.widget.RelativeLayout"
tools:background="@color/gray_600">
<LinearLayout
android:id="@+id/bottom_navigation_background"
@ -20,13 +21,14 @@
android:background="?barColor" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/cutout_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bottom_navigation_inset"/>
android:layout_height="62dp"
android:src="@drawable/bottom_navigation_inset"
android:layout_gravity="top"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -42,7 +44,7 @@
android:id="@+id/item_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="62dp"
android:minHeight="48dp"
android:layout_alignParentBottom="true"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small">

View file

@ -1,7 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/BottomMenu"
android:clickable="false">
<TextView
android:id="@+id/title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Title"
android:gravity="center"
style="@style/Subheader1"
android:background="@color/gray_700"
android:padding="8dp"/>
<LinearLayout
android:id="@+id/menu_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
</LinearLayout>

View file

@ -2,41 +2,42 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
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/white"
android:focusable="true">
<LinearLayout
android:id="@+id/card_view"
android:layout_width="127dp"
android:layout_height="140dp"
android:layout_width="104dp"
android:layout_height="96dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="6dp"
android:background="@drawable/layout_rounded_bg_shopitem"
android:orientation="vertical">
style="@style/CardContent">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/imageView"
android:layout_width="79dp"
android:layout_height="94dp"
android:layout_width="81dp"
android:layout_height="0dp"
android:layout_weight="1"
android:maxHeight="99dp"
android:layout_gravity="center_horizontal"
android:scaleType="fitEnd" />
app:actualImageScaleType="fitCenter" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3.5dp"
android:layout_height="18dp"
android:layout_gravity="center_horizontal"
android:id="@+id/titleTextView"
android:textSize="13sp"
android:textSize="12sp"
android:gravity="center"
style="@style/RowTitle"/>
<TextView
android:id="@+id/ownedTextView"
style="@style/RowText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="20dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/layout_rounded_bg_shopitem_price"
android:gravity="center"

View file

@ -7,13 +7,18 @@
android:background="@drawable/layout_rounded_bg_gray_700"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:id="@+id/image_view_wrapper"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_gravity="center">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/imageView"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_gravity="center"
app:actualImageScaleType="fitCenter"/>
</FrameLayout>
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
@ -21,7 +26,40 @@
android:id="@+id/trainedProgressBar"
android:progressTint="@color/green_100"
android:progressBackgroundTint="@color/gray_600"
android:progressBackgroundTintMode="src_over"
android:layout_marginTop="4dp"
android:layout_marginStart="7dp"
android:layout_marginEnd="7dp"
android:max="50" />
<RelativeLayout
android:id="@+id/item_wrapper"
android:layout_width="86dp"
android:layout_height="70dp"
android:layout_gravity="center">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/hatchingPotion_view"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/egg_view"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<ImageView
android:id="@+id/checkmark_view"
android:layout_width="12dp"
android:layout_height="10dp"
android:src="@drawable/pet_checkmark"
android:layout_gravity="center" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:id="@+id/titleTextView"
android:textSize="12sp"
android:gravity="center"
style="@style/RowTitle" />
</LinearLayout>

View file

@ -2,37 +2,42 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
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/white"
android:focusable="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
android:id="@+id/card_view"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:layout_width="80dp"
android:layout_height="108dp"
android:layout_width="76dp"
android:layout_height="96dp"
android:orientation="vertical"
android:background="@drawable/layout_rounded_bg_shopitem"
android:layout_centerInParent="true">
style="@style/CardContent">
<FrameLayout
android:layout_width="68dp"
android:layout_height="58dp"
android:layout_gravity="center">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/imageView"
android:layout_width="@dimen/pet_image_width"
android:layout_height="@dimen/pet_image_height"
android:layout_gravity="center_horizontal"
android:scaleType="fitEnd" />
android:layout_width="68dp"
android:layout_height="68dp"
android:layout_gravity="center"
app:actualImageScaleType="fitCenter"
/>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3.5dp"
android:layout_height="18dp"
android:layout_gravity="center_horizontal"
android:id="@+id/titleTextView"
android:textSize="13sp"
android:textSize="12sp"
android:gravity="center"
style="@style/RowTitle"/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="20dp"
android:layout_gravity="center_horizontal"
android:id="@+id/ownedTextView"
android:gravity="center"

View file

@ -9,7 +9,9 @@
<com.habitrpg.android.habitica.ui.views.NPCBannerView
android:id="@+id/npcBannerView"
android:layout_width="match_parent"
android:layout_height="@dimen/shop_scene_height"/>
android:layout_height="@dimen/shop_scene_height"
android:paddingStart="-8dp"
android:paddingEnd="-8dp"/>
<View
android:layout_width="match_parent"

View file

@ -20,10 +20,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/Overline"
tools:text="Section Header"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp" />
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" />
<Spinner
android:id="@+id/classSelectionSpinner"
android:layout_width="wrap_content"

View file

@ -59,7 +59,7 @@
android:textColor="#000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="To-Do Title" />
tools:text="To Do Title" />
<com.habitrpg.android.habitica.ui.views.EllipsisTextView
android:id="@+id/notesTextView"

View file

@ -4,17 +4,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/bar_padding"
android:orientation="horizontal">
<ImageView
android:id="@+id/ic_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/progressBar"
android:layout_alignTop="@+id/progressBar"
android:layout_marginEnd="@dimen/bar_icon_padding"
android:layout_marginRight="@dimen/bar_icon_padding"
android:contentDescription="@null"
android:scaleType="center"
android:visibility="gone"/>
@ -24,7 +21,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/bar_size"
android:layout_toEndOf="@id/ic_header"
android:layout_toRightOf="@id/ic_header"
android:orientation="horizontal"/>
<LinearLayout
@ -33,15 +29,13 @@
android:layout_height="wrap_content"
android:layout_below="@id/progressBar"
android:layout_toEndOf="@id/ic_header"
android:layout_toRightOf="@id/ic_header"
android:paddingTop="4dp">
android:paddingTop="2dp">
<ImageView
android:id="@+id/secondaryIconView"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="@dimen/spacing_small"
android:layout_marginRight="@dimen/spacing_small"
android:visibility="gone"/>
<TextView
@ -57,7 +51,6 @@
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="@dimen/spacing_small"
android:layout_marginRight="@dimen/spacing_small"
android:visibility="gone"/>
<TextView

View file

@ -304,8 +304,7 @@
</activity>
<fragment
android:id="@+id/petDetailRecyclerFragment"
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.stable.PetDetailRecyclerFragment"
android:label="@string/pets">
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.stable.PetDetailRecyclerFragment">
<argument
android:name="type"
app:argType="string" />
@ -319,8 +318,7 @@
</fragment>
<fragment
android:id="@+id/mountDetailRecyclerFragment"
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.stable.MountDetailRecyclerFragment"
android:label="@string/mounts" >
android:name="com.habitrpg.android.habitica.ui.fragments.inventory.stable.MountDetailRecyclerFragment">
<argument
android:name="type"
app:argType="string" />

View file

@ -36,7 +36,7 @@
<string name="preference_push_invited_to_quest">Inviteret til Quest</string>
<!--Adding tasks-->
<string name="task_value">Værdi</string>
<string name="new_todo">Ny To-Do</string>
<string name="new_todo">Ny To Do</string>
<string name="new_reward">Ny Belønning</string>
<string name="new_daily">Ny Daglig Opgave</string>
<string name="new_habit">Ny Vane</string>
@ -136,7 +136,7 @@
<string name="members">Medlemmer</string>
<string name="habits">Vaner</string>
<string name="dailies">Daglige</string>
<string name="todos">To-Dos</string>
<string name="todos">To Do\'s</string>
<string name="rewards">Belønninger</string>
<string name="taskform.delete.title">Er du sikker?</string>
<string name="taskform.delete.message">Vil du virkelig slette?</string>
@ -302,10 +302,10 @@
<string name="add_task">Tilføj Opgave</string>
<string name="add_habit">Tilføj Vane</string>
<string name="add_daily">Tilføj Daglig Opgave</string>
<string name="add_todo">Tilføj To-Do</string>
<string name="add_todo">Tilføj To Do</string>
<string name="add_reward">Tilføj Belønning</string>
<string name="widget_dailies">Habitica Daglige Opgaver</string>
<string name="widget_todo_list">Habitica To-Do Liste</string>
<string name="widget_todo_list">Habitica To Do Liste</string>
<string name="widget_add_task">Habitica Tilføj Opgave</string>
<string name="gem.purchase.toolbartitle">Køb</string>
<!--Login Incentives-->
@ -334,7 +334,7 @@
<string name="daily">Daglig</string>
<string name="habit">Vane</string>
<string name="reward">Belønning</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Officiel</string>
<string name="participating">Deltager</string>
<string name="challenge">Udfordring</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Probier es aus! Du kannst die anderen Aufgaben-Typen kennenernen, indem du die untere Navigation benutzt.</string>
<string name="tutorial_dailies_1">Erstelle tägliche Aufgaben für zeitkritische Aufgaben, die regelmäßig erledigt werden müssen. </string>
<string name="tutorial_dailies_2">Pass auf - wenn Du eine dieser Aufgaben nicht erledigst, wird Deinem Avatar über Nacht Schaden zugefügt. Erledige Deine Aufgaben täglich und Du wirst tolle Belohnungen erhalten!</string>
<string name="tutorial_todos_1">Nutze die To-Dos, um Aufgaben zu organisieren, die du nur einmalig erledigen musst.</string>
<string name="tutorial_todos_2">Falls Dein To-Do an einem bestimmten Tag erledigt sein muss, kannst du dafür ein Fälligkeitsdatum erstellen. Es sieht so aus, als ob du jetzt auch eine Aufgabe abhaken kannst - probier es aus!</string>
<string name="tutorial_todos_1">Nutze die To Do\'s, um Aufgaben zu organisieren, die du nur einmalig erledigen musst.</string>
<string name="tutorial_todos_2">Falls Dein To Do an einem bestimmten Tag erledigt sein muss, kannst du dafür ein Fälligkeitsdatum erstellen. Es sieht so aus, als ob du jetzt auch eine Aufgabe abhaken kannst - probier es aus!</string>
<string name="tutorial_rewards_1">Kaufe dir mit dem verdienten Gold Ausrüstung für deinen Avatar!</string>
<string name="tutorial_rewards_2">Du kannst auch benutzerdefinierte Belohnungen erstellen, die sich auf etwas in Deinem wirklichen Leben beziehen, je nachdem was Dich motiviert.</string>
<string name="tutorial_tasks_complete">Das war\'s für das Erste. Falls du eine Erinnerungshilfe brauchst, dann schau in die FAQs.</string>

View file

@ -106,7 +106,7 @@
<string name="members">Mitglieder</string>
<string name="habits">Gewohnheiten</string>
<string name="dailies">Tagesaufgaben</string>
<string name="todos">To-Dos</string>
<string name="todos">To Do\'s</string>
<string name="rewards">Belohnungen</string>
<string name="yes">Ja</string>
<string name="no">Nein</string>
@ -305,12 +305,12 @@
<string name="add_task">Neue Aufgabe hinzufügen</string>
<string name="add_habit">Neue Gewohnheit hinzufügen</string>
<string name="add_daily">Neue Tagesaufgabe hinzufügen</string>
<string name="add_todo">Neues To-Do hinzufügen</string>
<string name="add_todo">Neues To Do hinzufügen</string>
<string name="add_reward">Neue Belohnung hinzufügen</string>
<string name="all_dailies_completed">Du hast alle Deine Tagesaufgaben erledigt. Gut gemacht!</string>
<string name="widget_habit_button">Habitica: Gewohnheit</string>
<string name="widget_dailies">Habitica: Tagesaufgaben</string>
<string name="widget_todo_list">Habitica To-Do-Liste</string>
<string name="widget_todo_list">Habitica To Do-Liste</string>
<string name="google_services_missing">Google Play Dienste konnten nicht gefunden werden.</string>
<string name="gem_purchase_toolbartitle">Kaufen</string>
<string name="gem_purchase_title">Das Erwerben von Edelsteinen unterstützt die Entwickler und hilft Habitica am Laufen zu halten</string>
@ -344,7 +344,7 @@
<string name="subscribe">Abonnieren</string>
<string name="subscribe_listitem1_description">Alexander der Händler wird Dir nun Edelsteine für jeweils 20 Goldmünzen pro Stück verkaufen.\n\nSeine monatlichen Lieferungen sind zunächst auf 25 Edelsteine pro Monat beschränkt, welche jedoch durch die Dauer Deines Abonnements erhöht werden.\n\nDas Limit steigt um 5 Edelsteine für jeweils drei durchgehend abonnierte Monate, bis zu einem Maximum von 50 Edelsteinen pro Monat!</string>
<string name="subscribe_listitem2_description">Jeden Monat wirst Du einen einzigartigen optischen Gegenstand für Deinen Avatar erhalten.\n\nAußerdem gewährt Dir der Mysteriöse Zeitreisende für jeweils drei durchgehend abonnierte Monate Zugang zu historischen (und futuristischen!) optischen Gegenständen.</string>
<string name="subscribe_listitem3_description">Verlängert die Historie erledigter To-Dos und Aufgaben.</string>
<string name="subscribe_listitem3_description">Verlängert die Historie erledigter To Do\'s und Aufgaben.</string>
<string name="subscribe_listitem4_description">Verdoppelte Beute-Limits ermöglichen es Dir, täglich von erledigten Aufgaben mehr Gegenstände zu finden und deinen Stall schneller zu vervollständigen!</string>
<string name="subscription_hourglasses">+%d Mystische Sanduhr</string>
<string name="payment_method">Zahlungsmethode</string>
@ -378,7 +378,7 @@
<string name="daily">Tagesaufgabe</string>
<string name="habit">Gewohnheit</string>
<string name="reward">Belohnung</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Offiziell</string>
<string name="challenge">Herausforderung</string>
<string name="not_part_of_a_challenge">Du nimmst im Moment an keiner Herausforderung teil!</string>
@ -426,8 +426,8 @@
<string name="empty_description_habits">Gewohnheiten sind Aufgaben ohne festen Zeitplan. Du kannst sie mehrmals am Tag oder gar nicht abhaken.</string>
<string name="empty_title_dailies">Du hast keine Tagesaufgaben</string>
<string name="empty_description_dailies">Tagesaufgaben sind sich regelmäßig wiederholende Aufgaben. Such Dir den Zeitplan aus, der Dir am besten passt!</string>
<string name="empty_title_todos">Du hast keine To-Dos</string>
<string name="empty_description_todos">To-Dos sind Aufgaben, die nur einmal abgehakt werden. Füge Unteraufgaben zu den To-Dos hinzu, um deren Wert zu steigern.</string>
<string name="empty_title_todos">Du hast keine To Do\'s</string>
<string name="empty_description_todos">To Do\'s sind Aufgaben, die nur einmal abgehakt werden. Füge Unteraufgaben zu den To Do\'s hinzu, um deren Wert zu steigern.</string>
<string name="empty_title_rewards">Du hast keine Belohnungen</string>
<string name="reset_walkthrough">Setze Justins Einführung zurück</string>
<string name="read_community_guidelines">Bitte lies Dir unsere Community-Richtlinien durch, bevor du etwas postest</string>
@ -620,7 +620,7 @@ Die Quest-Schriftrolle wird an den Quest-Besitzer zurückgegeben.</string>
<string name="next_day_reminder_title">Hast Du Deine Aufgaben heute abgehakt\?</string>
<string name="next_day_reminder_text">Es gibt eine Menge freizuschalten und zu entdecken während Du in den Leveln aufsteigst, also bleib an Deinen Aufgaben dran und hab Spaß!</string>
<string name="daily_tip_0">Willst Du etwas Neues ausprobieren\? Tritt einer Herausforderung bei um Deine Aufgabenliste zu erweitern und ein paar Edelsteine zu gewinnen!</string>
<string name="daily_tip_1">Erweitere Deine To-Dos mit Kontrolllisten um Deine Belohnungen zu vervielfachen!</string>
<string name="daily_tip_1">Erweitere Deine To Do\'s mit Kontrolllisten um Deine Belohnungen zu vervielfachen!</string>
<string name="daily_tip_2">Du kannst verändern wie oft sich eine Tagesaufgabe wiederholt. Sogar gelegentliche Aufgaben können festgelegt werden.</string>
<string name="daily_tip_3">Du kannst auch Erinnerungen für Deine Tagesaufgaben einplanen.</string>
<string name="daily_tip_4">Deine Aufgaben hin und wieder zu überdenken hilft Dir auf dem richtigen Weg zu bleiben. </string>
@ -643,7 +643,7 @@ Die Quest-Schriftrolle wird an den Quest-Besitzer zurückgegeben.</string>
<string name="welcomeNameTitle">Wie sollen wir Dich nennen?</string>
<string name="display_name_length_error">Anzeigenamen müssen zwischen 1 und 30 Zeichen lang sein</string>
<string name="setup_task_join_habitica">Tritt Habitica bei (Hak mich ab!)</string>
<string name="setup_task_join_habitica_notes">Du kannst dieses To-Do erledigen, bearbeiten oder entfernen.</string>
<string name="setup_task_join_habitica_notes">Du kannst dieses To Do erledigen, bearbeiten oder entfernen.</string>
<string name="setup_task_reward">Belohne Dich</string>
<string name="setup_task_reward_notes">Schau Fernsehen, spiel ein Spiel, iss etwas Süßes, es liegt ganz an Dir!</string>
<string name="visit_website">Internetseite besuchen</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Give it a shot! You can explore the other task types through the bottom navigation.</string>
<string name="tutorial_dailies_1">Make Dailies for time sensitive tasks that need to be done on a regular schedule.</string>
<string name="tutorial_dailies_2">Be careful — if you miss one, your avatar will take damage overnight. Checking them off consistently brings great rewards!</string>
<string name="tutorial_todos_1">Use To-dos to keep track of tasks you need to do just once.</string>
<string name="tutorial_todos_2">If your To-do has to be done by a certain time, set a due date. Looks like you can check one off — go ahead!</string>
<string name="tutorial_todos_1">Use To Do\'s to keep track of tasks you need to do just once.</string>
<string name="tutorial_todos_2">If your To Do has to be done by a certain time, set a due date. Looks like you can check one off — go ahead!</string>
<string name="tutorial_rewards_1">Buy gear for your avatar with the gold you earn!</string>
<string name="tutorial_rewards_2">You can also make real-world Custom Rewards based on what motivates you.</string>
<string name="tutorial_tasks_complete">That\'s all for now. If you need a reminder, check the FAQ section.</string>

View file

@ -102,7 +102,7 @@
<string name="members">Members</string>
<string name="habits">Habits</string>
<string name="dailies">Dailies</string>
<string name="todos">To-Dos</string>
<string name="todos">To Do\'s</string>
<string name="rewards">Rewards</string>
<string name="yes">Yes</string>
<string name="no">No</string>
@ -280,12 +280,12 @@
<string name="add_task">Add Task</string>
<string name="add_habit">Add Habit</string>
<string name="add_daily">Add Daily</string>
<string name="add_todo">Add To-Do</string>
<string name="add_todo">Add To Do</string>
<string name="add_reward">Add Reward</string>
<string name="all_dailies_completed">You completed all your dailies. Well done!</string>
<string name="widget_habit_button">Habitica Do Habit</string>
<string name="widget_dailies">Habitica Dailies</string>
<string name="widget_todo_list">Habitica To-Do List</string>
<string name="widget_todo_list">Habitica To Do List</string>
<string name="google_services_missing">Google Play services could not be found.</string>
<string name="gem_purchase_toolbartitle">Purchase</string>
<string name="gem_purchase_title">Buying gems supports the developers and helps keep Habitica running</string>
@ -318,7 +318,7 @@
<string name="subscribe">Subscribe</string>
<string name="subscribe_listitem1_description">Alexander the Merchant will now sell you gems for 20 gold each!\n\nHis monthly shipments are initially capped at 25 Gems per month, but can increase based on your subscription length.\n\nThe cap increases by 5 Gems for every three months of consecutive subscription, up to a maximum of 50 Gems per month!</string>
<string name="subscribe_listitem2_description">Each month you will receive a unique cosmetic item for your avatar!\n\nPlus, for every three months of consecutive subscription, the Mysterious Time Travellers will grant you access to historic (and futuristic!) cosmetic items.</string>
<string name="subscribe_listitem3_description">Makes completed To-Dos and task history available for longer.</string>
<string name="subscribe_listitem3_description">Makes completed To Do\'s and task history available for longer.</string>
<string name="subscribe_listitem4_description">Double drop caps will let you receive more items from your completed tasks every day, helping you complete your stable faster!</string>
<string name="subscription_hourglasses">+%d Mystic Hourglass</string>
<string name="payment_method">Payment method</string>
@ -351,7 +351,7 @@
<string name="daily">Daily</string>
<string name="habit">Habit</string>
<string name="reward">Reward</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Official</string>
<string name="challenge">Challenge</string>
<string name="not_part_of_a_challenge">Youre not part of any Challenges right now!</string>
@ -394,8 +394,8 @@
<string name="empty_description_habits">Habits are tasks that don&amp;rsquo;t have a rigid schedule. You can check them off many times a day, or not at all.</string>
<string name="empty_title_dailies">You don&amp;rsquo;t have any Dailies</string>
<string name="empty_description_dailies">Dailies are tasks that repeat on a regular basis. Choose the schedule that works for you!</string>
<string name="empty_title_todos">You don&amp;rsquo;t have any To-Dos</string>
<string name="empty_description_todos">To-Dos are tasks that only need to be completed once. Add checklists to your To-Dos to increase their value.</string>
<string name="empty_title_todos">You don&amp;rsquo;t have any To Do\'s</string>
<string name="empty_description_todos">To Do\'s are tasks that only need to be completed once. Add checklists to your To Do\'s to increase their value.</string>
<string name="empty_title_rewards">You don&amp;rsquo;t have any Rewards</string>
<string name="reset_walkthrough">Reset Justin&amp;rsquo;s Walkthrough</string>
<string name="read_community_guidelines">Please read our Community Guidelines before posting</string>
@ -622,7 +622,7 @@
<string name="next_day_reminder_title">Did you check off your tasks today\?</string>
<string name="next_day_reminder_text">There\'s lots to unlock and discover as you level up, so keep up with your tasks and have fun!</string>
<string name="daily_tip_0">Want to try something new\? Join a Challenge to expand your task list and win some Gems!</string>
<string name="daily_tip_1">Add checklists to your To-Dos to multiply your rewards!</string>
<string name="daily_tip_1">Add checklists to your To Do\'s to multiply your rewards!</string>
<string name="daily_tip_2">You can change how often each Daily repeats. Even infrequent tasks can be scheduled.</string>
<string name="daily_tip_3">You can schedule specific reminders for Dailies too.</string>
<string name="daily_tip_4">Occasionally re-evaluating your tasks can help keep you on the right path.</string>
@ -657,7 +657,7 @@
<string name="welcomeNameTitle">What should we call you\?</string>
<string name="display_name_length_error">Display names must be between 1 and 30 characters</string>
<string name="setup_task_join_habitica">Join Habitica (Check me off!)</string>
<string name="setup_task_join_habitica_notes">You can either complete this To-Do, edit it, or remove it.</string>
<string name="setup_task_join_habitica_notes">You can either complete this To Do, edit it, or remove it.</string>
<string name="setup_task_reward">Reward yourself</string>
<string name="setup_task_reward_notes">Watch TV, play a game, eat a treat, its up to you!</string>
<string name="equipment_str">STR:</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Coba deh! Kamu bisa mengeksplor macam-macam tugas lain melalui tombol navigasi di bawah.</string>
<string name="tutorial_dailies_1">Buat Keseharian untuk tugas-tugas yang terikat waktu dan butuh untuk diselesaikan secara berkala.</string>
<string name="tutorial_dailies_2">Hati-hati — kalau ada yang terlewat, avatar kamu akan terkena damage besoknya. Menyelesaikan Keseharian secara konsisten memberi banyak keuntungan!</string>
<string name="tutorial_todos_1">Gunakan To-do untuk mencatat tugas-tugas yang hanya perlu kamu lakukan sekali.</string>
<string name="tutorial_todos_2">Kalau To-do-mu harus diselesaikan pada waktu tertentu, tetapkan tenggat waktunya. Sepertinya ada satu yang bisa kamu centang sekarang — sana!</string>
<string name="tutorial_todos_1">Gunakan To Do untuk mencatat tugas-tugas yang hanya perlu kamu lakukan sekali.</string>
<string name="tutorial_todos_2">Kalau To Do-mu harus diselesaikan pada waktu tertentu, tetapkan tenggat waktunya. Sepertinya ada satu yang bisa kamu centang sekarang — sana!</string>
<string name="tutorial_rewards_1">Beli perlengkapan untuk avatarmu menggunakan koin emas yang kamu dapatkan!</string>
<string name="tutorial_rewards_2">Kamu juga bisa membuat Hadiah yang benar-benar ada di dunia nyata tergantung apa yang memotivasimu.</string>
<string name="tutorial_tasks_complete">Itu dulu untuk sekarang. Kalau kamu butuh pengingat, lihat bagian FAQ.</string>

View file

@ -102,7 +102,7 @@
<string name="members">Anggota</string>
<string name="habits">Kebiasaan</string>
<string name="dailies">Keseharian</string>
<string name="todos">To-Do</string>
<string name="todos">To Do</string>
<string name="rewards">Hadiah</string>
<string name="yes">Ya</string>
<string name="no">Tidak</string>
@ -296,7 +296,7 @@
<string name="all_dailies_completed">Anda telah menyelesaikan semua keseharianmu. Selamat!</string>
<string name="widget_habit_button">Habitica Melakukan Kebiasaan</string>
<string name="widget_dailies">Keseharian Habitica</string>
<string name="widget_todo_list">Daftar To-Do Habitica</string>
<string name="widget_todo_list">Daftar To Do Habitica</string>
<string name="google_services_missing">Google play services tidak dapat ditemukan.</string>
<string name="gem_purchase_toolbartitle">Bayar</string>
<string name="gem_purchase_title">Membeli gem dapat mendukung pengembang dan menjaga Habitica tetap berjalan</string>
@ -329,7 +329,7 @@
<string name="subscribe">Berlangganan</string>
<string name="subscribe_listitem1_description">Alexander sang Saudagar akan menjual permata kepadamu masing-masing seharga 20 koin emas!\n\nPengiriman bulanannya dibatasi di 25 Permata per bulan, tapi bisa meningkat berdasarkan lama berlangganan-mu. \n\nBatasnya meningkat sebanyak 5 Permata setiap tiga bulan berturut-turut kamu berlangganan, hingga batas maksimal 50 Permata per bulan!</string>
<string name="subscribe_listitem2_description">Setiap bulan kamu akan menerima sebuah item kosmetik unik untuk avatarmu!\n\nPlus, setiap tiga bulan berturut-turut kamu berlangganan, sang Penjelajah Waktu Misterius akan memberimu akses kepada item kosmetik bersejarah (atau futuristik!).</string>
<string name="subscribe_listitem3_description">Buat To-Do yang telah diselesaikan dan riwayat tugas tersedia lebih lama.</string>
<string name="subscribe_listitem3_description">Buat To Do yang telah diselesaikan dan riwayat tugas tersedia lebih lama.</string>
<string name="subscribe_listitem4_description">Dua kali lipat batas drop akan mengizinkanmu mendapat lebih banyak item untuk tugas yang terselesaikan setiap hari, membantumu melengkapi istalmu lebih cepat!</string>
<string name="subscription_hourglasses">+%d Jam Pasir Mistis</string>
<string name="payment_method">Metode Pembayaran</string>
@ -362,7 +362,7 @@
<string name="daily">Keseharian</string>
<string name="habit">Kebiasaan</string>
<string name="reward">Hadiah</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Resmi</string>
<string name="challenge">Tantangan</string>
<string name="not_part_of_a_challenge">Kamu tidak mengambil bagian dalam Tantangan apapun saat ini!</string>
@ -407,8 +407,8 @@
<string name="empty_description_habits">Kebiasaan adalah tugas yang tidak memerlukan jadwal ketat. Kamu bisa menyelesaikannya beberapa kali sehari, atau tidak sama sekali.</string>
<string name="empty_title_dailies">Kamu tidak punya Keseharian apapun</string>
<string name="empty_description_dailies">Keseharian adalah tugas yang berulang setiap waktu tertentu secara teratur. Pilih jadwal yang bekerja untukmu!</string>
<string name="empty_title_todos">Kamu tidak punya To-Do apapun</string>
<string name="empty_description_todos">To-Do adalah tugas yang hanya perlu diselesaikan sekali. Tambahkan ceklis kepada To-Do-mu untuk meningkatkan harganya.</string>
<string name="empty_title_todos">Kamu tidak punya To Do apapun</string>
<string name="empty_description_todos">To Do adalah tugas yang hanya perlu diselesaikan sekali. Tambahkan ceklis kepada To Do-mu untuk meningkatkan harganya.</string>
<string name="empty_title_rewards">Kamu tidak punya Hadiah apapun</string>
<string name="reset_walkthrough">Ulang Panduan Justin</string>
<string name="read_community_guidelines">Tolong baca Pedoman Komunitas kami sebelum posting</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Ora provaci tu! Puoi trovare altri tipi di attività usando la barra di navigazione in basso.</string>
<string name="tutorial_dailies_1">Crea Daily per attività che devono essere svolte periodicamente.</string>
<string name="tutorial_dailies_2">Sta attento - se ne salti una il tuo avatar subirà dei danni durante la notte. Completale con regolarità e otterrai grandi premi!</string>
<string name="tutorial_todos_1">Usa le To-do per tenere traccia delle cose che devi fare soltanto una volta.</string>
<string name="tutorial_todos_2">Se le tue To-do devono essere completate entro un certo giorno, imposta una data di scadenza. Pare che tu possa completarne una, prova!</string>
<string name="tutorial_todos_1">Usa le To Do per tenere traccia delle cose che devi fare soltanto una volta.</string>
<string name="tutorial_todos_2">Se le tue To Do devono essere completate entro un certo giorno, imposta una data di scadenza. Pare che tu possa completarne una, prova!</string>
<string name="tutorial_rewards_1">Compra oggetti per il tuo avatar con l\'oro che ottieni!</string>
<string name="tutorial_rewards_2">Puoi anche creare delle ricompense reali, basate su ciò che ti motiva.</string>
<string name="tutorial_tasks_complete">Per ora è tutto. Se hai bisogno di un ripasso, consulta la sezione FAQ.</string>

View file

@ -106,7 +106,7 @@
<string name="members">Membri</string>
<string name="habits">Abitudini</string>
<string name="dailies">Daily</string>
<string name="todos">To-do</string>
<string name="todos">To Do</string>
<string name="rewards">Ricompense</string>
<string name="yes"></string>
<string name="no">No</string>
@ -305,12 +305,12 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="add_task">Aggiungi Attività</string>
<string name="add_habit">Aggiungi Abitudine</string>
<string name="add_daily">Aggiungi Daily</string>
<string name="add_todo">Aggiungi To-Do</string>
<string name="add_todo">Aggiungi To Do</string>
<string name="add_reward">Aggiungi Ricompensa</string>
<string name="all_dailies_completed">Hai completato tutte le tue Daily. Ottimo lavoro!</string>
<string name="widget_habit_button">Habitica esegui Abitudine</string>
<string name="widget_dailies">Habitica Daily</string>
<string name="widget_todo_list">Habitica lista To-Do</string>
<string name="widget_todo_list">Habitica lista To Do</string>
<string name="google_services_missing">Impossibile trovare Google Play Services.</string>
<string name="gem_purchase_toolbartitle">Compra</string>
<string name="gem_purchase_title">Comprando gemme supporti gli sviluppatori e tieni in vita Habitica</string>
@ -344,7 +344,7 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="subscribe">Abbonati</string>
<string name="subscribe_listitem1_description">Ora Alexander il Mercante ti venderà Gemme al prezzo di 20 Oro l\'una!\n\nLe sue consegne mensili sono inizialmente limitate a 25 Gemme al mese, ma possono aumentare a seconda della durata del tuo abbonamento.\n\nIl limite aumenta di 5 Gemme ogni tre mesi di abbonamento consecutivi, fino ad un massimo di 50 Gemme al mese!</string>
<string name="subscribe_listitem2_description">Ogni mese riceverai un oggetto davvero unico per il tuo avatar!\n\nIn più, ogni tre mesi di abbonamento consecutivi, i misteriosi Viaggiatori del Tempo ti permetteranno di ottenere oggetti antichi (e futuri!).</string>
<string name="subscribe_listitem3_description">Rende le To-Do completate e la cronologia dei progressi delle attività disponibili più a lungo.</string>
<string name="subscribe_listitem3_description">Rende le To Do completate e la cronologia dei progressi delle attività disponibili più a lungo.</string>
<string name="subscribe_listitem4_description">Raddoppiare il numero massimo di drop giornalieri ti farà ricevere più oggetti dalle attività completate ogni giorno, aiutandoti a completare la tua scuderia più velocemente!</string>
<string name="subscribe1month_gemcap">Limite di 25 Gemme</string>
<string name="subscribe3month_gemcap">Limite di 30 Gemme</string>
@ -382,7 +382,7 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="daily">Daily</string>
<string name="habit">Abitudine</string>
<string name="reward">Ricompensa</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Ufficiale</string>
<string name="challenge">Sfida</string>
<string name="not_part_of_a_challenge">Al momento non stai partecipando a nessuna sfida!</string>
@ -428,8 +428,8 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="empty_description_habits">Le Abitudini sono attività che possono essere svolte in modo molto flessibile. Puoi usarle diverse volte al giorno, o non usarle affatto.</string>
<string name="empty_title_dailies">Non hai nessuna Daily</string>
<string name="empty_description_dailies">Le Daily sono delle attività che vanno svolte regolarmente. Scegli la frequenza con cui ti trovi meglio!</string>
<string name="empty_title_todos">Non hai alcuna To-do.</string>
<string name="empty_description_todos">Le To-do sono attività da completare solo una volta. Aggiungi una checklist alle tue To-do per aumentarne il valore.</string>
<string name="empty_title_todos">Non hai alcuna To Do.</string>
<string name="empty_description_todos">Le To Do sono attività da completare solo una volta. Aggiungi una checklist alle tue To Do per aumentarne il valore.</string>
<string name="empty_title_rewards">Non hai nessuna Ricompensa</string>
<string name="reset_walkthrough">Ripristina la spiegazione introduttiva di Justin</string>
<string name="read_community_guidelines">Per favore, leggi le Linee guida della community prima di scrivere un post.</string>
@ -617,7 +617,7 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="next_day_reminder_title">Hai completato le tue attività oggi?</string>
<string name="next_day_reminder_text">Sbloccherai e scoprirai cose nuove man mano che salirai di livello, quindi continua a completare le tue attività e divertiti!</string>
<string name="daily_tip_0">Vuoi provare qualcosa di nuovo? Unisciti ad una Sfida per espandere la tua lista delle attività e vincere qualche Gemma!</string>
<string name="daily_tip_1">Aggiungi delle checklist alle tue To-Do perché le tue ricompense si moltiplichino!</string>
<string name="daily_tip_1">Aggiungi delle checklist alle tue To Do perché le tue ricompense si moltiplichino!</string>
<string name="daily_tip_2">Puoi regolare la frequenza di ripetizione di ogni Daily. Perfino la data delle attività infrequenti può essere programmata.</string>
<string name="daily_tip_3">Puoi impostare dei promemoria specifici anche per le Daily.</string>
<string name="daily_tip_4">Rivalutare occasionalmente le tue attività può aiutarti a mantenere la giusta strada.</string>
@ -653,7 +653,7 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="welcomeNameTitle">Come dovremmo chiamarti?</string>
<string name="display_name_length_error">Il nome pubblico dev\'essere tra 1 e 30 caratteri.</string>
<string name="setup_task_join_habitica">Raggiungi Habitica (spunta questa casella!)</string>
<string name="setup_task_join_habitica_notes">Puoi completare questa To-Do, modificarla, o rimuoverla.</string>
<string name="setup_task_join_habitica_notes">Puoi completare questa To Do, modificarla, o rimuoverla.</string>
<string name="setup_task_reward">Premiati</string>
<string name="setup_task_reward_notes">Guarda la TV, divertiti con un videogioco, mangia un dolcetto, a te la scelta!</string>
<string name="equipment_str">FOR:</string>
@ -708,7 +708,7 @@ Le Dailies mancate e le cattive Abitudini non li danneggiano molto, e hanno semp
<string name="guild_summary">Riepilogo della Gilda</string>
<string name="setup_task_habit_2_notes">O cancellala dalla schermata di modifica</string>
<string name="setup_task_habit_2">Clicca qui per modificarla in una cattiva abitudine che vorresti perdere</string>
<string name="setup_task_habit_1_notes">Può essere un\'Abitudine, una Daily o una To-Do</string>
<string name="setup_task_habit_1_notes">Può essere un\'Abitudine, una Daily o una To Do</string>
<string name="setup_task_habit_1">Aggiungi un\'attività su Habitica</string>
<string name="cost">Costo</string>
<string name="joined_guild">Ti sei unito alla Gilda</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">挑戦してみよう!下のほうのナビゲーションから、異なるタスクタイプも選ぶことができます。</string>
<string name="tutorial_dailies_1">通常のスケジュールにしたがって行うべき期限付きのタスクは、日課に設定しましょう。</string>
<string name="tutorial_dailies_2">気をつけて…もし一つでもやり逃すと、あなたのアバターは夜のうちにダメージを受けてしまいます。継続的にチェックを入れることで、素晴らしい報酬を手に入れましょう!</string>
<string name="tutorial_todos_1">単発のタスクをこなすために、To-Doを使いましょう。</string>
<string name="tutorial_todos_2">もしTo-Doに期限があるのなら、設定しましょう。あなたにはクリアできるはず…がんばって</string>
<string name="tutorial_todos_1">単発のタスクをこなすために、To Doを使いましょう。</string>
<string name="tutorial_todos_2">もしTo Doに期限があるのなら、設定しましょう。あなたにはクリアできるはず…がんばって</string>
<string name="tutorial_rewards_1">得られたゴールドであなたのアバター用に装備を購入しましょう!</string>
<string name="tutorial_rewards_2">あなた自身のモチベーションを上げるために、現実世界での報酬を登録することもできます。</string>
<string name="tutorial_tasks_complete">これで説明は終わり。もし忘れちゃったときはFAQをチェックしてみてね。</string>

View file

@ -106,7 +106,7 @@
<string name="members">メンバー</string>
<string name="habits">習慣</string>
<string name="dailies">日課</string>
<string name="todos">To-Do</string>
<string name="todos">To Do</string>
<string name="rewards">ごほうび</string>
<string name="yes">はい</string>
<string name="no">いいえ</string>
@ -304,12 +304,12 @@
<string name="add_task">タスクを追加</string>
<string name="add_habit">習慣を追加</string>
<string name="add_daily">日課を追加</string>
<string name="add_todo">To-Do を追加</string>
<string name="add_todo">To Do を追加</string>
<string name="add_reward">ごほうびを追加</string>
<string name="all_dailies_completed">日課をすべて完了した。お見事!</string>
<string name="widget_habit_button">Habitica の習慣</string>
<string name="widget_dailies">Habitica の日課</string>
<string name="widget_todo_list">Habitica のTo-Do リスト</string>
<string name="widget_todo_list">Habitica のTo Do リスト</string>
<string name="google_services_missing">Google Play サービスが見つかりません。</string>
<string name="gem_purchase_toolbartitle">購入</string>
<string name="gem_purchase_title">ジェムを購入することで、開発者を支援し、Habitica の運営を維持する手助けができます</string>
@ -348,7 +348,7 @@
<string name="subscribe_listitem2_description">毎月、アバターを個性的に装飾するアイテムが手に入ります!
\n
\nさらに寄付の継続3カ月ごとに、謎のタイムトラベラーによって、歴史的そして未来的な装飾アイテムが入手可能になります。</string>
<string name="subscribe_listitem3_description">完了した To-Do やタスクの履歴を、より長期間閲覧可能になります。</string>
<string name="subscribe_listitem3_description">完了した To Do やタスクの履歴を、より長期間閲覧可能になります。</string>
<string name="subscribe_listitem4_description">落とし物の上限が2倍になり、毎日の完了したタスクから、より多くのアイテムを獲得することができます。動物小屋のコンプリートも早くなります</string>
<string name="subscribe1month_gemcap">上限 25 ジェム</string>
<string name="subscribe3month_gemcap">上限 30 ジェム</string>
@ -385,7 +385,7 @@
<string name="daily">日課</string>
<string name="habit">習慣</string>
<string name="reward">ごほうび</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Habitica公式</string>
<string name="challenge">チャレンジ</string>
<string name="not_part_of_a_challenge">今参加しているチャレンジはありません!</string>
@ -433,8 +433,8 @@
<string name="empty_description_habits">習慣は、タスクの中でもこなすスケジュールがきっちりと決まっていないもの。1日に何回チェックしてもいいし、チェックしない日があっても大丈夫。</string>
<string name="empty_title_dailies">日課を持っていません</string>
<string name="empty_description_dailies">日課は一定のペースでこなすタスクだよ。自分に合ったスケジュールを組もう!</string>
<string name="empty_title_todos">To-Doがありません</string>
<string name="empty_description_todos">To-Doは一度だけ実行すればいいタスク。チェックリストを加えて忘れないようにしよう。</string>
<string name="empty_title_todos">To Doがありません</string>
<string name="empty_description_todos">To Doは一度だけ実行すればいいタスク。チェックリストを加えて忘れないようにしよう。</string>
<string name="empty_title_rewards">ごほうびがありません</string>
<string name="reset_walkthrough">チュートリアルをリセット</string>
<string name="read_community_guidelines">投稿する前に、私たちの<u>コミュニティガイドライン</u>を見直してください</string>
@ -625,7 +625,7 @@
<string name="next_day_reminder_title">今日のタスクはチェックしましたか?</string>
<string name="next_day_reminder_text">あなたがレベルアップするとアンロックされたり発見したりできるものがたくさんあります。だからタスクへ取り組み続けて、楽しんでいきましょう!</string>
<string name="daily_tip_0">何か新しいことに挑戦したいですか? あなたのタスクリストを発展させてくれるチャレンジに参加して、いくつかのジェムを獲得しましょう!</string>
<string name="daily_tip_1">報酬を増やすためにTo-Doにチェックリストを加えてみましょう</string>
<string name="daily_tip_1">報酬を増やすためにTo Doにチェックリストを加えてみましょう</string>
<string name="daily_tip_2">それぞれの日課をどのくらいの頻度で繰り返すかを変更することができます。たまにしなかないタスクでさえスケジュールすることができます。</string>
<string name="daily_tip_3">日課に対して特定のリマインダーを設定することもできます。</string>
<string name="daily_tip_4">ときどきタスクを見直して再評価することは、正しい道筋を進み続けるために役立ちます。</string>
@ -660,7 +660,7 @@
<string name="welcomeNameTitle">あなたを何と呼べばいいですか?</string>
<string name="display_name_length_error">表示名は130文字以内にしてください</string>
<string name="setup_task_join_habitica">Habiticaに参加するチェックして</string>
<string name="setup_task_join_habitica_notes">To-Doは完了したり、編集したり、削除することができます。</string>
<string name="setup_task_join_habitica_notes">To Doは完了したり、編集したり、削除することができます。</string>
<string name="setup_task_reward">自分自身へごほうびを与える</string>
<string name="setup_task_reward_notes">TVを見ましょう、ゲームで遊びましょう、おやつを食べましょう、あなた次第です</string>
<string name="equipment_str">力:</string>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Probeer het maar! Je kan de andere soorten taken doornemen met de onderstaande navigatie.</string>
<string name="tutorial_dailies_1">Maak dagelijkse taken voor tijdgevoelige taken die volgens een vast schema gedaan moeten worden.</string>
<string name="tutorial_dailies_2">Wees voorzichtig - als je er een mist, verliest je avatar gezondheid de volgende dag. Vink ze regelmatig af voor grootse beloningen!</string>
<string name="tutorial_todos_1">Gebruik to-do\'s om taken bij te houden die je slechts één keer moet doen.</string>
<string name="tutorial_todos_2">Als je to-do tegen een bepaalde dag afgewerkt moet zijn, voer dan een einddatum in. Je kan er een afvinken - doe maar!</string>
<string name="tutorial_todos_1">Gebruik To Do\'s om taken bij te houden die je slechts één keer moet doen.</string>
<string name="tutorial_todos_2">Als je To Do tegen een bepaalde dag afgewerkt moet zijn, voer dan een einddatum in. Je kan er een afvinken - doe maar!</string>
<string name="tutorial_rewards_1">Koop een uitrusting voor je avatar met het goud dat je verdient!</string>
<string name="tutorial_rewards_2">Je kan ook zelf beloningen maken voor in de echte wereld, gebaseerd op wat je motiveert.</string>
<string name="tutorial_tasks_complete">Dat was het voorlopig. Als je iets vergeet, kijk dan in de FAQ sectie.</string>

View file

@ -106,7 +106,7 @@
<string name="members">Leden</string>
<string name="habits">Gewoontes</string>
<string name="dailies">Dagelijkse taken</string>
<string name="todos">To-do\'s</string>
<string name="todos">To Do\'s</string>
<string name="rewards">Beloningen</string>
<string name="yes">Ja</string>
<string name="no">Nee</string>
@ -304,12 +304,12 @@
<string name="add_task">Voeg taak toe</string>
<string name="add_habit">Voeg Gewoonte toe</string>
<string name="add_daily">Voeg Dagelijkse taak toe</string>
<string name="add_todo">Voeg To-do toe</string>
<string name="add_todo">Voeg To Do toe</string>
<string name="add_reward">Voeg Beloning toe</string>
<string name="all_dailies_completed">Je hebt al je Dagelijkse taken voltooid. Goed gedaan!</string>
<string name="widget_habit_button">Habitica Doe Gewoonte</string>
<string name="widget_dailies">Habitica Dagelijkse taken</string>
<string name="widget_todo_list">Habitica to-do lijst</string>
<string name="widget_todo_list">Habitica To Do lijst</string>
<string name="google_services_missing">Google play diensten niet gevonden.</string>
<string name="gem_purchase_toolbartitle">Kopen</string>
<string name="gem_purchase_title">Door het kopen van edelstenen steun je de ontwikkelaars en help je Habitica online te houden</string>
@ -343,7 +343,7 @@
<string name="subscribe">Abonneer</string>
<string name="subscribe_listitem1_description">Alexander de Koopman zal nu edelstenen aan je verkopen voor 20 goud per edelsteen!\n\nZijn maandelijkse levering is initieel beperkt tot 25 edelstenen per maand, maar stijgt afhankelijk van de duur van je abonnement.\n\nDit limiet verhoogt met 5 edelstenen voor elke 3 maanden van opeenvolgende abonnement periodes, tot een maximum van 50 edelstenen per maand!</string>
<string name="subscribe_listitem2_description">Iedere maand ontvang je een uniek cosmetisch voorwerp voor je avatar!\n\nEn voor iedere 3 maanden van opeenvolgende abonnementsperiodes, geven de mysterieuze tijdreizigers je toegang tot historische (en futuristische!) cosmetische voorwerpen.</string>
<string name="subscribe_listitem3_description">Maakt voltooide To-do\'s en taakgeschiedenis langer beschikbaar.</string>
<string name="subscribe_listitem3_description">Maakt voltooide To Do\'s en taakgeschiedenis langer beschikbaar.</string>
<string name="subscribe_listitem4_description">Dubbele vondstlimieten laten je dagelijks meer voorwerpen verdienen van je voltooide taken, waardoor je je stal sneller kan voltooien!</string>
<string name="subscribe1month_gemcap">25 Edelsteen drempel</string>
<string name="subscribe3month_gemcap">30 Edelsteen drempel</string>
@ -381,7 +381,7 @@
<string name="daily">Dagelijkse taak</string>
<string name="habit">Gewoonte</string>
<string name="reward">Beloning</string>
<string name="todo">To-do</string>
<string name="todo">To Do</string>
<string name="official">Officieel</string>
<string name="challenge">Uitdaging</string>
<string name="not_part_of_a_challenge">Je maakt geen deel uit van uitdagingen op dit moment!</string>
@ -426,8 +426,8 @@
<string name="empty_description_habits">Gewoontes zijn taken die geen vast schema hebben. Je kan ze meerdere keren per dag afvinken of helemaal niet.</string>
<string name="empty_title_dailies">Je hebt geen dagelijkse taken</string>
<string name="empty_description_dailies">Dagelijkse taken zijn taken die op een vast schema herhalen. Kies de routine die voor jou werkt!</string>
<string name="empty_title_todos">Je hebt geen to-do\'s</string>
<string name="empty_description_todos">To-do\'s zijn taken die slechts een keer voltooid moeten worden. Voeg checklijsten aan je to-do\'s toe om hun waarde te verhogen.</string>
<string name="empty_title_todos">Je hebt geen To Do\'s</string>
<string name="empty_description_todos">To Do\'s zijn taken die slechts een keer voltooid moeten worden. Voeg checklijsten aan je To Do\'s toe om hun waarde te verhogen.</string>
<string name="empty_title_rewards">Je hebt geen beloningen</string>
<string name="reset_walkthrough">Herstart Justins inleiding</string>
<string name="read_community_guidelines">Lees alsjeblieft onze gemeenschapsrichtlijnen voordat je berichten plaatst</string>
@ -615,7 +615,7 @@
<string name="next_day_reminder_title">Heb je jou taken afgevinkt vandaag?</string>
<string name="next_day_reminder_text">Er is veel om te ontgrendelen en te ontdekken als je niveau omhoog gaat, dus houd je taken bij en veel plezier!</string>
<string name="daily_tip_0">Wil je iets nieuws proberen? Sluit je aan bij een uitdaging om je takenlijst te vergroten en win wat Edelstenen!</string>
<string name="daily_tip_1">Voeg checklijsten toe aan jou To-Dos om de beloningen te vermenigvuldigen!</string>
<string name="daily_tip_1">Voeg checklijsten toe aan jou To Do\'s om de beloningen te vermenigvuldigen!</string>
<string name="daily_tip_2">Je kunt veranderen hoe vaak een Dagelijkse taak zich herhaalt. Zelfs onregelmatige taken kunnen ingepland worden.</string>
<string name="daily_tip_3">Je kunt ook specifieke herinneringen voor Dagelijkse taken inplannen. </string>
<string name="daily_tip_4">Het van tijd tot tijd herevalueren van je taken kan je helpen om op het rechte pad te blijven. </string>
@ -643,7 +643,7 @@
<string name="username_copied">Gebruikersnaam gekopieerd naar het prikbord</string>
<string name="display_name_length_error">Gebruikersnamen moeten tussen 1 en 30 karakters lang zijn</string>
<string name="setup_task_join_habitica">Sluit je aan bij Habitica (Aanvinken)</string>
<string name="setup_task_join_habitica_notes">Je kan deze To-do voltooien, bewerken of verwijderen</string>
<string name="setup_task_join_habitica_notes">Je kan deze To Do voltooien, bewerken of verwijderen</string>
<string name="setup_task_reward">Beloon jezelf</string>
<string name="setup_task_reward_notes">Kijk TV, speel een spel, eet een belonging, aan jou de keuze!</string>
<string name="equipment_str">KRA:</string>

View file

@ -38,7 +38,7 @@
<string name="preference_push_invited_to_quest">Invitat în Expediție</string>
<!--Adding tasks-->
<string name="task_value">Valoare</string>
<string name="new_todo">Nou To-Do</string>
<string name="new_todo">Nou To Do</string>
<string name="new_reward">Răsplată noua</string>
<string name="new_daily">Sarcină Zilnică Noua</string>
<string name="new_habit">Obicei Nou</string>

View file

@ -463,7 +463,7 @@
<string name="daily">Daglig</string>
<string name="habit">Vana</string>
<string name="reward">Belöning</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Officiell</string>
<string name="participating">Deltar</string>
<string name="challenge">Utmaning</string>
@ -517,8 +517,8 @@
<string name="empty_description_habits">Vanor är uppgifter som inte har något fast schema. Du kan klara dom flera gånger per dag, eller inga alls.</string>
<string name="empty_title_dailies">Du har inga \"Dailies\"</string>
<string name="empty_description_dailies">\"Dailies\" är uppgifter som upprepas på återkommande vis. Välj ett schema som passar dig!</string>
<string name="empty_title_todos">Du har inga To-Do\'s</string>
<string name="empty_description_todos">To-Do\'s är uppgifter som bara behöver göras en gång. Lägg till checklistor i dina To-Do\'s för att öka på värdet.</string>
<string name="empty_title_todos">Du har inga To Do\'s</string>
<string name="empty_description_todos">To Do\'s är uppgifter som bara behöver göras en gång. Lägg till checklistor i dina To Do\'s för att öka på värdet.</string>
<string name="empty_title_rewards">Du har inga Belöningar</string>
<string name="reset_walkthrough">Återställ Justins genomgång</string>
<string name="read_community_guidelines">Snälla läs Gemenskapens Riktlinjer innan du du gör ett inlägg</string>

View file

@ -629,7 +629,7 @@
<string name="unlock_attribute_points">分配点数的功能在10级解锁</string>
<string name="same_day_reminder_text">你干的越多,奖励就会越多。溪流终将汇聚成大海。</string>
<string name="daily_tip_0">想试试新东西?加入一个挑战来扩充你的人物列表并赢得一些宝石吧!</string>
<string name="daily_tip_1">把待办事项都加到你的To-Do列表来赢取奖励</string>
<string name="daily_tip_1">把待办事项都加到你的To Do列表来赢取奖励</string>
<string name="daily_tip_2">你可以修改你的每日任务的重复频率。多罕见的任务都能被安排得明明白白。</string>
<string name="daily_tip_3">你也可以安排特定的日程提醒。</string>
<string name="daily_tip_5">深呼吸!保持专注!你能办到!</string>

View file

@ -9,6 +9,8 @@
<attr name="textColorSecondary" format="color" />
<attr name="textColorPrimaryDark" format="color" />
<attr name="barColor" format="color" />
<attr name="toolbarContentColor" format="color" />
<attr name="colorPrimaryText" format="color" />
<attr name="taskFormTint" format="color" />
<attr name="textColorSecondaryDark" format="color" />
<attr name="statsColor" format="color" />

View file

@ -23,7 +23,7 @@
<color name="red_50">#F74E52</color>
<color name="red_10">#F23035</color>
<color name="red_5">#BF262B</color>
<color name="red_1">#6C0406</color>
<color name="red_1">#6c0406</color>
<color name="orange_500">#ffc8a7</color>
<color name="orange_100">#FF944C</color>
@ -151,4 +151,9 @@
<color name="animalitem_all_eggs">#6ECDB2</color>
<color name="dark_brown">#794b00</color>
<color name="blue_1">#033f5e</color>
<color name="teal_1">#005158</color>
<color name="green_1">#005737</color>
<color name="yellow_1">#794b00</color>
<color name="orange_1">#7f3300</color>
</resources>

View file

@ -19,14 +19,14 @@
<dimen name="party_invite_separator">4dp</dimen>
<dimen name="party_invite_text_width">140dp</dimen>
<dimen name="bar_size">15dp</dimen>
<dimen name="bar_size">8dp</dimen>
<dimen name="bar_padding">5dp</dimen>
<dimen name="bar_padding_small">2dp</dimen>
<dimen name="bar_radius">5dp</dimen>
<dimen name="avatar_width">140dp</dimen>
<dimen name="avatar_height">147dp</dimen>
<dimen name="avatar_header_width">108dp</dimen>
<dimen name="avatar_header_height">113dp</dimen>
<dimen name="avatar_header_width">94dp</dimen>
<dimen name="avatar_header_height">98dp</dimen>
<dimen name="quest_image_width">219dp</dimen>
@ -58,15 +58,15 @@
<dimen name="row_title_bottommargin">2dp</dimen>
<dimen name="pet_width">84dp</dimen>
<dimen name="mount_width">120dp</dimen>
<dimen name="bottom_menu_padding">28dp</dimen>
<dimen name="bottom_menu_padding">20dp</dimen>
<dimen name="pet_image_width">68dp</dimen>
<dimen name="pet_image_height">65dp</dimen>
<dimen name="mount_image_width">81dp</dimen>
<dimen name="mount_image_height">99dp</dimen>
<dimen name="shop_height">124dp</dimen>
<dimen name="bar_icon_padding">10dp</dimen>
<dimen name="bar_icon_padding">4dp</dimen>
<dimen name="task_text_padding">16dp</dimen>
<dimen name="header_bar_spacing">7dp</dimen>
<dimen name="header_bar_spacing">9dp</dimen>
<dimen name="bar_size_slim">13dp</dimen>
<dimen name="spacing_small">4dp</dimen>

View file

@ -7,8 +7,8 @@
<string name="tutorial_habits_4">Give it a shot! You can explore the other task types through the bottom navigation.</string>
<string name="tutorial_dailies_1">Make Dailies for time sensitive tasks that need to be done on a regular schedule.</string>
<string name="tutorial_dailies_2">Be careful — if you miss one, your avatar will take damage overnight. Checking them off consistently brings great rewards!</string>
<string name="tutorial_todos_1">Use To-dos to keep track of tasks you need to do just once.</string>
<string name="tutorial_todos_2">If your To-do has to be done by a certain time, set a due date. Looks like you can check one off — go ahead!</string>
<string name="tutorial_todos_1">Use To Do\'s to keep track of tasks you need to do just once.</string>
<string name="tutorial_todos_2">If your To Do has to be done by a certain time, set a due date. Looks like you can check one off — go ahead!</string>
<string name="tutorial_rewards_1">Buy gear for your avatar with the gold you earn!</string>
<string name="tutorial_rewards_2">You can also make real-world Custom Rewards based on what motivates you.</string>
<string name="tutorial_tasks_complete">That\'s all for now. If you need a reminder, check the FAQ section.</string>

View file

@ -138,7 +138,7 @@
<string name="members">Members</string>
<string name="habits">Habits</string>
<string name="dailies">Dailies</string>
<string name="todos">To-Do\'s</string>
<string name="todos">To Do\'s</string>
<string name="rewards">Rewards</string>
<string name="yes">Yes</string>
<string name="no">No</string>
@ -363,12 +363,12 @@
<string name="add_task">Add Task</string>
<string name="add_habit">Add Habit</string>
<string name="add_daily">Add Daily</string>
<string name="add_todo">Add To-Do</string>
<string name="add_todo">Add To Do</string>
<string name="add_reward">Add Reward</string>
<string name="all_dailies_completed">You completed all your dailies. Well done!</string>
<string name="widget_habit_button">Habitica Do Habit</string>
<string name="widget_dailies">Habitica Dailies</string>
<string name="widget_todo_list">Habitica To-Do List</string>
<string name="widget_todo_list">Habitica To Do List</string>
<string name="google_services_missing">Google play services could not be found.</string>
<string name="gem_purchase_toolbartitle">Purchase</string>
<string name="gem_purchase_title">Buying gems supports the developers and helps keep Habitica running</string>
@ -437,16 +437,16 @@
<string name="subscription_status">Subscription Status</string>
<string name="challenge_leave_title">Leave Challenge</string>
<string name="challenge_leave_text">Are you sure you want to leave the Challenge “%s”?</string>
<string name="challenge_remove_tasks_title">Remove tasks</string>
<string name="challenge_remove_tasks_text">Do you want to remove the tasks?</string>
<string name="challenge_leave_description">You can choose to keep this Challenge\'s tasks on your personal task board or delete them when you leave</string>
<string name="leave_keep_tasks">Leave &amp; Keep Tasks</string>
<string name="leave_delte_tasks">Leave &amp; Delete Tasks</string>
<string name="remove_tasks">Remove</string>
<string name="keep_tasks">Keep</string>
<string name="my_challenges">My Challenges</string>
<string name="daily">Daily</string>
<string name="habit">Habit</string>
<string name="reward">Reward</string>
<string name="todo">To-Do</string>
<string name="todo">To Do</string>
<string name="official">Official</string>
<string name="challenge">Challenge</string>
<string name="not_part_of_a_challenge">Youre not part of any Challenges right now!</string>
@ -497,15 +497,15 @@
<string name="empty_description_habits">Habits are tasks that don\'t have a rigid schedule. You can check them off many times a day, or not at all.</string>
<string name="empty_title_dailies">You don\'t have any Dailies</string>
<string name="empty_description_dailies">Dailies are tasks that repeat on a regular basis. Choose the schedule that works for you!</string>
<string name="empty_title_todos">You don\'t have any To-Do\'s</string>
<string name="empty_description_todos">To-Do\'s are tasks that only need to be completed once. Add checklists to your To-Do\'s to increase their value.</string>
<string name="empty_title_todos">You don\'t have any To Do\'s</string>
<string name="empty_description_todos">To Do\'s are tasks that only need to be completed once. Add checklists to your To Do\'s to increase their value.</string>
<string name="empty_title_rewards">You don\'t have any Rewards</string>
<string name="empty_title_habits_filtered">No Habits</string>
<string name="empty_description_habits_filtered">There aren\'t any Habits visible with your current filters.</string>
<string name="empty_title_dailies_filtered">No Dailies</string>
<string name="empty_description_dailies_filtered">There aren\'t any Dailies visible with your current filters.</string>
<string name="empty_title_todos_filtered">No To-Do\'s</string>
<string name="empty_description_todos_filtered">There aren\'t any To-Do\'s visible with your current filters.</string>
<string name="empty_title_todos_filtered">No To Do\'s</string>
<string name="empty_description_todos_filtered">There aren\'t any To Do\'s visible with your current filters.</string>
<string name="empty_title_rewards_filtered">No Rewards</string>
<string name="reset_walkthrough">Reset Tutorials</string>
<string name="read_community_guidelines">Review our <u>Community Guidelines</u> before posting</string>
@ -699,7 +699,7 @@
<string name="next_day_reminder_title">Did you check off your tasks today?</string>
<string name="next_day_reminder_text">There\'s lots to unlock and discover as you level up, so keep up with your tasks and have fun!</string>
<string name="daily_tip_0">Want to try something new? Join a Challenge to expand your task list and win some Gems!</string>
<string name="daily_tip_1">Add checklists to your To-Do\'s to multiply your rewards!</string>
<string name="daily_tip_1">Add checklists to your To Do\'s to multiply your rewards!</string>
<string name="daily_tip_2">You can change how often each Daily repeats. Even infrequent tasks can be scheduled.</string>
<string name="daily_tip_3">You can schedule specific reminders for Dailies too.</string>
<string name="daily_tip_4">Occasionally re-evaluating your tasks can help keep you on the right path.</string>
@ -734,7 +734,7 @@
<string name="welcomeNameTitle">What should we call you?</string>
<string name="display_name_length_error">Display names must be between 1 and 30 characters</string>
<string name="setup_task_join_habitica">Join Habitica (Check me off!)</string>
<string name="setup_task_join_habitica_notes">You can either complete this To-Do, edit it, or remove it.</string>
<string name="setup_task_join_habitica_notes">You can either complete this To Do, edit it, or remove it.</string>
<string name="setup_task_reward">Reward yourself</string>
<string name="setup_task_reward_notes">Watch TV, play a game, eat a treat, its up to you!</string>
<string name="equipment_str">STR:</string>
@ -817,7 +817,7 @@
<string name="joined_guild">You joined the guild</string>
<string name="cost">Cost</string>
<string name="setup_task_habit_1">Add a task to Habitica</string>
<string name="setup_task_habit_1_notes">Either a Habit, a Daily or a To-Do</string>
<string name="setup_task_habit_1_notes">Either a Habit, a Daily or a To Do</string>
<string name="setup_task_habit_2">Tap here to edit this into a bad habit you\'d like to quit</string>
<string name="setup_task_habit_2_notes">Or delete it from the edit screen</string>
<string name="guild_summary">Guild Summary</string>
@ -1015,7 +1015,7 @@
<string name="read_more">Read More</string>
<string name="purchase_amount_error">You are unable to buy that amount.</string>
<string name="still_questions">Still have a question?</string>
<string name="pet_ownership_fraction">%1$d/%2$d</string>
<string name="pet_ownership_fraction">%1$d / %2$d</string>
<string name="task_display">Task list display</string>
<string name="onboarding_tasks">Onboarding Tasks</string>
<string name="complete_for_gold"><![CDATA[Complete to earn <font color="#EE9109"><b>100 Gold</b></font>!]]></string>
@ -1027,8 +1027,8 @@
<string name="percent_completed">%d%% Complete</string>
<string name="create_task_title">Create a Task</string>
<string name="complete_task_title">Complete a Task</string>
<string name="hatch_pet_title">Hatch a Pet</string>
<string name="feedPet_title">Feed a Pet</string>
<string name="hatch_pet_title">Hatch a new pet</string>
<string name="feedPet_title">Feed a pet</string>
<string name="purchase_equipment_title">Purchase Equipment</string>
<string name="create_task_description">Add a task for something you would like to accomplish this week</string>
<string name="complete_task_description">Check off any of your tasks to earn rewards</string>
@ -1058,4 +1058,30 @@
<string name="excessItemsNoneLeft">You already have everything you need for all %s pets. Are you sure you want to purchase %d %ss?</string>
<string name="equip">Equip</string>
<string name="view_onboarding_tasks">View Onboarding Tasks</string>
<string name="suggest_pet_hatch_missing_egg">You still need a %s Egg to hatch this pet</string>
<string name="suggest_pet_hatch_missing_potion">You still need a %s Potion to hatch this pet</string>
<string name="suggest_pet_hatch_missing_both">You need a %s and %s Potion to hatch this pet</string>
<string name="suggest_pet_hatch_again_missing_egg">You still need a %s Egg to hatch this pet again</string>
<string name="suggest_pet_hatch_again_missing_potion">You still need a %s Potion to hatch this pet again</string>
<string name="suggest_pet_hatch_again_missing_both">You need a %s and %s Potion to hatch this pet again</string>
<string name="can_hatch_pet">Combine your %s Egg and %s Potion to hatch this pet!</string>
<string name="hatch_pet">Hatch Pet</string>
<string name="unhatched_pet">Unhatched Pet</string>
<string name="hatch_pet_again">Hatch Pet again</string>
<string name="magic_potions">Magic Potions</string>
<string name="magic_potion">Magic Potion</string>
<string name="use_saddle">Use Saddle</string>
<string name="hatch_your_pet">Hatch your Pet</string>
<string name="hatch">Hatch</string>
<string name="delete_challenge_task_title">Delete Challenge Task?</string>
<string name="delete_challenge_task_description">This is one of %d tasks that are part of the “%s” Challenge. You must leave the Challenge to delete this task.</string>
<string name="leave_delete_task">Leave &amp; Delete Task</string>
<string name="leave_delete_x_tasks">Leave &amp; Delete %d Tasks</string>
<string name="broken_challenge">Broken Challenge</string>
<string name="broken_challenge_description">This is one of %d tasks that are part of a Challenge that no longer exists. What would you like to do with these left over tasks?</string>
<string name="keep_x_tasks">Keep %d Tasks</string>
<string name="delete_x_tasks">Delete %d Tasks</string>
<string name="challenge_task_name">%s Challenge Task</string>
<string name="pet_category">%s Pets</string>
<string name="mount_category">%s Mounts</string>
</resources>

View file

@ -48,12 +48,14 @@
<item name="android:navigationBarColor">@color/brand_50</item>
<item name="searchViewStyle">@style/SearchViewStyle</item>
<item name="toolbarContentColor">@color/white</item>
<item name="colorPrimaryText">@color/brand_50</item>
</style>
<style name="MainAppTheme.Red">
<item name="colorPrimary">@color/red_5</item>
<item name="colorPrimaryDark">@color/red_1</item>
<item name="colorPrimary">@color/red_10</item>
<item name="colorPrimaryDark">@color/red_5</item>
<item name="colorAccent">@color/red_100</item>
<item name="android:colorPrimary">@color/red_5</item>
<item name="android:colorPrimaryDark">@color/red_1</item>
@ -65,12 +67,14 @@
<item name="android:textColorLink">@color/red_100</item>
<item name="textColorPrimaryDark">@color/red_500</item>
<item name="barColor">@color/red_5</item>
<item name="taskFormTint">@color/red_100</item>
<item name="taskFormTint">@color/red_50</item>
<item name="toolbarContentColor">@color/red_1</item>
<item name="colorPrimaryText">@color/red_1</item>
</style>
<style name="MainAppTheme.Maroon">
<item name="colorPrimary">@color/red_1</item>
<item name="colorPrimaryDark">@color/maroon_1</item>
<item name="colorPrimary">@color/red_10</item>
<item name="colorPrimaryDark">@color/maroon_5</item>
<item name="colorAccent">@color/maroon_100</item>
<item name="android:colorPrimary">@color/red_1</item>
<item name="android:colorPrimaryDark">@color/maroon_1</item>
@ -82,12 +86,13 @@
<item name="android:textColorLink">@color/maroon_100</item>
<item name="textColorPrimaryDark">@color/red_500</item>
<item name="barColor">@color/red_1</item>
<item name="taskFormTint">@color/maroon_100</item>
<item name="taskFormTint">@color/maroon_50</item>
<item name="colorPrimaryText">@color/maroon_1</item>
</style>
<style name="MainAppTheme.Orange">
<item name="colorPrimary">@color/orange_10</item>
<item name="colorPrimaryDark">@color/orange_5</item>
<item name="colorPrimary">@color/orange_50</item>
<item name="colorPrimaryDark">@color/orange_10</item>
<item name="colorAccent">@color/orange_100</item>
<item name="android:colorPrimary">@color/orange_10</item>
<item name="android:colorPrimaryDark">@color/orange_5</item>
@ -99,12 +104,14 @@
<item name="android:textColorLink">@color/orange_100</item>
<item name="textColorPrimaryDark">@color/orange_500</item>
<item name="barColor">@color/orange_10</item>
<item name="taskFormTint">@color/orange_100</item>
<item name="taskFormTint">@color/orange_50</item>
<item name="toolbarContentColor">@color/orange_1</item>
<item name="colorPrimaryText">@color/orange_1</item>
</style>
<style name="MainAppTheme.Yellow">
<item name="colorPrimary">@color/yellow_10</item>
<item name="colorPrimaryDark">@color/yellow_5</item>
<item name="colorPrimary">@color/yellow_50</item>
<item name="colorPrimaryDark">@color/yellow_10</item>
<item name="colorAccent">@color/yellow_100</item>
<item name="android:colorPrimary">@color/yellow_10</item>
<item name="android:colorPrimaryDark">@color/yellow_5</item>
@ -116,7 +123,9 @@
<item name="android:textColorLink">@color/yellow_100</item>
<item name="textColorPrimaryDark">@color/yellow_500</item>
<item name="barColor">@color/yellow_10</item>
<item name="taskFormTint">@color/yellow_100</item>
<item name="taskFormTint">@color/yellow_10</item>
<item name="toolbarContentColor">@color/yellow_1</item>
<item name="colorPrimaryText">@color/yellow_1</item>
</style>
<style name="MainAppTheme.Green">
@ -133,7 +142,9 @@
<item name="android:textColorLink">@color/green_100</item>
<item name="textColorPrimaryDark">@color/green_500</item>
<item name="barColor">@color/green_10</item>
<item name="taskFormTint">@color/green_100</item>
<item name="taskFormTint">@color/green_50</item>
<item name="toolbarContentColor">@color/green_1</item>
<item name="colorPrimaryText">@color/green_1</item>
</style>
<style name="MainAppTheme.Teal">
@ -150,7 +161,9 @@
<item name="android:textColorLink">@color/teal_100</item>
<item name="textColorPrimaryDark">@color/teal_500</item>
<item name="barColor">@color/teal_10</item>
<item name="taskFormTint">@color/teal_100</item>
<item name="taskFormTint">@color/teal_50</item>
<item name="toolbarContentColor">@color/teal_1</item>
<item name="colorPrimaryText">@color/teal_1</item>
</style>
<style name="MainAppTheme.Blue">
@ -167,7 +180,9 @@
<item name="android:textColorLink">@color/blue_100</item>
<item name="textColorPrimaryDark">@color/blue_500</item>
<item name="barColor">@color/blue_10</item>
<item name="taskFormTint">@color/blue_100</item>
<item name="taskFormTint">@color/blue_50</item>
<item name="toolbarContentColor">@color/blue_1</item>
<item name="colorPrimaryText">@color/blue_1</item>
</style>
<style name="BottomSheetTheme" parent="Theme.AppCompat.NoActionBar">
@ -256,7 +271,11 @@
<!-- used activity_main.xml -->
<style name="Toolbar" parent="Base.ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColorPrimary">?attr/toolbarContentColor</item>
<item name="textColorSecondary">?attr/toolbarContentColor</item>
<item name="background">?attr/colorPrimary</item>
<item name="actionMenuTextColor">?attr/toolbarContentColor</item>
<item name="android:actionMenuTextColor">?attr/toolbarContentColor</item>
</style>
<style name="HabitButton" parent="android:Widget.Button">
@ -309,7 +328,10 @@
</style>
<style name="BottomMenuItem">
<item name="android:padding">@dimen/bottom_menu_padding</item>
<item name="android:paddingStart">@dimen/bottom_menu_padding</item>
<item name="android:paddingEnd">@dimen/bottom_menu_padding</item>
<item name="android:paddingTop">@dimen/spacing_large</item>
<item name="android:paddingBottom">@dimen/spacing_large</item>
<item name="android:background">@drawable/selection_highlight</item>
</style>
@ -365,6 +387,7 @@
<item name="android:paddingLeft">@dimen/pill_horizontal_padding</item>
<item name="android:paddingTop">@dimen/pill_vertical_padding</item>
<item name="android:paddingBottom">@dimen/pill_vertical_padding</item>
<item name="android:textColor">@color/gray_200</item>
</style>
<style name="Pill.White">
@ -610,18 +633,29 @@
<style name="TaskFormTextInputLayoutAppearance" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
<!-- reference our hint & error styles -->
<item name="boxBackgroundColor">@color/white_75_alpha</item>
<item name="android:textColor">@color/textColorLight</item>
<item name="android:textColor">?attr/colorPrimaryText</item>
<item name="android:textColorHint">@color/textColorLight</item>
<item name="colorControlNormal">@color/white</item>
<item name="colorControlNormal">?attr/colorPrimary</item>
<item name="colorControlActivated">?attr/colorPrimary</item>
<item name="colorControlHighlight">?attr/colorPrimary</item>
<item name="colorAccent">?attr/colorPrimary</item>
<item name="hintTextAppearance">@style/TaskFormHintTextAppearance</item>
</style>
<style name="TaskFormHintTextAppearance">
<item name="colorPrimary">?attr/colorPrimaryText</item>
<item name="android:textSize">12sp</item>
<item name="android:fontFamily">@string/font_family_medium</item>
<item name="fontFamily">@string/font_family_medium</item>
</style>
<style name="TextInputLayoutAppearanceTheme">
<item name="boxBackgroundColor">@color/taskform_gray</item>
<item name="android:textColor">@color/textColorLight</item>
<item name="android:textColor">?attr/colorPrimaryText</item>
<item name="android:textColorHint">@color/gray_300</item>
<item name="android:colorControlNormal">@color/gray_400</item>
<item name="android:colorControlActivated">@color/brand_400</item>
<item name="android:colorControlHighlight">@color/brand_400</item>
<item name="android:colorControlNormal">?attr/colorPrimary</item>
<item name="android:colorControlActivated">?attr/colorPrimary</item>
<item name="android:colorControlHighlight">?attr/colorPrimary</item>
<item name="android:colorAccent">@color/brand_400</item>
</style>

View file

@ -76,6 +76,9 @@ interface ApiService {
@POST("user/buy-quest/{key}")
fun purchaseQuest(@Path("key") key: String): Flowable<HabitResponse<Void>>
@POST("user/buy-special-spell/{key}")
fun purchaseSpecialSpell(@Path("key") key: String): Flowable<HabitResponse<Void>>
@POST("user/sell/{type}/{key}")
fun sellItem(@Path("type") itemType: String, @Path("key") itemKey: String): Flowable<HabitResponse<User>>
@ -380,4 +383,7 @@ interface ApiService {
@POST("members/transfer-gems")
fun transferGems(@Body data: Map<String, Any>): Flowable<HabitResponse<Void>>
@POST("tasks/unlink-all/{challengeID}")
fun unlinkAllTasks(@Path("challengeID") challengeID: String?, @Query("keep") keepOption: String): Flowable<HabitResponse<Void>>
}

View file

@ -61,6 +61,7 @@ interface ApiClient {
fun purchaseMysterySet(itemKey: String): Flowable<Any>
fun purchaseQuest(key: String): Flowable<Any>
fun purchaseSpecialSpell(key: String): Flowable<Any>
fun validateSubscription(request: SubscriptionValidationRequest): Flowable<Any>
fun validateNoRenewSubscription(request: PurchaseValidationRequest): Flowable<Any>
fun cancelSubscription(): Flowable<Any>
@ -257,4 +258,5 @@ interface ApiClient {
fun findUsernames(username: String, context: String?, id: String?): Flowable<List<FindUsernameResult>>
fun transferGems(giftedID: String, amount: Int): Flowable<Void>
fun unlinkAllTasks(challengeID: String?, keepOption: String): Flowable<Void>
}

View file

@ -33,16 +33,16 @@ interface InventoryRepository : BaseRepository {
fun getOwnedEquipment(type: String): Flowable<RealmResults<Equipment>>
fun getEquipmentType(type: String, set: String): Flowable<RealmResults<Equipment>>
fun getOwnedItems(itemType: String): Flowable<RealmResults<OwnedItem>>
fun getOwnedItems(): Flowable<Map<String, OwnedItem>>
fun getOwnedItems(itemType: String, includeZero: Boolean = false): Flowable<RealmResults<OwnedItem>>
fun getOwnedItems(includeZero: Boolean = false): Flowable<Map<String, OwnedItem>>
fun getEquipment(key: String): Flowable<Equipment>
fun openMysteryItem(user: User?): Flowable<Equipment>
fun saveEquipment(equipment: Equipment)
fun getMounts(type: String, group: String, color: String?): Flowable<RealmResults<Mount>>
fun getPets(type: String, group: String, color: String?): Flowable<RealmResults<Pet>>
fun getMounts(type: String?, group: String?, color: String?): Flowable<RealmResults<Mount>>
fun getPets(type: String?, group: String?, color: String?): Flowable<RealmResults<Pet>>
fun updateOwnedEquipment(user: User)
@ -70,10 +70,13 @@ interface InventoryRepository : BaseRepository {
fun purchaseHourglassItem(purchaseType: String, key: String): Flowable<Any>
fun purchaseQuest(key: String): Flowable<Any>
fun purchaseSpecialSpell(key: String): Flowable<Any>
fun purchaseItem(purchaseType: String, key: String, purchaseQuantity: Int): Flowable<Any>
fun togglePinnedItem(item: ShopItem): Flowable<List<ShopItem>>
fun getItems(itemClass: Class<out Item>, keys: Array<String>, user: User?): Flowable<out RealmResults<out Item>>
fun getItems(itemClass: Class<out Item>, keys: Array<String>): Flowable<out RealmResults<out Item>>
fun getItems(itemClass: Class<out Item>): Flowable<out RealmResults<out Item>>
fun getLatestMysteryItem(): Flowable<Equipment>
fun getItem(type: String, key: String): Flowable<Item>
}

View file

@ -59,4 +59,6 @@ interface TaskRepository : BaseRepository {
fun retrieveDailiesFromDate(date: Date): Flowable<TaskList>
fun retrieveCompletedTodos(userId: String): Flowable<TaskList>
fun syncErroredTasks(): Single<List<Task>>
fun unlinkAllTasks(challengeID: String?, keepOption: String): Flowable<Void>
fun getTasksForChallenge(challengeID: String?): Flowable<RealmResults<Task>>
}

View file

@ -2,6 +2,7 @@ package com.habitrpg.android.habitica.data.implementation
import android.content.Context
import com.amplitude.api.Amplitude
import com.facebook.FacebookSdk.getCacheDir
import com.google.gson.JsonSyntaxException
import com.habitrpg.android.habitica.BuildConfig
import com.habitrpg.android.habitica.HabiticaBaseApplication
@ -37,6 +38,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.BiFunction
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import okhttp3.Cache
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.logging.HttpLoggingInterceptor
@ -102,7 +104,12 @@ class ApiClientImpl//private OnHabitsAPIResult mResultListener;
val timeZone = calendar.timeZone
val timezoneOffset = -TimeUnit.MINUTES.convert(timeZone.getOffset(calendar.timeInMillis).toLong(), TimeUnit.MILLISECONDS)
val cacheSize: Long = 10 * 1024 * 1024 // 10 MB
val cache = Cache(getCacheDir(), cacheSize)
val client = OkHttpClient.Builder()
.cache(cache)
.addInterceptor(logging)
.addNetworkInterceptor { chain ->
val original = chain.request()
@ -325,6 +332,10 @@ class ApiClientImpl//private OnHabitsAPIResult mResultListener;
return apiService.buyItem(itemKey, mapOf(Pair("quantity", purchaseQuantity))).compose(configureApiCallObserver())
}
override fun unlinkAllTasks(challengeID: String?, keepOption: String): Flowable<Void> {
return apiService.unlinkAllTasks(challengeID, keepOption).compose(configureApiCallObserver())
}
override fun purchaseItem(type: String, itemKey: String, purchaseQuantity: Int): Flowable<Any> {
return apiService.purchaseItem(type, itemKey, mapOf(Pair("quantity", purchaseQuantity))).compose(configureApiCallObserver())
}
@ -363,6 +374,10 @@ class ApiClientImpl//private OnHabitsAPIResult mResultListener;
return apiService.purchaseQuest(key).compose(configureApiCallObserver())
}
override fun purchaseSpecialSpell(key: String): Flowable<Any> {
return apiService.purchaseSpecialSpell(key).compose(configureApiCallObserver())
}
override fun sellItem(itemType: String, itemKey: String): Flowable<User> {
return apiService.sellItem(itemType, itemKey).compose(configureApiCallObserver())
}

View file

@ -22,7 +22,7 @@ abstract class ContentRepositoryImpl<T : ContentLocalRepository>(localRepository
override fun retrieveContent(context: Context?, forced: Boolean): Flowable<ContentResult> {
val now = Date().time
return if (forced || now - this.lastContentSync > 3) {
return if (forced || now - this.lastContentSync > 300000) {
lastContentSync = now
apiClient.content.doOnNext {
context?.let {context ->

View file

@ -50,16 +50,20 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
return localRepository.getEquipmentType(type, set)
}
override fun getOwnedItems(itemType: String): Flowable<RealmResults<OwnedItem>> {
return localRepository.getOwnedItems(itemType, userID)
override fun getOwnedItems(itemType: String, includeZero: Boolean): Flowable<RealmResults<OwnedItem>> {
return localRepository.getOwnedItems(itemType, userID, includeZero)
}
override fun getOwnedItems(): Flowable<Map<String, OwnedItem>> {
return localRepository.getOwnedItems(userID)
override fun getOwnedItems(includeZero: Boolean): Flowable<Map<String, OwnedItem>> {
return localRepository.getOwnedItems(userID, includeZero)
}
override fun getItems(itemClass: Class<out Item>, keys: Array<String>, user: User?): Flowable<out RealmResults<out Item>> {
return localRepository.getItems(itemClass, keys, user)
override fun getItems(itemClass: Class<out Item>, keys: Array<String>): Flowable<out RealmResults<out Item>> {
return localRepository.getItems(itemClass, keys)
}
override fun getItems(itemClass: Class<out Item>): Flowable<out RealmResults<out Item>> {
return localRepository.getItems(itemClass)
}
override fun getEquipment(key: String): Flowable<Equipment> {
@ -82,7 +86,7 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
return localRepository.getMounts()
}
override fun getMounts(type: String, group: String, color: String?): Flowable<RealmResults<Mount>> {
override fun getMounts(type: String?, group: String?, color: String?): Flowable<RealmResults<Mount>> {
return localRepository.getMounts(type, group, color)
}
@ -94,7 +98,7 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
return localRepository.getPets()
}
override fun getPets(type: String, group: String, color: String?): Flowable<RealmResults<Pet>> {
override fun getPets(type: String?, group: String?, color: String?): Flowable<RealmResults<Pet>> {
return localRepository.getPets(type, group, color)
}
@ -111,7 +115,7 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
}
override fun sellItem(user: User?, type: String, key: String): Flowable<User> {
return localRepository.getOwnedItem(userID, type, key)
return localRepository.getOwnedItem(userID, type, key, true)
.flatMap { item -> sellItem(user, item) }
}
@ -124,6 +128,10 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
return localRepository.getLatestMysteryItem()
}
override fun getItem(type: String, key: String): Flowable<Item> {
return localRepository.getItem(type, key)
}
private fun sellItem(user: User?, item: Item, ownedItem: OwnedItem): Flowable<User> {
if (user != null && appConfigManager.enableLocalChanges()) {
localRepository.executeTransaction {
@ -280,6 +288,10 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
return apiClient.purchaseQuest(key)
}
override fun purchaseSpecialSpell(key: String): Flowable<Any> {
return apiClient.purchaseSpecialSpell(key)
}
override fun purchaseItem(purchaseType: String, key: String, purchaseQuantity: Int): Flowable<Any> {
return apiClient.purchaseItem(purchaseType, key, purchaseQuantity)
}

View file

@ -307,4 +307,12 @@ class TaskRepositoryImpl(localRepository: TaskLocalRepository, apiClient: ApiCli
}
}.toList()
}
override fun unlinkAllTasks(challengeID: String?, keepOption: String): Flowable<Void> {
return apiClient.unlinkAllTasks(challengeID, keepOption)
}
override fun getTasksForChallenge(challengeID: String?): Flowable<RealmResults<Task>> {
return localRepository.getTasksForChallenge(challengeID, userID)
}
}

View file

@ -30,14 +30,15 @@ interface InventoryLocalRepository : ContentLocalRepository {
fun getOwnedEquipment(type: String): Flowable<RealmResults<Equipment>>
fun getItems(itemClass: Class<out Item>, keys: Array<String>, user: User?): Flowable<out RealmResults<out Item>>
fun getOwnedItems(itemType: String, userID: String): Flowable<RealmResults<OwnedItem>>
fun getOwnedItems(userID: String): Flowable<Map<String, OwnedItem>>
fun getItems(itemClass: Class<out Item>, keys: Array<String>): Flowable<out RealmResults<out Item>>
fun getItems(itemClass: Class<out Item>): Flowable<out RealmResults<out Item>>
fun getOwnedItems(itemType: String, userID: String, includeZero: Boolean): Flowable<RealmResults<OwnedItem>>
fun getOwnedItems(userID: String, includeZero: Boolean): Flowable<Map<String, OwnedItem>>
fun getEquipmentType(type: String, set: String): Flowable<RealmResults<Equipment>>
fun getEquipment(key: String): Flowable<Equipment>
fun getMounts(type: String, group: String, color: String?): Flowable<RealmResults<Mount>>
fun getPets(type: String, group: String, color: String?): Flowable<RealmResults<Pet>>
fun getMounts(type: String?, group: String?, color: String?): Flowable<RealmResults<Mount>>
fun getPets(type: String?, group: String?, color: String?): Flowable<RealmResults<Pet>>
fun updateOwnedEquipment(user: User)
@ -45,7 +46,7 @@ interface InventoryLocalRepository : ContentLocalRepository {
fun changeOwnedCount(item: OwnedItem, amountToAdd: Int?)
fun getItem(type: String, key: String): Flowable<Item>
fun getOwnedItem(userID: String, type: String, key: String): Flowable<OwnedItem>
fun getOwnedItem(userID: String, type: String, key: String, includeZero: Boolean): Flowable<OwnedItem>
fun decrementMysteryItemCount(user: User?)
fun saveInAppRewards(onlineItems: List<ShopItem>)

View file

@ -35,4 +35,5 @@ interface TaskLocalRepository : BaseLocalRepository {
fun saveCompletedTodos(userId: String, tasks: MutableCollection<Task>)
fun getErroredTasks(userID: String): Flowable<RealmResults<Task>>
fun getUser(userID: String): Flowable<User>
fun getTasksForChallenge(challengeID: String?, userID: String?): Flowable<RealmResults<Task>>
}

View file

@ -79,10 +79,12 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
.filter { it.isLoaded }
}
override fun getOwnedItems(itemType: String, userID: String): Flowable<RealmResults<OwnedItem>> {
return realm.where(OwnedItem::class.java)
.greaterThan("numberOwned", 0)
.equalTo("itemType", itemType)
override fun getOwnedItems(itemType: String, userID: String, includeZero: Boolean): Flowable<RealmResults<OwnedItem>> {
var query = realm.where(OwnedItem::class.java)
if (!includeZero) {
query = query.greaterThan("numberOwned", 0)
}
return query.equalTo("itemType", itemType)
.equalTo("userID", userID)
.sort("key")
.findAll()
@ -90,15 +92,22 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
.filter { it.isLoaded }
}
override fun getItems(itemClass: Class<out Item>, keys: Array<String>, user: User?): Flowable<out RealmResults<out Item>> {
override fun getItems(itemClass: Class<out Item>, keys: Array<String>): Flowable<out RealmResults<out Item>> {
return realm.where(itemClass).`in`("key", keys).findAll().asFlowable()
.filter { it.isLoaded }
}
override fun getOwnedItems(userID: String): Flowable<Map<String, OwnedItem>> {
return realm.where(OwnedItem::class.java)
.greaterThan("numberOwned", 0)
.equalTo("userID", userID)
override fun getItems(itemClass: Class<out Item>): Flowable<out RealmResults<out Item>> {
return realm.where(itemClass).findAll().asFlowable()
.filter { it.isLoaded }
}
override fun getOwnedItems(userID: String, includeZero: Boolean): Flowable<Map<String, OwnedItem>> {
var query = realm.where(OwnedItem::class.java)
if (!includeZero) {
query = query.greaterThan("numberOwned", 0)
}
return query.equalTo("userID", userID)
.findAll()
.asFlowable()
.map {
@ -128,11 +137,15 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
.filter { it.isLoaded }
}
override fun getMounts(type: String, group: String, color: String?): Flowable<RealmResults<Mount>> {
override fun getMounts(type: String?, group: String?, color: String?): Flowable<RealmResults<Mount>> {
var query = realm.where(Mount::class.java)
.sort("color", Sort.ASCENDING)
.equalTo("type", group)
.equalTo("animal", type)
.sort("type", Sort.ASCENDING, if (color == null) "color" else "animal", Sort.ASCENDING)
if (type != null) {
query = query.equalTo("animal", type)
}
if (group != null) {
query = query.equalTo("type", group)
}
if (color != null) {
query = query.equalTo("color", color)
}
@ -158,11 +171,15 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
.filter { it.isLoaded }
}
override fun getPets(type: String, group: String, color: String?): Flowable<RealmResults<Pet>> {
override fun getPets(type: String?, group: String?, color: String?): Flowable<RealmResults<Pet>> {
var query = realm.where(Pet::class.java)
.sort("color", Sort.ASCENDING)
.equalTo("type", group)
.equalTo("animal", type)
.sort("type", Sort.ASCENDING, if (color == null) "color" else "animal", Sort.ASCENDING)
if (type != null) {
query = query.equalTo("animal", type)
}
if (group != null) {
query = query.equalTo("type", group)
}
if (color != null) {
query = query.equalTo("color", color)
}
@ -185,7 +202,7 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
}
override fun changeOwnedCount(type: String, key: String, userID: String, amountToAdd: Int) {
getOwnedItem(userID, type, key).firstElement().subscribe( Consumer { changeOwnedCount(it, amountToAdd)}, RxErrorHandler.handleEmptyError())
getOwnedItem(userID, type, key, true).firstElement().subscribe( Consumer { changeOwnedCount(it, amountToAdd)}, RxErrorHandler.handleEmptyError())
}
override fun changeOwnedCount(item: OwnedItem, amountToAdd: Int?) {
@ -194,13 +211,15 @@ class RealmInventoryLocalRepository(realm: Realm, private val context: Context)
}
}
override fun getOwnedItem(userID: String, type: String, key: String): Flowable<OwnedItem> {
return realm.where(OwnedItem::class.java)
override fun getOwnedItem(userID: String, type: String, key: String, includeZero: Boolean): Flowable<OwnedItem> {
var query = realm.where(OwnedItem::class.java)
.equalTo("itemType", type)
.equalTo("key", key)
.equalTo("userID", userID)
.greaterThan("numberOwned", 0)
.findFirstAsync()
if (!includeZero) {
query = query.greaterThan("numberOwned", 0)
}
return query.findFirstAsync()
.asFlowable<OwnedItem>()
.filter { realmObject -> realmObject.isLoaded }
}

View file

@ -225,7 +225,8 @@ class RealmTaskLocalRepository(realm: Realm) : RealmBaseLocalRepository(realm),
.findAll()
.asFlowable()
.filter { it.isLoaded }
.retry(1) }
.retry(1)
}
override fun getUser(userID: String): Flowable<User> {
return realm.where(User::class.java)
@ -235,4 +236,14 @@ class RealmTaskLocalRepository(realm: Realm) : RealmBaseLocalRepository(realm),
.filter { realmObject -> realmObject.isLoaded && realmObject.isValid && !realmObject.isEmpty() }
.map { users -> users.first() }
}
override fun getTasksForChallenge(challengeID: String?, userID: String?): Flowable<RealmResults<Task>> {
return realm.where(Task::class.java)
.equalTo("challengeID", challengeID)
.equalTo("userId", userID)
.findAll()
.asFlowable()
.filter { it.isLoaded }
.retry(1)
}
}

View file

@ -9,15 +9,14 @@ fun Animal.getTranslatedType(c: Context?): String {
return type
}
var currType: String = when (type) {
"drop" -> c?.getString(R.string.standard).toString()
"quest" -> c?.getString(R.string.quest).toString()
"wacky" -> c?.getString(R.string.wacky).toString()
"special" -> c?.getString(R.string.special).toString()
return when (type) {
"drop" -> c.getString(R.string.standard)
"quest" -> c.getString(R.string.quest)
"wacky" -> c.getString(R.string.wacky)
"special" -> c.getString(R.string.special)
"premium" -> c.getString(R.string.magic_potion)
else -> {
type
}
}
return currType
}

View file

@ -12,6 +12,7 @@ import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.UnsupportedEncodingException
import java.lang.IllegalStateException
import java.math.BigInteger
import java.security.*
import java.util.*
@ -188,6 +189,8 @@ constructor(ctx: Context, var sharedPreferences: SharedPreferences, var keyStore
null
} catch (e: GeneralSecurityException) {
null
} catch (e: IllegalStateException) {
null
}
}

View file

@ -5,7 +5,9 @@ import android.content.Intent
import com.habitrpg.android.habitica.HabiticaBaseApplication
import com.habitrpg.android.habitica.proxy.CrashlyticsProxy
import org.solovyev.android.checkout.*
import java.lang.NullPointerException
import java.util.*
import javax.annotation.Nonnull
class PurchaseHandler(activity: Activity, val crashlyticsProxy: CrashlyticsProxy) {
private val billing = HabiticaBaseApplication.getInstance(activity.applicationContext)?.billing
@ -73,20 +75,29 @@ class PurchaseHandler(activity: Activity, val crashlyticsProxy: CrashlyticsProxy
}
private fun getProduct(type: String, identifiers: List<String>, onSuccess: ((Inventory.Product) -> Unit)) {
inventory?.load(Inventory.Request.create()
.loadAllPurchases().loadSkus(type, identifiers)) { products ->
loadInventory(type, identifiers, Inventory.Callback { products ->
val purchases = products.get(type)
if (!purchases.supported) return@load
if (!purchases.supported) return@Callback
onSuccess(purchases)
}
})
}
private fun getSKU(type: String, identifier: String, onSuccess: ((Sku) -> Unit)) {
inventory?.load(Inventory.Request.create()
.loadAllPurchases().loadSkus(type, listOf(identifier))) { products ->
loadInventory(type, listOf(identifier), Inventory.Callback { products ->
val purchases = products.get(type)
if (!purchases.supported) return@load
if (!purchases.supported) return@Callback
purchases.skus.firstOrNull()?.let { onSuccess(it) }
})
}
private fun loadInventory(type: String, skus: List<String>, callback: Inventory.Callback) {
val request = Inventory.Request.create().loadAllPurchases().loadSkus(type, skus)
if (request != null) {
try {
inventory?.load(request, callback)
} catch (e: NullPointerException) {
return
}
}
}

View file

@ -1,35 +0,0 @@
package com.habitrpg.android.habitica.helpers.notifications;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.habitrpg.android.habitica.HabiticaApplication;
import java.util.Objects;
import javax.inject.Inject;
/**
* Created by keithholliday on 6/24/16.
*/
public class HabiticaFirebaseMessagingService extends FirebaseMessagingService {
@Inject
public PushNotificationManager pushNotificationManager;
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Objects.requireNonNull(HabiticaApplication.Companion.getUserComponent()).inject(this);
pushNotificationManager.displayNotification(remoteMessage);
}
@Override
public void onNewToken(String s) {
super.onNewToken(s);
Objects.requireNonNull(HabiticaApplication.Companion.getUserComponent()).inject(this);
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
if (refreshedToken != null) {
pushNotificationManager.setRefreshedToken(refreshedToken);
}
}
}

View file

@ -0,0 +1,35 @@
package com.habitrpg.android.habitica.helpers.notifications
import com.google.firebase.iid.FirebaseInstanceId
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import com.habitrpg.android.habitica.HabiticaApplication
import com.habitrpg.android.habitica.HabiticaBaseApplication
import com.habitrpg.android.habitica.components.UserComponent
import java.util.*
import javax.inject.Inject
class HabiticaFirebaseMessagingService : FirebaseMessagingService() {
private val userComponent: UserComponent?
get() = HabiticaBaseApplication.userComponent
@Inject
internal lateinit var pushNotificationManager: PushNotificationManager
override fun onMessageReceived(remoteMessage: RemoteMessage) {
userComponent?.inject(this)
if (this::pushNotificationManager.isInitialized) {
pushNotificationManager.displayNotification(remoteMessage)
}
}
override fun onNewToken(s: String) {
super.onNewToken(s)
userComponent?.inject(this)
val refreshedToken = FirebaseInstanceId.getInstance().token
if (refreshedToken != null && this::pushNotificationManager.isInitialized) {
pushNotificationManager.refreshedToken = refreshedToken
}
}
}

View file

@ -0,0 +1,7 @@
package com.habitrpg.android.habitica.models.inventory
class StableSection(val key: Any?, val text: String) {
var ownedCount = 0
var totalCount = 0
}

View file

@ -57,7 +57,7 @@ open class ShopItem : RealmObject() {
var level: Int? = null
val isTypeItem: Boolean
get() = "eggs" == purchaseType || "hatchingPotions" == purchaseType || "food" == purchaseType || "armoire" == purchaseType || "potion" == purchaseType
get() = "eggs" == purchaseType || "hatchingPotions" == purchaseType || "food" == purchaseType || "armoire" == purchaseType || "potion" == purchaseType || "debuffPotion" == purchaseType
val isTypeQuest: Boolean
get() = "quests" == purchaseType

View file

@ -1,6 +1,7 @@
package com.habitrpg.android.habitica.ui.activities
import android.graphics.Paint
import android.graphics.PorterDuff
import android.os.Build
import android.os.Bundle
import android.text.Html
@ -94,6 +95,9 @@ class AdventureGuideActivity : BaseActivity() {
val completed = achievements.count { it.earned }
binding.progressBar.max = achievements.size
binding.progressBar.progress = completed
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {
binding.progressBar.progressBackgroundTintMode = PorterDuff.Mode.SRC_OVER
}
if (completed > 0) {
binding.progressTextview.text = getString(R.string.percent_completed, ((completed / achievements.size.toFloat()) * 100).toInt())

View file

@ -460,6 +460,11 @@ class ChallengeFormActivity : BaseActivity() {
Task.TYPE_TODO -> addTodo
else -> addReward
}
if(!isExistingTask){
// If the task is new we create a unique id for it
// Doing it we solve the issue #1278
task.id = UUID.randomUUID().toString()
}
challengeTasks.addTaskUnder(task, taskAbove)

View file

@ -31,6 +31,7 @@ import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.GoogleApiAvailability
import com.google.android.gms.common.GooglePlayServicesUtil
import com.google.android.gms.common.Scopes
import com.google.firebase.analytics.FirebaseAnalytics
import com.habitrpg.android.habitica.BuildConfig
import com.habitrpg.android.habitica.HabiticaBaseApplication
import com.habitrpg.android.habitica.R
@ -369,6 +370,10 @@ class LoginActivity : BaseActivity(), Consumer<UserAuthResponse> {
HabiticaBaseApplication.reloadUserComponent()
if (isRegistering) {
FirebaseAnalytics.getInstance(this).logEvent("user_registered", null)
}
compositeSubscription.add(userRepository.retrieveUser(true)
.subscribe(Consumer {
if (userAuthResponse.newUser) {

View file

@ -22,6 +22,8 @@ import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.core.content.FileProvider
import androidx.core.content.edit
import androidx.lifecycle.ViewModelProviders
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.navigation.findNavController
import com.facebook.drawee.view.SimpleDraweeView
import com.google.firebase.analytics.FirebaseAnalytics
@ -133,7 +135,7 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
private var sideAvatarView: AvatarView? = null
private var activeTutorialView: TutorialView? = null
private var drawerFragment: NavigationDrawerFragment? = null
private var drawerToggle: ActionBarDrawerToggle? = null
var drawerToggle: ActionBarDrawerToggle? = null
private var resumeFromActivity = false
private var userIsOnQuest = false
@ -159,7 +161,11 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
@SuppressLint("ObsoleteSdkInt")
public override fun onCreate(savedInstanceState: Bundle?) {
launchTrace = FirebasePerformance.getInstance().newTrace("MainActivityLaunch")
try {
launchTrace = FirebasePerformance.getInstance().newTrace("MainActivityLaunch")
} catch (_: IllegalStateException) {
}
launchTrace?.start()
super.onCreate(savedInstanceState)
@ -207,13 +213,8 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
supportActionBar?.setHomeButtonEnabled(true)
val navigationController = findNavController(R.id.nav_host_fragment)
navigationController.addOnDestinationChangedListener { _, destination, _ ->
if (destination.label.isNullOrEmpty() && user?.isValid == true) {
binding.toolbarTitle.text = user?.profile?.name
} else if (user?.isValid == true && user?.profile != null) {
binding.toolbarTitle.text = destination.label
}
drawerFragment?.setSelection(destination.id, null, false)
navigationController.addOnDestinationChangedListener { _, destination, arguments ->
updateToolbarTitle(destination, arguments)
}
MainNavigationController.setup(navigationController)
@ -227,6 +228,33 @@ 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) {
arguments?.getString("type")
} else if (destination.label.isNullOrEmpty() && user?.isValid == true) {
user?.profile?.name
} else if (user?.isValid == true && user?.profile != null) {
destination.label
} else {
""
}
if (destination.id == R.id.petDetailRecyclerFragment || destination.id == R.id.mountDetailRecyclerFragment) {
compositeSubscription.add(inventoryRepository.getItem("egg", arguments?.getString("type") ?: "").firstElement().subscribe(Consumer {
binding.toolbarTitle.text = if (destination.id == R.id.petDetailRecyclerFragment) {
(it as? Egg)?.text
} else {
(it as? Egg)?.mountText
}
}, RxErrorHandler.handleEmptyError()))
}
drawerFragment?.setSelection(destination.id, null, false)
}
override fun onSupportNavigateUp(): Boolean {
onBackPressed()
return true
}
private fun setupNotifications() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channelId = "default"
@ -358,11 +386,15 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
val quest = user?.party?.quest
if (quest?.completed?.isNotBlank() == true) {
compositeSubscription.add(inventoryRepository.getQuestContent(user?.party?.quest?.completed ?: "").firstElement().subscribe {
compositeSubscription.add(inventoryRepository.getQuestContent(user?.party?.quest?.completed ?: "").firstElement().subscribe(Consumer {
QuestCompletedDialog.showWithQuest(this, it)
userRepository.updateUser(user, "party.quest.completed", "").subscribe(Consumer {}, RxErrorHandler.handleEmptyError())
})
}, RxErrorHandler.handleEmptyError()))
}
if (user?.flags?.welcomed == false) {
compositeSubscription.add(userRepository.updateUser(user, "flags.welcomed", true).subscribe(Consumer {}, RxErrorHandler.handleEmptyError()))
}
if (appConfigManager.enableAdventureGuide()) {

View file

@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Typeface
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.os.Handler
@ -19,11 +20,10 @@ import androidx.core.content.ContextCompat
import androidx.core.view.children
import androidx.core.view.forEachIndexed
import androidx.core.widget.NestedScrollView
import com.google.android.material.textfield.TextInputLayout
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.components.UserComponent
import com.habitrpg.android.habitica.data.TagRepository
import com.habitrpg.android.habitica.data.TaskRepository
import com.habitrpg.android.habitica.data.UserRepository
import com.habitrpg.android.habitica.data.*
import com.habitrpg.android.habitica.extensions.OnChangeTextWatcher
import com.habitrpg.android.habitica.extensions.addCancelButton
import com.habitrpg.android.habitica.extensions.dpToPx
@ -31,6 +31,7 @@ import com.habitrpg.android.habitica.extensions.getThemeColor
import com.habitrpg.android.habitica.helpers.RxErrorHandler
import com.habitrpg.android.habitica.helpers.TaskAlarmManager
import com.habitrpg.android.habitica.models.Tag
import com.habitrpg.android.habitica.models.social.Challenge
import com.habitrpg.android.habitica.models.tasks.HabitResetOption
import com.habitrpg.android.habitica.models.tasks.Task
import com.habitrpg.android.habitica.models.user.Stats
@ -55,11 +56,15 @@ class TaskFormActivity : BaseActivity() {
lateinit var tagRepository: TagRepository
@Inject
lateinit var taskAlarmManager: TaskAlarmManager
@Inject
lateinit var challengeRepository: ChallengeRepository
private val toolbar: Toolbar by bindView(R.id.toolbar)
private val scrollView: NestedScrollView by bindView(R.id.scroll_view)
private val upperTextWrapper: LinearLayout by bindView(R.id.upper_text_wrapper)
private val textInputLayout: TextInputLayout by bindView(R.id.text_input_layout)
private val textEditText: EditText by bindView(R.id.text_edit_text)
private val notesInputLayout: TextInputLayout by bindView(R.id.notes_input_layout)
private val notesEditText: EditText by bindView(R.id.notes_edit_text)
private val habitScoringButtons: HabitScoringButtonsView by bindView(R.id.habit_scoring_buttons)
private val checklistTitleView: TextView by bindView(R.id.checklist_title)
@ -90,6 +95,10 @@ class TaskFormActivity : BaseActivity() {
private val tagsTitleView: TextView by bindView(R.id.tags_title)
private val tagsWrapper: LinearLayout by bindView(R.id.tags_wrapper)
private val challengeNameView: TextView by bindView(R.id.challenge_name_view)
private var challenge: Challenge? = null
private var isCreating = true
private var isChallengeTask = false
private var usesTaskAttributeStats = false
@ -109,12 +118,10 @@ class TaskFormActivity : BaseActivity() {
private var tintColor: Int = 0
set(value) {
field = value
upperTextWrapper.setBackgroundColor(value)
taskDifficultyButtons.tintColor = value
habitScoringButtons.tintColor = value
habitResetStreakButtons.tintColor = value
taskSchedulingControls.tintColor = value
supportActionBar?.setBackgroundDrawable(ColorDrawable(value))
updateTagViewsColors()
}
@ -144,12 +151,22 @@ class TaskFormActivity : BaseActivity() {
} else {
"purple"
}
super.onCreate(savedInstanceState)
if (forcedTheme == "yellow") {
taskDifficultyButtons.textTintColor = ContextCompat.getColor(this, R.color.yellow_5)
habitScoringButtons.textTintColor = ContextCompat.getColor(this, R.color.yellow_5)
}
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowHomeEnabled(true)
tintColor = getThemeColor(R.attr.taskFormTint)
val upperTintColor = getThemeColor(R.attr.colorAccent)
supportActionBar?.setBackgroundDrawable(ColorDrawable(upperTintColor))
upperTextWrapper.setBackgroundColor(upperTintColor)
isChallengeTask = bundle.getBoolean(IS_CHALLENGE_TASK, false)
@ -163,7 +180,7 @@ class TaskFormActivity : BaseActivity() {
setTagViews()
}, RxErrorHandler.handleEmptyError()))
compositeSubscription.add(userRepository.getUser().subscribe(Consumer {
usesTaskAttributeStats = it.preferences?.allocationMode == "taskbased"
usesTaskAttributeStats = it.preferences?.allocationMode == "taskbased" && it.preferences?.automaticAllocation == true
configureForm()
}, RxErrorHandler.handleEmptyError()))
@ -171,6 +188,12 @@ class TaskFormActivity : BaseActivity() {
textEditText.addTextChangedListener(OnChangeTextWatcher { _, _, _, _ ->
checkCanSave()
})
textEditText.onFocusChangeListener = View.OnFocusChangeListener { view, isFocused ->
textInputLayout.alpha = if (isFocused) 1.0f else 0.75f
}
notesEditText.onFocusChangeListener = View.OnFocusChangeListener { view, isFocused ->
notesInputLayout.alpha = if (isFocused) 1.0f else 0.75f
}
statStrengthButton.setOnClickListener { selectedStat = Stats.STRENGTH }
statIntelligenceButton.setOnClickListener { selectedStat = Stats.INTELLIGENCE }
statConstitutionButton.setOnClickListener { selectedStat = Stats.CONSTITUTION }
@ -193,6 +216,13 @@ class TaskFormActivity : BaseActivity() {
task = it
//tintColor = ContextCompat.getColor(this, it.mediumTaskColor)
fillForm(it)
task?.challengeID?.let {
compositeSubscription.add(challengeRepository.retrieveChallenge(it).subscribe(Consumer {
challenge = it
challengeNameView.text = getString(R.string.challenge_task_name, it.name)
challengeNameView.visibility = View.VISIBLE
}, RxErrorHandler.handleEmptyError()))
}
}, RxErrorHandler.handleEmptyError()))
}
bundle.containsKey(PARCELABLE_TASK) -> {
@ -210,6 +240,11 @@ class TaskFormActivity : BaseActivity() {
configureForm()
}
override fun onStart() {
super.onStart()
textEditText.requestFocus()
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
if (isCreating) {
menuInflater.inflate(R.menu.menu_task_create, menu)
@ -373,6 +408,11 @@ class TaskFormActivity : BaseActivity() {
button.background.setTint(if (isSelected) tintColor else ContextCompat.getColor(this, R.color.taskform_gray))
val textColorID = if (isSelected) R.color.white else R.color.gray_100
button.setTextColor(ContextCompat.getColor(this, textColorID))
if (isSelected) {
button.typeface = Typeface.create("sans-serif-medium", Typeface.NORMAL)
} else {
button.typeface = Typeface.create("sans-serif", Typeface.NORMAL)
}
}
private fun updateTagViewsColors() {
@ -464,6 +504,10 @@ class TaskFormActivity : BaseActivity() {
}
private fun deleteTask() {
if (task?.challengeID?.isNotBlank() == true && task?.challengeBroken?.isNotBlank() != true) {
showChallengeDeleteTask()
return
}
val alert = HabiticaAlertDialog(this)
alert.setTitle(R.string.are_you_sure)
alert.addButton(R.string.delete_task, true) { _, _ ->
@ -476,6 +520,36 @@ class TaskFormActivity : BaseActivity() {
alert.show()
}
private fun showChallengeDeleteTask() {
compositeSubscription.add(taskRepository.getTasksForChallenge(task?.challengeID).firstElement().subscribe(Consumer { tasks ->
val taskCount = tasks.size
val alert = HabiticaAlertDialog(this)
alert.setTitle(getString(R.string.delete_challenge_task_title))
alert.setMessage(getString(R.string.delete_challenge_task_description, taskCount, challenge?.name ?: ""))
alert.addButton(R.string.leave_delete_task, true, true) { _, _ ->
challenge?.let {
compositeSubscription.add(challengeRepository.leaveChallenge(it, "keep-all")
.flatMap { taskRepository.deleteTask(task?.id ?: "") }
.flatMap { userRepository.retrieveUser(true) }
.subscribe(Consumer {
finish()
}, RxErrorHandler.handleEmptyError()))
}
}
alert.addButton(getString(R.string.leave_delete_x_tasks, taskCount), false, true) { _, _ ->
challenge?.let {
compositeSubscription.add(challengeRepository.leaveChallenge(it, "remove-all")
.flatMap { userRepository.retrieveUser(true) }
.subscribe(Consumer {
finish()
}, RxErrorHandler.handleEmptyError()))
}
}
alert.setExtraCloseButtonVisibility(View.VISIBLE)
alert.show()
}, RxErrorHandler.handleEmptyError()))
}
private fun dismissKeyboard() {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager
val currentFocus = currentFocus

View file

@ -65,6 +65,8 @@ class CustomizationEquipmentRecyclerViewAdapter : androidx.recyclerview.widget.R
fun setEquipment(newEquipmentList: List<Equipment>) {
this.equipmentList = newEquipmentList.toMutableList()
val emptyEquipment = Equipment()
equipmentList.add(0, emptyEquipment)
this.notifyDataSetChanged()
}
@ -104,7 +106,7 @@ class CustomizationEquipmentRecyclerViewAdapter : androidx.recyclerview.widget.R
}
}
if (activeEquipment == equipment.key) {
if (activeEquipment == equipment.key || (activeEquipment?.contains("base_0") == true && equipment.key?.isNotBlank() != true)) {
binding.wrapper.background = itemView.context.getDrawable(R.drawable.layout_rounded_bg_gray_700_brand_border)
} else {
binding.wrapper.background = itemView.context.getDrawable(R.drawable.layout_rounded_bg_gray_700)

View file

@ -1,107 +1,52 @@
package com.habitrpg.android.habitica.ui.adapter.inventory
import android.content.Context
import android.content.res.Resources
import android.graphics.drawable.BitmapDrawable
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.facebook.drawee.view.SimpleDraweeView
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.extensions.inflate
import com.habitrpg.android.habitica.helpers.RxErrorHandler
import com.habitrpg.android.habitica.models.inventory.Mount
import com.habitrpg.android.habitica.models.inventory.StableSection
import com.habitrpg.android.habitica.models.user.OwnedMount
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
import com.habitrpg.android.habitica.ui.helpers.bindView
import com.habitrpg.android.habitica.ui.menu.BottomSheetMenu
import com.habitrpg.android.habitica.ui.menu.BottomSheetMenuItem
import com.habitrpg.android.habitica.ui.viewHolders.MountViewHolder
import com.habitrpg.android.habitica.ui.viewHolders.SectionViewHolder
import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.subjects.PublishSubject
import io.realm.OrderedRealmCollection
import io.realm.RealmRecyclerViewAdapter
class MountDetailRecyclerAdapter(data: OrderedRealmCollection<Mount>?, autoUpdate: Boolean) : RealmRecyclerViewAdapter<Mount, MountDetailRecyclerAdapter.MountViewHolder>(data, autoUpdate) {
var itemType: String? = null
var context: Context? = null
class MountDetailRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>() {
private var ownedMounts: Map<String, OwnedMount>? = null
private val equipEvents = PublishSubject.create<String>()
private var itemList: List<Any> = ArrayList()
fun setItemList(itemList: List<Any>) {
this.itemList = itemList
this.notifyDataSetChanged()
}
fun getEquipFlowable(): Flowable<String> {
return equipEvents.toFlowable(BackpressureStrategy.DROP)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MountViewHolder {
return MountViewHolder(parent.inflate(R.layout.mount_overview_item))
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): androidx.recyclerview.widget.RecyclerView.ViewHolder =
when (viewType) {
1 -> SectionViewHolder(parent)
else -> MountViewHolder(parent, equipEvents)
}
override fun onBindViewHolder(holder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int) {
when (val obj = this.itemList[position]) {
is StableSection -> (holder as? SectionViewHolder)?.bind(obj)
is Mount -> (holder as? MountViewHolder)?.bind(obj, ownedMounts?.get(obj.key ?: "")?.owned == true)
}
}
override fun onBindViewHolder(holder: MountViewHolder, position: Int) {
data?.let { holder.bind(it[position], ownedMounts?.get(it[position].key)) }
}
override fun getItemViewType(position: Int): Int = if (itemList[position] is StableSection) 1 else 2
override fun getItemCount(): Int = itemList.size
fun setOwnedMounts(ownedMounts: Map<String, OwnedMount>) {
this.ownedMounts = ownedMounts
notifyDataSetChanged()
}
inner class MountViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView), View.OnClickListener {
var animal: Mount? = null
private var ownedMount: OwnedMount? = null
private val imageView: SimpleDraweeView by bindView(R.id.imageView)
private val titleView: TextView by bindView(R.id.titleTextView)
private val ownedTextView: TextView by bindView(R.id.ownedTextView)
var resources: Resources = itemView.resources
init {
itemView.setOnClickListener(this)
}
fun bind(item: Mount, ownedMount: OwnedMount?) {
animal = item
this.ownedMount = ownedMount
titleView.text = when {
item.color == "Veggie" -> context?.getString(R.string.garden)
item.type == "special" ->item.text
else -> item.color
}
ownedTextView.visibility = View.GONE
val imageName = "Mount_Icon_" + itemType + "-" + item.color
this.imageView.alpha = 1.0f
if (ownedMount?.owned != true) {
this.imageView.alpha = 0.1f
}
imageView.background = null
val owned = ownedMount?.owned ?: false
DataBindingUtils.loadImage(imageName) {
val drawable = BitmapDrawable(context?.resources, if (owned) it else it.extractAlpha())
Observable.just(drawable)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
imageView.background = drawable
}, RxErrorHandler.handleEmptyError())
}
}
override fun onClick(v: View) {
if (ownedMount?.owned != true) {
return
}
val menu = BottomSheetMenu(itemView.context)
menu.addMenuItem(BottomSheetMenuItem(resources.getString(R.string.equip)))
menu.setSelectionRunnable {
animal?.let { equipEvents.onNext(it.key) }
}
menu.show()
}
}
}

View file

@ -1,58 +1,86 @@
package com.habitrpg.android.habitica.ui.adapter.inventory
import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import android.widget.TextView
import com.facebook.drawee.view.SimpleDraweeView
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.events.commands.FeedCommand
import com.habitrpg.android.habitica.extensions.inflate
import com.habitrpg.android.habitica.helpers.RxErrorHandler
import com.habitrpg.android.habitica.models.inventory.Mount
import com.habitrpg.android.habitica.models.inventory.Pet
import com.habitrpg.android.habitica.models.inventory.*
import com.habitrpg.android.habitica.models.user.OwnedItem
import com.habitrpg.android.habitica.models.user.OwnedMount
import com.habitrpg.android.habitica.models.user.OwnedPet
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
import com.habitrpg.android.habitica.ui.helpers.bindView
import com.habitrpg.android.habitica.ui.menu.BottomSheetMenu
import com.habitrpg.android.habitica.ui.menu.BottomSheetMenuItem
import com.habitrpg.android.habitica.ui.viewHolders.PetViewHolder
import com.habitrpg.android.habitica.ui.viewHolders.SectionViewHolder
import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.subjects.PublishSubject
import io.realm.OrderedRealmCollection
import io.realm.RealmRecyclerViewAdapter
import io.realm.RealmResults
import org.greenrobot.eventbus.EventBus
class PetDetailRecyclerAdapter(data: OrderedRealmCollection<Pet>?, autoUpdate: Boolean) : RealmRecyclerViewAdapter<Pet, PetDetailRecyclerAdapter.PetViewHolder>(data, autoUpdate) {
var itemType: String? = null
var context: Context? = null
class PetDetailRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>() {
private var existingMounts: RealmResults<Mount>? = null
private var ownedPets: Map<String, OwnedPet>? = null
private var ownedMounts: Map<String, OwnedMount>? = null
private var ownedItems: Map<String, OwnedItem>? = null
private val equipEvents = PublishSubject.create<String>()
private var ownsSaddles: Boolean = false
private var itemList: List<Any> = ArrayList()
fun setItemList(itemList: List<Any>) {
this.itemList = itemList
this.notifyDataSetChanged()
}
fun getEquipFlowable(): Flowable<String> {
return equipEvents.toFlowable(BackpressureStrategy.DROP)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PetViewHolder {
return PetViewHolder(parent.inflate(R.layout.pet_detail_item))
var animalIngredientsRetriever: ((Animal) -> Pair<Egg?, HatchingPotion?>)? = null
private fun canRaiseToMount(pet: Pet): Boolean {
for (mount in existingMounts ?: emptyList<Mount>()) {
if (mount.key == pet.key) {
return !(ownedMounts?.get(mount.key)?.owned ?: false)
}
}
return false
}
override fun onBindViewHolder(holder: PetViewHolder, position: Int) {
data?.let {
holder.bind(it[position], ownedPets?.get(it[position]?.key ?: ""))
private fun eggCount(pet: Pet): Int {
return ownedItems?.get(pet.animal + "-eggs")?.numberOwned ?: 0
}
private fun potionCount(pet: Pet): Int {
return ownedItems?.get(pet.color + "-hatchingPotions")?.numberOwned ?: 0
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): androidx.recyclerview.widget.RecyclerView.ViewHolder =
when (viewType) {
1 -> SectionViewHolder(parent)
else -> PetViewHolder(parent, equipEvents, animalIngredientsRetriever)
}
override fun onBindViewHolder(holder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int) {
when (val obj = this.itemList[position]) {
is StableSection -> {
(holder as? SectionViewHolder)?.bind(obj)
}
is Pet -> {
(holder as? PetViewHolder)?.bind(obj,
ownedPets?.get(obj.key ?: "")?.trained ?: 0,
eggCount(obj),
potionCount(obj),
canRaiseToMount(obj),
ownsSaddles,
ownedItems?.get(obj.animal + "-eggs") != null,
ownedItems?.get(obj.color + "-hatchingPotions") != null,
ownedMounts?.containsKey(obj.key) == true
)
}
}
}
override fun getItemViewType(position: Int): Int = if (itemList[position] is StableSection) 1 else 2
override fun getItemCount(): Int = itemList.size
fun setExistingMounts(existingMounts: RealmResults<Mount>) {
this.existingMounts = existingMounts
notifyDataSetChanged()
@ -67,80 +95,15 @@ class PetDetailRecyclerAdapter(data: OrderedRealmCollection<Pet>?, autoUpdate: B
this.ownedPets = ownedPets
notifyDataSetChanged()
}
inner class PetViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView), View.OnClickListener {
var animal: Pet? = null
var ownedPet: OwnedPet? = null
private val imageView: SimpleDraweeView by bindView(R.id.imageView)
private val trainedProgressbar: ProgressBar by bindView(R.id.trainedProgressBar)
fun setOwnedItems(ownedItems: Map<String, OwnedItem>) {
this.ownedItems = ownedItems
ownsSaddles = ownedItems.containsKey("Saddle-food")
notifyDataSetChanged()
}
private val isOwned: Boolean
get() = this.ownedPet?.trained ?: 0 > 0
private val canRaiseToMount: Boolean
get() {
for (mount in existingMounts ?: emptyList<Mount>()) {
if (mount.key == animal?.key) {
return !(ownedMounts?.get(mount.key)?.owned ?: false)
}
}
return false
}
init {
itemView.setOnClickListener(this)
}
fun bind(item: Pet, ownedPet: OwnedPet?) {
this.animal = item
this.ownedPet = ownedPet
this.imageView.alpha = 1.0f
val imageName = "social_Pet-$itemType-${item.color}"
if (this.ownedPet?.trained ?: 0 > 0) {
if (this.canRaiseToMount) {
this.trainedProgressbar.visibility = View.VISIBLE
this.trainedProgressbar.progress = ownedPet?.trained ?: 0
} else {
this.trainedProgressbar.visibility = View.GONE
}
} else {
this.trainedProgressbar.visibility = View.GONE
this.imageView.alpha = 0.1f
}
imageView.background = null
val trained = ownedPet?.trained ?: 0
DataBindingUtils.loadImage(imageName) {
val drawable = BitmapDrawable(context?.resources, if (trained == 0) it.extractAlpha() else it)
Observable.just(drawable)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
imageView.background = drawable
}, RxErrorHandler.handleEmptyError())
}
}
override fun onClick(v: View) {
if (!this.isOwned) {
return
}
val context = context ?: return
val menu = BottomSheetMenu(context)
menu.addMenuItem(BottomSheetMenuItem(itemView.resources.getString(R.string.equip)))
if (canRaiseToMount) {
menu.addMenuItem(BottomSheetMenuItem(itemView.resources.getString(R.string.feed)))
}
menu.setSelectionRunnable { index ->
if (index == 0) {
animal?.let {
equipEvents.onNext(it.key)
}
} else if (index == 1) {
val event = FeedCommand()
event.usingPet = animal
EventBus.getDefault().post(event)
}
}
menu.show()
}
fun setOwnsSaddles(ownsSaddles: Boolean) {
this.ownsSaddles = ownsSaddles
notifyDataSetChanged()
}
}

View file

@ -84,18 +84,9 @@ class ShopRecyclerAdapter(private val configManager: AppConfigManager) : android
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): androidx.recyclerview.widget.RecyclerView.ViewHolder =
when (viewType) {
0 -> {
val view = parent.inflate(R.layout.shop_header)
ShopHeaderViewHolder(view)
}
1 -> {
val view = parent.inflate(R.layout.shop_section_header)
SectionViewHolder(view)
}
2 -> {
val view = parent.inflate(emptyViewResource)
EmptyStateViewHolder(view)
}
0 -> ShopHeaderViewHolder(parent)
1 -> SectionViewHolder(parent.inflate(R.layout.shop_section_header))
2 -> EmptyStateViewHolder(parent.inflate(emptyViewResource))
else -> {
val view = parent.inflate(R.layout.row_shopitem)
val viewHolder = ShopItemViewHolder(view)
@ -221,7 +212,7 @@ class ShopRecyclerAdapter(private val configManager: AppConfigManager) : android
this.notifyDataSetChanged()
}
internal class ShopHeaderViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
internal class ShopHeaderViewHolder(parent: ViewGroup) : androidx.recyclerview.widget.RecyclerView.ViewHolder(parent.inflate(R.layout.shop_header)) {
private val descriptionView: TextView by bindView(itemView, R.id.descriptionView)
private val npcBannerView: NPCBannerView by bindView(itemView, R.id.npcBannerView)

View file

@ -1,35 +1,39 @@
package com.habitrpg.android.habitica.ui.adapter.inventory
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.BitmapDrawable
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.facebook.drawee.view.SimpleDraweeView
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.databinding.ShopHeaderBinding
import com.habitrpg.android.habitica.extensions.inflate
import com.habitrpg.android.habitica.helpers.MainNavigationController
import com.habitrpg.android.habitica.helpers.RxErrorHandler
import com.habitrpg.android.habitica.models.inventory.Animal
import com.habitrpg.android.habitica.ui.activities.MainActivity
import com.habitrpg.android.habitica.models.inventory.*
import com.habitrpg.android.habitica.ui.fragments.inventory.stable.StableFragmentDirections
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
import com.habitrpg.android.habitica.ui.helpers.bindView
import com.habitrpg.android.habitica.ui.helpers.loadImage
import com.habitrpg.android.habitica.ui.viewHolders.MountViewHolder
import com.habitrpg.android.habitica.ui.viewHolders.PetViewHolder
import com.habitrpg.android.habitica.ui.viewHolders.SectionViewHolder
import com.habitrpg.android.habitica.ui.views.NPCBannerView
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.subjects.PublishSubject
class StableRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>() {
class StableRecyclerAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
var shopSpriteSuffix: String? = null
private var eggs: Map<String, Egg> = mapOf()
var animalIngredientsRetriever: ((Animal) -> Pair<Egg?, HatchingPotion?>)? = null
var itemType: String? = null
var context: Context? = null
var activity: MainActivity? = null
private val equipEvents = PublishSubject.create<String>()
fun getEquipFlowable(): Flowable<String> {
return equipEvents.toFlowable(BackpressureStrategy.DROP)
}
private var itemList: List<Any> = ArrayList()
@ -38,72 +42,96 @@ class StableRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<
this.notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): androidx.recyclerview.widget.RecyclerView.ViewHolder =
if (viewType == 0) {
val view = parent.inflate(R.layout.shop_header)
StableHeaderViewHolder(view)
} else if (viewType == 1) {
val view = parent.inflate(R.layout.customization_section_header)
SectionViewHolder(view)
} else if (viewType == 2) {
val view = parent.inflate(R.layout.pet_overview_item)
StableViewHolder(view)
} else {
val view = parent.inflate(R.layout.mount_overview_item)
StableViewHolder(view)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder =
when (viewType) {
1 -> SectionViewHolder(parent)
4 -> StableViewHolder(parent.inflate(R.layout.pet_overview_item))
5 -> StableViewHolder(parent.inflate(R.layout.mount_overview_item))
2 -> PetViewHolder(parent, equipEvents, animalIngredientsRetriever)
3 -> MountViewHolder(parent, equipEvents)
else -> StableHeaderViewHolder(parent)
}
override fun onBindViewHolder(holder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int) {
val obj = this.itemList[position]
if (obj == "header") {
(holder as? StableHeaderViewHolder)?.bind()
} else if (obj.javaClass == String::class.java) {
if (obj == "Standard") {
var params = holder.itemView.layoutParams as GridLayoutManager.LayoutParams
params.height = 135
holder.itemView.layoutParams = params
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (val item = this.itemList[position]) {
"header" -> (holder as? StableHeaderViewHolder)?.bind()
is StableSection -> {
if (item.key == "drop") {
val params = holder.itemView.layoutParams as GridLayoutManager.LayoutParams
params.topMargin = -30
holder.itemView.layoutParams = params
}
(holder as? SectionViewHolder)?.bind(item)
}
is Animal -> {
val isIndividualAnimal = item.type == "special" || item.type == "wacky"
if (isIndividualAnimal) {
if (item is Pet) {
(holder as? PetViewHolder)?.bind(item,
item.numberOwned,
canRaiseToMount = false,
eggCount = 0,
potionCount = 0,
ownsSaddles = false,
hasUnlockedEgg = false,
hasUnlockedPotion = false,
hasMount = false)
} else if (item is Mount) {
(holder as? MountViewHolder)?.bind(item, item.numberOwned > 0)
}
return
}
(holder as? StableViewHolder)?.bind(item)
}
(holder as? SectionViewHolder)?.bind(obj as? String ?: "")
} else {
(obj as? Animal)?.let { (holder as? StableViewHolder)?.bind(it) }
}
}
override fun getItemViewType(position: Int): Int {
var item = itemList[position]
val item = itemList[position]
return if (item == "header") {
0
}
else if (item.javaClass == String::class.java) {
} else if (item is StableSection) {
1
}
else if (itemType == "pets") {
2
}
else {
3
} else if (item is Animal) {
val isIndividualAnimal = item.type == "special" || item.type == "wacky"
if (isIndividualAnimal) {
if (itemType == "pets") {
2
} else {
3
}
} else {
if (itemType == "pets") {
4
} else {
5
}
}
} else {
0
}
}
override fun getItemCount(): Int = itemList.size
fun setEggs(eggs: Map<String, Egg>) {
this.eggs = eggs
notifyDataSetChanged()
}
internal class StableHeaderViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
internal inner class StableHeaderViewHolder(parent: ViewGroup) : RecyclerView.ViewHolder(parent.inflate(R.layout.shop_header)) {
private val npcBannerView: NPCBannerView by bindView(itemView, R.id.npcBannerView)
private val namePlate: TextView by bindView(itemView, R.id.namePlate)
private val descriptionView: TextView by bindView(itemView, R.id.descriptionView)
private var binding: ShopHeaderBinding = ShopHeaderBinding.bind(itemView)
fun bind() {
npcBannerView.identifier = "stable"
namePlate.setText(R.string.stable_owner)
descriptionView.visibility = View.GONE
binding.npcBannerView.shopSpriteSuffix = shopSpriteSuffix ?: ""
binding.npcBannerView.identifier = "stable"
binding.namePlate.setText(R.string.stable_owner)
binding.descriptionView.visibility = View.GONE
}
}
internal inner class StableViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView), View.OnClickListener {
internal inner class StableViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
private var animal: Animal? = null
private val imageView: SimpleDraweeView by bindView(itemView, R.id.imageView)
@ -116,15 +144,12 @@ class StableRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<
fun bind(item: Animal) {
this.animal = item
titleView.text = if (item.type == "special") {
item.text
} else {
item.animal
}
val context = itemView.context
val egg = eggs[item.animal]
if (egg != null) {
titleView.text = if (item.type == "drop" || itemType == "mounts") egg.mountText else egg.text
} else item.animal
ownedTextView.visibility = View.VISIBLE
this.imageView.alpha = 1.0f
this.titleView.alpha = 1.0f
this.ownedTextView.alpha = 1.0f
val imageName = if (itemType == "pets") {
"Pet_Egg_" + item.animal
@ -132,40 +157,23 @@ class StableRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<
"Mount_Icon_" + item.key
}
context?.let {
this.ownedTextView.text = context.getString(R.string.pet_ownership_fraction, item.numberOwned, item.totalNumber)
this.ownedTextView.background = context.getDrawable(R.drawable.layout_rounded_bg_shopitem_price)
var owned = item.numberOwned
var totalNum = item.totalNumber
this.ownedTextView.setTextColor(ContextCompat.getColor(context, R.color.gray_200))
ownedTextView.visibility = View.VISIBLE
imageView.loadImage(imageName)
this.ownedTextView.text = context?.getString(R.string.pet_ownership_fraction, owned, totalNum)
this.ownedTextView.background = context?.getDrawable(R.drawable.layout_rounded_bg_shopitem_price)
val alpha = if (item.numberOwned <= 0) 0.2f else 1.0f
this.imageView.alpha = alpha
this.titleView.alpha = alpha
this.ownedTextView.alpha = alpha
this.ownedTextView.setTextColor(ContextCompat.getColor(it, R.color.black) )
ownedTextView.visibility = if (animal?.type == "special") View.GONE else View.VISIBLE
imageView.background = null
DataBindingUtils.loadImage(imageName) {
val drawable = BitmapDrawable(context?.resources, it)
Observable.just(drawable)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
imageView.background = drawable
}, RxErrorHandler.handleEmptyError())
}
if (item.numberOwned <= 0) {
this.imageView.alpha = 0.2f
this.titleView.alpha = 0.2f
this.ownedTextView.alpha = 0.2f
}
if (item.numberOwned == item.totalNumber) {
this.ownedTextView.background = context?.getDrawable(R.drawable.layout_rounded_bg_animalitem_complete)
this.ownedTextView.setTextColor(ContextCompat.getColor(it, R.color.white))
}
if (item.numberOwned == item.totalNumber) {
this.ownedTextView.background = context.getDrawable(R.drawable.layout_rounded_bg_animalitem_complete)
this.ownedTextView.setTextColor(ContextCompat.getColor(context, R.color.white))
}
}
override fun onClick(v: View) {

View file

@ -63,16 +63,16 @@ class ChallengeTasksRecyclerViewAdapter(taskFilterHelper: TaskFilterHelper?, lay
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BindableViewHolder<Task> {
val viewHolder: BindableViewHolder<Task> = when (viewType) {
TYPE_HABIT -> HabitViewHolder(getContentView(parent, R.layout.habit_item_card), { _, _ -> }) { task ->
TYPE_HABIT -> HabitViewHolder(getContentView(parent, R.layout.habit_item_card), { _, _ -> }, { }) { task ->
taskOpenEventsSubject.onNext(task)
}
TYPE_DAILY -> DailyViewHolder(getContentView(parent, R.layout.daily_item_card), { _, _ -> }, { _, _ -> }) { task ->
TYPE_DAILY -> DailyViewHolder(getContentView(parent, R.layout.daily_item_card), { _, _ -> }, { _, _ -> }, { }) { task ->
taskOpenEventsSubject.onNext(task)
}
TYPE_TODO -> TodoViewHolder(getContentView(parent, R.layout.todo_item_card), { _, _ -> }, { _, _ -> }) { task ->
TYPE_TODO -> TodoViewHolder(getContentView(parent, R.layout.todo_item_card), { _, _ -> }, { _, _ -> }, { }) { task ->
taskOpenEventsSubject.onNext(task)
}
TYPE_REWARD -> RewardViewHolder(getContentView(parent, R.layout.reward_item_card), { _, _ -> }) { task ->
TYPE_REWARD -> RewardViewHolder(getContentView(parent, R.layout.reward_item_card), { _, _ -> }, { }) { task ->
taskOpenEventsSubject.onNext(task)
}
TYPE_ADD_ITEM -> AddItemViewHolder(getContentView(parent, R.layout.challenge_add_task_item), addItemSubject)

View file

@ -12,7 +12,9 @@ class DailiesRecyclerViewHolder(data: OrderedRealmCollection<Task>?, autoUpdate:
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DailyViewHolder =
DailyViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) },
{ task, item -> checklistItemScoreSubject.onNext(Pair(task, item))}) {
{ task, item -> checklistItemScoreSubject.onNext(Pair(task, item))}, {
task -> taskOpenEventsSubject.onNext(task)
}) {
task -> brokenTaskEventsSubject.onNext(task)
}
}

View file

@ -10,7 +10,9 @@ class HabitsRecyclerViewAdapter(data: OrderedRealmCollection<Task>?, autoUpdate:
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HabitViewHolder =
HabitViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) }) {
HabitViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) }, {
task -> taskOpenEventsSubject.onNext(task)
}) {
task -> brokenTaskEventsSubject.onNext(task)
}
}

View file

@ -112,6 +112,8 @@ abstract class RealmBaseTasksRecyclerViewAdapter<VH : BaseTaskViewHolder>(
override val checklistItemScoreEvents: Flowable<Pair<Task, ChecklistItem>> = checklistItemScoreSubject.toFlowable(BackpressureStrategy.DROP)
protected var taskOpenEventsSubject = PublishSubject.create<Task>()
override val taskOpenEvents: Flowable<Task> = taskOpenEventsSubject.toFlowable(BackpressureStrategy.DROP)
protected var brokenTaskEventsSubject = PublishSubject.create<Task>()
override val brokenTaskEvents: Flowable<Task> = brokenTaskEventsSubject.toFlowable(BackpressureStrategy.DROP)
private val isDataValid: Boolean
get() = data?.isValid ?: false

View file

@ -30,6 +30,8 @@ class RewardsRecyclerViewAdapter(private var customRewards: OrderedRealmCollecti
override val checklistItemScoreEvents: Flowable<Pair<Task, ChecklistItem>> = checklistItemScoreSubject.toFlowable(BackpressureStrategy.DROP)
private var taskOpenEventsSubject = PublishSubject.create<Task>()
override val taskOpenEvents: Flowable<Task> = taskOpenEventsSubject.toFlowable(BackpressureStrategy.LATEST)
protected var brokenTaskEventsSubject = PublishSubject.create<Task>()
override val brokenTaskEvents: Flowable<Task> = brokenTaskEventsSubject.toFlowable(BackpressureStrategy.DROP)
private var purchaseCardSubject = PublishSubject.create<ShopItem>()
val purchaseCardEvents: Flowable<ShopItem> = purchaseCardSubject.toFlowable(BackpressureStrategy.LATEST)
@ -64,8 +66,10 @@ class RewardsRecyclerViewAdapter(private var customRewards: OrderedRealmCollecti
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return if (viewType == VIEWTYPE_CUSTOM_REWARD) {
RewardViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) }) {
RewardViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) }, {
task -> taskOpenEventsSubject.onNext(task)
}) {
task -> brokenTaskEventsSubject.onNext(task)
}
} else {
val viewHolder = ShopItemViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.row_shopitem, parent, false))

View file

@ -27,4 +27,5 @@ interface TaskRecyclerViewAdapter {
val taskScoreEvents: Flowable<Pair<Task, TaskDirection>>
val checklistItemScoreEvents: Flowable<Pair<Task, ChecklistItem>>
val taskOpenEvents: Flowable<Task>
val brokenTaskEvents: Flowable<Task>
}

View file

@ -12,8 +12,10 @@ class TodosRecyclerViewAdapter(data: OrderedRealmCollection<Task>?, autoUpdate:
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TodoViewHolder =
TodoViewHolder(getContentView(parent), { task, direction -> taskScoreEventsSubject.onNext(Pair(task, direction)) },
{ task, item -> checklistItemScoreSubject.onNext(Pair(task, item))}) {
task -> taskOpenEventsSubject.onNext(task)
}
{ task, item -> checklistItemScoreSubject.onNext(Pair(task, item))}, {
task -> taskOpenEventsSubject.onNext(task)
}) {
task -> brokenTaskEventsSubject.onNext(task)
}
}

View file

@ -4,6 +4,7 @@ import android.content.Context
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
@ -28,6 +29,8 @@ abstract class BaseMainFragment : BaseFragment() {
@Inject
lateinit var soundManager: SoundManager
protected var showsBackButton: Boolean = false
open val activity get() = getActivity() as? MainActivity
val tabLayout get() = activity?.binding?.detailTabs
val collapsingToolbar get() = activity?.binding?.toolbar
@ -72,6 +75,12 @@ abstract class BaseMainFragment : BaseFragment() {
return null
}
override fun onResume() {
super.onResume()
activity?.drawerToggle?.isDrawerIndicatorEnabled = !showsBackButton
activity?.supportActionBar?.setDisplayHomeAsUpEnabled(true)
}
private fun updateTabLayoutVisibility() {
if (this.usesTabLayout) {
tabLayout?.removeAllTabs()

View file

@ -40,7 +40,8 @@ class AvatarEquipmentFragment : BaseMainFragment() {
compositeSubscription.add(adapter.getSelectCustomizationEvents()
.flatMap { equipment ->
inventoryRepository.equip(user, if (user?.preferences?.costume == true) "costume" else "equipped", equipment.key ?: "")
val key = (if (equipment.key?.isNotBlank() != true) activeEquipment else equipment.key) ?: ""
inventoryRepository.equip(user, if (user?.preferences?.costume == true) "costume" else "equipped", key)
}
.subscribe(Consumer { }, RxErrorHandler.handleEmptyError()))
compositeSubscription.add(adapter.getUnlockCustomizationEvents()
@ -62,6 +63,7 @@ class AvatarEquipmentFragment : BaseMainFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
showsBackButton = true
super.onViewCreated(view, savedInstanceState)
arguments?.let {
val args = AvatarEquipmentFragmentArgs.fromBundle(it)

View file

@ -26,6 +26,7 @@ class AvatarOverviewFragment : BaseMainFragment(), AdapterView.OnItemSelectedLis
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
showsBackButton = true
super.onViewCreated(view, savedInstanceState)
binding.avatarSizeSpinner.onItemSelectedListener = this

View file

@ -46,6 +46,7 @@ class EquipmentDetailFragment : BaseMainFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
showsBackButton = true
super.onViewCreated(view, savedInstanceState)
arguments?.let {

View file

@ -220,11 +220,16 @@ class ItemRecyclerFragment : BaseFragment(), androidx.swiperefreshlayout.widget.
compositeSubscription.add(inventoryRepository.getOwnedItems(type)
.doOnNext { items ->
if (items.size > 0) {
adapter?.updateData(items)
val filteredItems = if (isFeeding) {
items.where().notEqualTo("key", "Saddle").findAll()
} else {
items
}
adapter?.updateData(filteredItems)
}
}
.map { items -> items.mapNotNull { it.key } }
.flatMap { inventoryRepository.getItems(itemClass, it.toTypedArray(), user) }
.flatMap { inventoryRepository.getItems(itemClass, it.toTypedArray()) }
.map {
val itemMap = mutableMapOf<String, Item>()
for (item in it) {

View file

@ -234,7 +234,7 @@ class ShopFragment : BaseFragment() {
fun onItemPurchased(event: GearPurchasedEvent) {
if (Shop.MARKET == shopIdentifier) {
loadMarketGear()
} else if (Shop.TIME_TRAVELERS_SHOP == shopIdentifier) {
} else {
loadShopInventory()
}
}

View file

@ -54,7 +54,6 @@ open class ShopsFragment : BaseMainFragment() {
this.usesTabLayout = false
tabLayout?.visibility = View.GONE
viewPager.currentItem = lockTab ?: 0
viewPager.setOnTouchListener { _, _ -> true }
}
context?.let { FirebaseAnalytics.getInstance(it).logEvent("open_shop", bundleOf(Pair("shopIndex", lockTab))) }
@ -85,7 +84,7 @@ open class ShopsFragment : BaseMainFragment() {
val fragment = ShopFragment()
fragment.shopIdentifier = when (position) {
fragment.shopIdentifier = when (lockTab ?: position) {
0 -> Shop.MARKET
1 -> Shop.QUEST_SHOP
2 -> Shop.SEASONAL_SHOP
@ -97,7 +96,7 @@ open class ShopsFragment : BaseMainFragment() {
return fragment
}
override fun getCount(): Int = 4
override fun getCount(): Int = if (lockTab != null) 1 else 4
override fun getPageTitle(position: Int): CharSequence? {
return when (position) {
@ -118,6 +117,6 @@ open class ShopsFragment : BaseMainFragment() {
private fun updateCurrencyView(user: User) {
currencyView.gold = user.stats?.gp ?: 0.0
currencyView.gems = user.gemCount.toDouble()
currencyView.hourglasses = user.hourglassCount?.toDouble() ?: 0.0
currencyView.hourglasses = user.hourglassCount.toDouble()
}
}

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