Merge branch 'develop' of https://github.com/jjbillings/habitrpg-android into delete-tags

# Conflicts:
#	Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities/MainActivity.java

Resolved conflicts.
This commit is contained in:
jjbillings 2016-08-18 10:18:15 -05:00
commit 67d6626382
77 changed files with 1477 additions and 103 deletions

View file

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.habitrpg.android.habitica"
android:versionCode="113"
android:versionName="0.0.33.1"
android:versionCode="115"
android:versionName="0.0.33.2"
android:screenOrientation="portrait"
android:installLocation="auto" >
@ -110,6 +110,16 @@
tools:ignore="UnusedAttribute"
android:label="@string/invite_users">
</activity>
<activity
android:name=".ui.activities.FullProfileActivity"
android:theme="@style/AppThemeWithActionBarBlackText"
android:parentActivityName=".ui.activities.MainActivity"
android:screenOrientation="portrait"
tools:ignore="UnusedAttribute">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.activities.MainActivity" />
</activity>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"

View file

@ -0,0 +1 @@
ALTER TABLE Preferences ADD COLUMN 'language' varchar(15);

View file

@ -161,11 +161,6 @@ android {
release
}
dexOptions{
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
debug {
applicationIdSuffix ".debug"
@ -206,8 +201,8 @@ android {
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "2g" // Use gig increments depending on needs
preDexLibraries false
javaMaxHeapSize "4g" // Use gig increments depending on needs
incremental true
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

View file

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

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
<path android:fillColor="#000000" android:pathData="M8.59,16.34l4.58,-4.59 -4.58,-4.59L10,5.75l6,6 -6,6z"/>
</vector>

View file

@ -3,7 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
android:layout_margin="5dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground">
<LinearLayout
android:layout_width="match_parent"

View file

@ -0,0 +1,355 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:id="@+id/fullprofile_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
style="@style/CardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/avatar_with_bars"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:adjustViewBounds="true"
android:background="@color/transparent"
android:fitsSystemWindows="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.habitrpg.android.habitica.ui.AvatarView
android:id="@+id/avatarView"
android:layout_width="@dimen/avatar_header_width"
android:layout_height="@dimen/avatar_header_height"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
app:showBackground="true"
app:showMount="true"
app:showPet="true" />
<LinearLayout
android:id="@+id/LL_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/hpBar"
layout="@layout/value_bar" />
<include
android:id="@+id/xpBar"
layout="@layout/value_bar" />
<include
android:id="@+id/mpBar"
layout="@layout/value_bar" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/lvl_tv"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:drawableLeft="@drawable/ic_header_warrior"
android:drawablePadding="6dp"
android:drawableStart="@drawable/ic_header_warrior"
android:gravity="center"
android:textSize="14sp" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="36dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/gems_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:drawableLeft="@drawable/ic_header_gem"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_header_gem"
android:gravity="center"
android:textSize="14sp" />
<TextView
android:id="@+id/gold_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:drawableLeft="@drawable/ic_header_gold"
android:drawablePadding="6dp"
android:drawableStart="@drawable/ic_header_gold"
android:gravity="center"
android:textSize="14sp" />
<TextView
android:id="@+id/silver_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:drawableLeft="@drawable/ic_header_silver"
android:drawablePadding="6dp"
android:drawableStart="@drawable/ic_header_silver"
android:gravity="center"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/profile_blurb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Blurb" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/profile_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:minHeight="200dp"
fresco:actualImageScaleType="fitCenter" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
style="@style/CardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/CardTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/battle_gear"
android:textStyle="bold" />
<ProgressBar
android:id="@+id/avatar_equip_progress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
<TableLayout
android:id="@+id/equipment_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:shrinkColumns="1"
android:stretchColumns="0" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/profile_costume_card"
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
style="@style/CardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/CardTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/costume"
android:textStyle="bold" />
<ProgressBar
android:id="@+id/avatar_costume_progress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
<TableLayout
android:id="@+id/costume_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:shrinkColumns="1"
android:stretchColumns="0" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/profile_attributes_card"
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground">
<LinearLayout
style="@style/CardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1">
<TableLayout
android:id="@+id/attributes_table"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0,1,2,3,4">
<TableRow android:layout_height="wrap_content">
<!-- Headers -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
style="@style/CardTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/attributes"
android:textStyle="bold" />
<ImageView
android:id="@+id/attributes_collapse_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_gravity="bottom" />
</LinearLayout>
<TextView
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="STR" />
<TextView
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="INT" />
<TextView
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="CON" />
<TextView
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="PER" />
</TableRow>
</TableLayout>
<ProgressBar
android:id="@+id/avatar_attributes_progress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
style="@style/CardView.Default"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
style="@style/CardContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1">
<TextView
style="@style/CardTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/profile_pets_and_mounts"
android:textStyle="bold" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0,1">
<TableRow android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/profile_pets_found" />
<TextView
android:id="@+id/profile_pet_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#" />
</TableRow>
<TableRow android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/profile_mounts_tamed" />
<TextView
android:id="@+id/profile_mount_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#" />
</TableRow>
</TableLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>

View file

@ -63,9 +63,9 @@
<android.support.design.widget.TabLayout
android:id="@+id/detail_tabs"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_height="54dp"
android:layout_gravity="bottom"
android:background="?attr/colorPrimary"
android:background="@color/brand_200"
android:elevation="0dp"
android:fillViewport="false"

View file

@ -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="32dp"
android:layout_marginRight="32dp"
app:showBackground="true"
app:showMount="true"
app:showPet="true" />
@ -38,21 +38,31 @@
<include
android:id="@+id/hpBar"
layout="@layout/value_bar" />
layout="@layout/value_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/header_bar_spacing" />
<include
android:id="@+id/xpBar"
layout="@layout/value_bar" />
layout="@layout/value_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/header_bar_spacing" />
<include
android:id="@+id/mpBar"
layout="@layout/value_bar" />
layout="@layout/value_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:paddingBottom="6dp">
<TextView
android:id="@+id/lvl_tv"
android:layout_width="wrap_content"

View file

@ -26,9 +26,10 @@
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingLeft="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingEnd="@dimen/task_text_padding"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingTop="@dimen/task_top_bottom_padding"
android:id="@+id/linearLayout"
@ -74,7 +75,7 @@
</LinearLayout>
<View
android:id="@+id/rightBorderView"
android:layout_width="5dp"
android:layout_width="@dimen/task_right_border_width"
android:layout_height="match_parent"
android:gravity="center" />
</LinearLayout>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/coordinatorLayout"
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/md_grey_500"
android:scrollbars="vertical" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/empty_view"
style="@style/EmptyView"/>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -21,11 +21,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/btnPlusBackground"/>
<ImageView
android:id="@+id/btnPlusIconView"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/plus"
android:scaleType="center"
android:layout_gravity="center" />
<Button
android:id="@+id/btnPlus"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="+"
android:background="@drawable/selection_highlight"
style="@style/HabitButton" />
</FrameLayout>
@ -38,11 +44,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/btnMinusBackground"/>
<ImageView
android:id="@+id/btnMinusIconView"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/minus"
android:scaleType="center"
android:layout_gravity="center" />
<Button
android:id="@+id/btnMinus"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="-"
android:background="@drawable/selection_highlight"
style="@style/HabitButton"/>
</FrameLayout>
@ -52,9 +64,10 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingLeft="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingEnd="@dimen/task_text_padding"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingTop="@dimen/task_top_bottom_padding">
<net.pherth.android.emoji_library.EmojiTextView
@ -72,7 +85,7 @@
</LinearLayout>
<View
android:id="@+id/rightBorderView"
android:layout_width="5dp"
android:layout_width="@dimen/task_right_border_width"
android:layout_height="match_parent"
android:gravity="center" />
</LinearLayout>

View file

@ -3,7 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/CardView.Default">
style="@style/CardView.Default"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground">
<LinearLayout
android:layout_width="match_parent"

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp">
<TextView
android:id="@+id/tv_attribute_type"
android:layout_margin="5dp"
android:gravity="left" />
<TextView
android:id="@+id/tv_attribute_str"
android:layout_gravity="center" />
<TextView
android:id="@+id/tv_attribute_int"
android:layout_gravity="center" />
<TextView
android:id="@+id/tv_attribute_con"
android:layout_gravity="center" />
<TextView
android:id="@+id/tv_attribute_per"
android:layout_gravity="center" />
</TableRow>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_marginBottom="10dp"
android:layout_marginTop="5dp"
android:minHeight="25dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:id="@+id/tableRowTextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/abc_text_size_subhead_material"
android:ellipsize="end" />
<TextView
android:id="@+id/tableRowTextView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/abc_text_size_small_material"
android:textStyle="italic"/>
</LinearLayout>
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/gear_drawee"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="5dp"
fresco:actualImageScaleType="centerCrop"/>
</TableRow>

View file

@ -0,0 +1,41 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:text="@string/chat"
android:id="@+id/new_message_title"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/material_drawer_primary_text" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="match_parent">
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="72dp"
android:layout_weight="1"
app:hintTextAppearance="@style/TextAppearance.AppCompat">
<net.pherth.android.emoji_library.EmojiEditText
android:id="@+id/edit.new.message.text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:hint="@string/write_message"
android:textColor="@android:color/black"
android:inputType="textCapSentences|textMultiLine" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</LinearLayout>

View file

@ -20,7 +20,9 @@
android:layout_weight="1"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingTop="@dimen/task_top_bottom_padding"
android:paddingLeft='16dp'
android:paddingLeft="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingEnd="@dimen/reward_spacing"
android:paddingRight="@dimen/reward_spacing"
android:layout_gravity="center_vertical">

View file

@ -43,8 +43,6 @@
android:textColor="@color/white"
android:layout_gravity="center_vertical"
android:textSize="15sp"
android:drawableLeft="@drawable/ic_header_gold"
android:drawableStart="@drawable/ic_header_gold"
android:background="@drawable/rounded_purple_square"
android:paddingLeft="6dp"
android:paddingStart="6dp" />

View file

@ -27,9 +27,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingLeft="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingEnd="@dimen/task_text_padding"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingTop="@dimen/task_top_bottom_padding"
android:layout_weight="1">

View file

@ -41,8 +41,8 @@
android:id="@+id/ic_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/bar_padding"
android:layout_marginEnd="@dimen/bar_padding"
android:layout_marginRight="@dimen/bar_icon_padding"
android:layout_marginEnd="@dimen/bar_icon_padding"
android:layout_alignTop="@+id/bar_full"
android:layout_alignBottom="@id/bar_full"
android:scaleType="center"
@ -74,7 +74,8 @@
android:layout_below="@id/bar_full"
android:layout_toRightOf="@id/ic_header"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginTop="1dp">
<TextView
android:id="@+id/TV_value"
android:layout_width="0dp"

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<menu 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"
tools:context=".ui.activities.TaskFormActivity">
<item android:id="@+id/private_message"
android:title="@string/profile_private_message"
android:icon="@drawable/ic_action_chat"
android:orderInCategory="100"
app:showAsAction="always"
/>
</menu>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<menu 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"
tools:context="com.habitrpg.android.habitica.ui.activities.MainActivity">
<item
android:id="@+id/action_guild_search"
android:title="@string/guild_search_hint"
android:orderInCategory="103"
android:visible="true"
app:showAsAction="always"
app:actionViewClass="android.support.v7.widget.SearchView"/>
</menu>

View file

@ -128,7 +128,7 @@
<string name="chat">Чат</string>
<string name="members">Членове</string>
<string name="habits">Навици</string>
<string name="dailies">Ежедневни</string>
<string name="dailies">Ежедн.</string>
<string name="todos">Задачи</string>
<string name="rewards">Награди</string>
<string name="taskform.delete.title">Сигурен/на ли сте?</string>
@ -350,7 +350,6 @@
<string name="hourglass">пясъчен часовник</string>
<string name="hourglasses">пясъчни часовници</string>
<string name="gold_singular">злато</string>
<string name="gems_plural">злато</string>
<string name="chat_message_copied">Съобщението е копирано</string>
<string name="copy_chat_message">Копиране</string>
</resources>

View file

@ -350,7 +350,6 @@ Für den Anfang: Welche Bereiche Deines Lebens möchtest Du verbessern?</string>
<string name="hourglass">Sanduhr</string>
<string name="hourglasses">Sanduhren</string>
<string name="gold_singular">Gold</string>
<string name="gems_plural">Gold</string>
<string name="chat_message_copied">Nachricht in Zwischenablage kopiert</string>
<string name="copy_chat_message">In Zwischenablage kopieren</string>
</resources>

View file

@ -345,12 +345,11 @@ Pour commencer, quels aspects de votre vie souhaitez-vous améliorer ?</string>
<string name="no_potion">Vous n\'avez pas besoin d\'acheter une potion de santé</string>
<string name="successful_purchase" formatted="false">%1$s acheté avec succès</string>
<string name="purchase_confirmation_title">Confirmer l\'achat</string>
<string name="confirm_purchase_text" formatted="false">Acheter %1$s for %2$s %3$s</string>
<string name="confirm_purchase_text" formatted="false">Acheter %1$s pour %2$s %3$s</string>
<string name="gem">gemme</string>
<string name="hourglass">sablier</string>
<string name="hourglasses">sabliers</string>
<string name="gold_singular">or</string>
<string name="gems_plural">or</string>
<string name="gold_singular">pièce d\'or</string>
<string name="chat_message_copied">Message copié dans le presse-papier</string>
<string name="copy_chat_message">Copier dans le presse-papier</string>
</resources>

View file

@ -15,4 +15,5 @@
<string name="sidebar.news">Berita</string>
<string name="sidebar.settings">Pengaturan</string>
<string name="sidebar.about">Tentang Kami</string>
<string name="sidebar_shops">Toko</string>
</resources>

View file

@ -19,6 +19,13 @@
<string name="pref_reminder_header">Notifica giornaliera</string>
<string name="pref_reminder_checkbox">Attiva notifica</string>
<string name="pref_reminder_picker">Imposta ora notifica</string>
<string name="push_notifications">Notifiche Push</string>
<string name="preference_push_you_won_challenge">Hai vinto una Sfida!</string>
<string name="preference_push_received_a_private_message">Ricevuto un messaggio</string>
<string name="preference_push_invited_to_party">Invito in una squadra</string>
<string name="preference_push_invited_to_guild">Invito in una Gilda</string>
<string name="preference_push_your_quest_has_begun">La tua Missione è cominciata</string>
<string name="preference_push_invited_to_quest">Invito ad una Missione</string>
<!--Adding tasks-->
<string name="task_value">Valore</string>
<string name="new_todo">Nuova to-do</string>
@ -331,4 +338,16 @@ Le Dailies mancate e le cattive Habit non li danneggiano molto, e hanno sempre m
<string name="timeTravelers">Viaggiatori del Tempo</string>
<string name="seasonalShop">Negozio Stagionale</string>
<string name="empty_inbox">Non hai nessun messaggio. Puoi inviare un messaggio privato ad un utente dai loro messaggi nelle chat pubbliche!</string>
<string name="party_invite">Sblocca invitando amici</string>
<string name="no_gold">Non hai abbastanza Oro</string>
<string name="no_potion">Non hai bisogno di comprare una pozione di salute</string>
<string name="successful_purchase" formatted="false">%1$s comprato con successo</string>
<string name="purchase_confirmation_title">Conferma acquisto</string>
<string name="confirm_purchase_text" formatted="false">Compra %1$s per %2$s %3$s</string>
<string name="gem">gemma</string>
<string name="hourglass">clessidra</string>
<string name="hourglasses">clessidre</string>
<string name="gold_singular">oro</string>
<string name="chat_message_copied">Messaggio copiato negli Appunti</string>
<string name="copy_chat_message">Copia negli appunti</string>
</resources>

View file

@ -266,7 +266,7 @@
<string name="food">えさ</string>
<string name="quests">クエスト</string>
<string name="pets">ペット</string>
<string name="mounts"></string>
<string name="mounts"></string>
<string name="armoireEquipment" formatted="false">宝箱に貴重なアイテム、 %s を見つけた! すごい!</string>
<string name="armoireFood" formatted="false">宝箱をひっかきまわして%1$s%2$sを見つけた。何でこんなとこに?</string>
<string name="armoireExp">宝箱と格闘して経験値を増やした。どうぞっ!</string>
@ -291,10 +291,10 @@
<string name="sectionpremiumPets">魔法の薬のペット</string>
<string name="sectionquestPets">クエスト ペット</string>
<string name="sectionspecialPets">貴重なペット</string>
<string name="sectionmounts">基本の騎</string>
<string name="sectionpremiumMounts">魔法の薬の騎</string>
<string name="sectionquestMounts">クエストの騎</string>
<string name="sectionspecialMounts">貴重な騎獣</string>
<string name="sectionmounts">基本の</string>
<string name="sectionpremiumMounts">魔法の薬の</string>
<string name="sectionquestMounts">クエストの</string>
<string name="sectionspecialMounts">レアな乗騎</string>
<string name="world_quest">世界のクエスト</string>
<string name="inn_description">宿で休んでいる間は、日課をやらずに夜が明けてもダメージを受けない! ( 注 : ボスから受けるダメージは避けられない)</string>
<string name="empty_items" formatted="false">%s を持ってないよ</string>
@ -332,7 +332,7 @@
<string name="share_using">共有 ( シェア ) : </string>
<string name="share_levelup" formatted="false">生活を改善して、Habitica でのレベルが %s になった!</string>
<string name="share_hatched" formatted="false">実生活でのタスクをこなして、Habitica で %1$s%2$s のペットを飼いはじめた。</string>
<string name="share_raised" formatted="false">実生活でのタスクをこなして、%1$s%2$s のペットが乗れるほど大きな騎まで成長した。</string>
<string name="share_raised" formatted="false">実生活でのタスクをこなして、%1$s%2$s のペットが乗れるほど大きな騎まで成長した。</string>
<string name="open_in_store">Play ストアで開く</string>
<string name="change_class_confirmation">クラスを変更します。いいですか? 3 ジェムかかります。</string>
<string name="leaderMessage" formatted="false">%1$s からのメッセージ</string>
@ -351,7 +351,6 @@
<string name="hourglass">砂時計</string>
<string name="hourglasses">砂時計</string>
<string name="gold_singular">ゴールド</string>
<string name="gems_plural">ゴールド</string>
<string name="chat_message_copied">クリップボードにコピーされたメッセージ</string>
<string name="copy_chat_message">クリップボードにコピー</string>
</resources>

View file

@ -16,4 +16,5 @@
<string name="sidebar.news">Naujienos</string>
<string name="sidebar.settings">Nustatymai</string>
<string name="sidebar.about">Apie</string>
<string name="sidebar_shops">Parduotuvės</string>
</resources>

View file

@ -19,6 +19,16 @@
<string name="pref_reminder_header">Kasdienis Priminimas</string>
<string name="pref_reminder_checkbox">Įjungti Priminimą</string>
<string name="pref_reminder_picker">Nustatyti Priminimo Laiką</string>
<string name="pref_push_notifications_checkbox">Aktyvūs Vartotojo Pranešimai</string>
<string name="push_notifications">Aktyvūs Pranšimai</string>
<string name="preference_push_you_won_challenge">Laimėjai Iššūkį!</string>
<string name="preference_push_received_a_private_message">Gavai Privačią Žinutę</string>
<string name="preference_push_gifted_gems">Padovanoti Brangakmeniai</string>
<string name="preference_push_gifted_subscription">Padovanota Prenumerata</string>
<string name="preference_push_invited_to_party">Pakvietimas į Grupę</string>
<string name="preference_push_invited_to_guild">Pakvietimas į Gildiją</string>
<string name="preference_push_your_quest_has_begun">Tavo Misija Prasidėjo</string>
<string name="preference_push_invited_to_quest">Pakvietimas į Misiją</string>
<!--Adding tasks-->
<string name="task_value">Reikšmė</string>
<string name="new_todo">Nauja vienkartinė užduotis</string>
@ -325,4 +335,21 @@ Pradžiai, kurias savo gyvenimo dalis norėtum tobulint?</string>
<string name="open_in_store">Atidaryti play parduotuvėje</string>
<string name="change_class_confirmation">Ar tikrai nori pasikeisti savo klasę? Tai kainuos 3 brangakmenius.</string>
<string name="leaderMessage" formatted="false">Žinutė nuo %1$s</string>
<string name="confirm">Patvirtinti</string>
<string name="market">Turgus</string>
<string name="timeTravelers">Keliautojai Laiku</string>
<string name="seasonalShop">Sezoninė Parduotuvė</string>
<string name="empty_inbox">Tavo Pašo dėžutėje žinučių nėra. Kitiems vartotojams galima siųsti pranešimus paspaudus ant jų viešų pranešimų!</string>
<string name="party_invite">Atidenk pakviečiant draugus</string>
<string name="no_gold">Nepakanka Aukso</string>
<string name="no_potion">Tau nereikia gyvybių eliksyro</string>
<string name="successful_purchase" formatted="false">%1$s nupirktas</string>
<string name="purchase_confirmation_title">Patvirtinti pirkinį</string>
<string name="confirm_purchase_text" formatted="false">Pirkti %1$s už %2$s %3$s</string>
<string name="gem">brangakmenis</string>
<string name="hourglass">smėlio laikrodis</string>
<string name="hourglasses">smėlio laikrodžiai</string>
<string name="gold_singular">aukso</string>
<string name="chat_message_copied">Žinutė nukopijuota į Iškarpinę</string>
<string name="copy_chat_message">Kopijuoti į Iškarpinę</string>
</resources>

View file

@ -350,7 +350,6 @@ Om te beginnen, welke delen van je leven wil je verbeteren?</string>
<string name="hourglass">zandloper</string>
<string name="hourglasses">zandlopers</string>
<string name="gold_singular">goud</string>
<string name="gems_plural">goud</string>
<string name="chat_message_copied">Bericht gekopieerd naar klembord</string>
<string name="copy_chat_message">Kopieer naar klembord</string>
</resources>

View file

@ -16,4 +16,5 @@
<string name="sidebar.news">Aktualności</string>
<string name="sidebar.settings">Ustawienia</string>
<string name="sidebar.about">O programie</string>
<string name="sidebar_shops">Sklepy</string>
</resources>

View file

@ -1,14 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="tutorial_habits">Utrwalaj Pozytywne Nawyki, aby zdobyć złoto i punkty doświadczenia! Negatywne Nawyki zranią twojego bohatera gdy na nie natrafisz. Unikaj ich w prawdziwym życiu!</string>
<string name="tutorial_dailies">Pokonuj kolejne Codzienne zadania, aby zdobyć złoto i doświadczenie. Uwaga! Codzienne zranią twojego awatara, jeśli nie ukończysz ich na czas.</string>
<string name="tutorial_habits">Utrwalaj Pozytywne Nawyki, aby zdobyć złoto i punkty doświadczenia! Negatywne Nawyki zranią Twojego bohatera gdy na nie natrafisz. Unikaj ich w prawdziwym życiu!</string>
<string name="tutorial_dailies">Pokonuj kolejne Codzienne zadania, aby zdobyć złoto i doświadczenie. Uwaga! Codzienne zranią Twojego awatara, jeśli nie ukończysz ich na czas.</string>
<string name="tutorial_todos">Ukończ swoje Do-Zrobienia w prawdziwym życiu i odznacz je w zamian za ZŁOTO i DOŚWIADCZENIE, aby móc kupować Nagrody i odblokowywać nowe funkcje!</string>
<string name="tutorial_rewards">Oto twoje Nagrody! Zyskuj złoto za ukończone w prawdziwym życiu Nawyki, Codzienne i Do-Zrobienia. Następnie wydawaj na Nagrody w grze lub własne w realnym świecie!</string>
<string name="tutorial_equipment">Tu pojawia się zakupiony ekwipunek. Wyposażenie Bojowe wpływa na twoje statystyki, a Kostium (o ile włączony) na wygląd twojego awatara.</string>
<string name="tutorial_rewards">Oto Twoje Nagrody! Zyskuj złoto za ukończone w prawdziwym życiu Nawyki, Codzienne i Do-Zrobienia. Następnie wydawaj na Nagrody w grze lub własne w realnym świecie!</string>
<string name="tutorial_equipment">Tu pojawia się zakupiony ekwipunek. Wyposażenie Bojowe wpływa na Twoje statystyki, a Kostium (o ile włączony) na wygląd Twojego awatara.</string>
<string name="tutorial_items">Zbieraj przedmioty kończąc zadania i zdobywając poziomy. Stuknij przedmiot, żeby go użyć!</string>
<string name="tutorial_pets">Kończąc zadania w prawdziwym świecie, masz szansę znalezienia losowych jaj i eliksirów. Połącz je, aby wykluć chowańce.</string>
<string name="tutorial_skills">Umiejętności to specjalne zdolności, które mają potężne efekty! Stuknij umiejętność, aby jej użyć. To kosztuje Mana (niebieski pasek), którą zyskujesz zaglądając tu codziennie i kończąc zadania w prawdziwym świecie. Aby dowiedzieć się więcej, zaglądnij do FAQ w menu!</string>
<string name="tutorial_party">Tutaj ty i twoi przyjaciele pilnujecie wzajemnie swoich celów i walczycie z potworami poprzez swoje zadania!</string>
<string name="tutorial_party">Tutaj Ty i Twoi przyjaciele pilnujecie wzajemnie swoich celów i walczycie z potworami poprzez swoje zadania!</string>
<string name="tutorial_tavern">Witaj w Karczmie - publicznym czacie dla wszystkich grup wiekowych! Możecie tu rozmawiać o produktywności i zadawać pytania. Miłej zabawy!</string>
<string name="tutorial_classes">Wybierz, czy zostać Wojownikiem, Magiem, Uzdrowicielem, czy Łotrzykiem! Każda klasa ma unikalny zestaw wyposażenia i umiejętności. By dowiedzieć się więcej, stuknij (?) !</string>
</resources>

View file

@ -19,6 +19,16 @@
<string name="pref_reminder_header">Przypominienie</string>
<string name="pref_reminder_checkbox">Aktywuj Przypomnienie</string>
<string name="pref_reminder_picker">Ustaw Czas Przypomnienia</string>
<string name="pref_push_notifications_checkbox">Notyfikacje użytkownika</string>
<string name="push_notifications">Notyfikacje</string>
<string name="preference_push_you_won_challenge">Ukończono wyzwanie!</string>
<string name="preference_push_received_a_private_message">Otrzymano prywatną wiadomość</string>
<string name="preference_push_gifted_gems">Otrzymałeś diamenty</string>
<string name="preference_push_gifted_subscription">Otrzymałeś Subskrypcję</string>
<string name="preference_push_invited_to_party">Otrzymano zaproszenie do drużyny</string>
<string name="preference_push_invited_to_guild">Otrzymano zaproszenie do gildii</string>
<string name="preference_push_your_quest_has_begun">Twoja misja się rozpoczęła</string>
<string name="preference_push_invited_to_quest">Zaproszono Cię na misję</string>
<!--Adding tasks-->
<string name="task_value">Wartość</string>
<string name="new_todo">Nowe DoZrobienia</string>
@ -171,10 +181,10 @@
<string name="previous_button">Poprzedni</string>
<string name="next_button">Następny</string>
<string name="skip_button">Pomiń</string>
<string name="setup_welcome_description">Witaj w Habitice, gdzie postęp w grze ulepszy twoje życie! Osiągając cele w prawdziwym świecie, odblokowujesz ekwipunek, chowańce, misje i wiele więcej.</string>
<string name="setup_welcome_description">Witaj w Habitice, gdzie postęp w grze ulepszy Twoje życie! Osiągając cele w prawdziwym świecie, odblokowujesz ekwipunek, chowańce, misje i wiele więcej.</string>
<string name="setup_welcome_title">Witaj</string>
<string name="avatar_setup_description">Na początek, potrzebujesz awatara - twoją reprezentację w grze! To, co robisz w prawdziwym życiu, ma wpływ na zdrowie, poziom doświadczenia i złoto twojego awatara.</string>
<string name="task_setup_description">Wspaniale! Teraz ustalmy twoje zadania, żeby zacząć zdobywać doświadczenie i złoto.
<string name="avatar_setup_description">Na początek, potrzebujesz awatara - swojego odpowiednika w grze! To, co robisz w prawdziwym życiu, ma wpływ na zdrowie, poziom doświadczenia i złoto Twojego awatara.</string>
<string name="task_setup_description">Wspaniale! Teraz ustalmy Twoje zadania, żebyś zaczął zdobywać doświadczenie i złoto.
Od czego chcesz zacząć poprawiać swoje życie?</string>
<string name="setup_group_work">Praca</string>
@ -205,7 +215,7 @@ Od czego chcesz zacząć poprawiać swoje życie?</string>
<string name="setup_task_creativity_1">Studiować mistrzostwo rzemiosła</string>
<string name="setup_task_creativity_2">Pracować nad twórczym projektem</string>
<string name="setup_task_creativity_3">Ukończyć twórczy projekt</string>
<string name="gem.purchase.support">Chcesz nam pomóc w utrzymaniu Habitiki? Możesz wesprzeć deweloperów kupując Klejnoty!\n\nZa Klejnoty można kupować zabawne dodatki do konta, takie jak:\n\n - Fajne kostiumy dla twojego awatara\n - Fantastyczne tła\n - Ciekawe misje, w których nagrodą są jaja chowańców\n - Możliwość zmiany klasy przed osiągnięciem poziomu 100\n\nStukrotne dzięki za pomaganie nam w czynieniu Habitiki najlepszą, jaka może być. Twoja pomoc wiele dla nas znaczy!</string>
<string name="gem.purchase.support">Chcesz nam pomóc w utrzymaniu Habitiki? Możesz wesprzeć deweloperów kupując Klejnoty!\n\nZa Klejnoty można kupować zabawne dodatki do konta, takie jak:\n\n - Fajne kostiumy dla Twojego awatara\n - Fantastyczne tła\n - Ciekawe misje, w których nagrodą są jaja chowańców\n - Możliwość zmiany klasy przed osiągnięciem poziomu 100\n\nStukrotne dzięki za pomaganie nam w czynieniu Habitiki najlepszą, jaka może być. Twoja pomoc wiele dla nas znaczy!</string>
<string name="my_guilds">Moje Gildie</string>
<string name="public_guilds">Publiczne Gildie</string>
<string name="guild">Gildia</string>
@ -293,9 +303,9 @@ Od czego chcesz zacząć poprawiać swoje życie?</string>
<string name="rogue">Łotrzyk</string>
<string name="mage">Mag</string>
<string name="healer">Uzdrowiciel</string>
<string name="warrior_description">Wojownicy mają częstsze i lepsze \"uderzenia krytyczne\", które losowo dają Złoto, Doświadczenie, i szansę na zrzut za odznaczenie zadania. Zadają także ciężkie obrażenia bossom. Graj jako Wojownik jeśli motywują cię nieprzewidywalne nagrody, lub jeśli chcesz niszczyć bossów w Misjach!</string>
<string name="warrior_description">Wojownicy mają częstsze i lepsze \"trafienia krytyczne\", które losowo dają Złoto, Doświadczenie, i szansę na zdobycz za odznaczenie zadania. Zadają także ciężkie obrażenia bossom. Graj jako Wojownik jeśli motywują Cię nieprzewidywalne nagrody, lub jeśli chcesz niszczyć bossów w Misjach!</string>
<string name="mage_description">Magowie uczą się sprawnie, zyskując Doświadczenie i Poziomy szybciej niż inne klasy. Dostają także dużo Many na specjalne umiejętności. Graj jako Mag jeśli lubisz elementy gry taktycznej w Habit, lub jeśli jesteś silnie motywowany przez zdobywanie poziomów i odblokowywanie zaawansowanych aspektów gry!</string>
<string name="rogue_description">Łotrzyki uwielbiają akumulować bogactwa, zyskując więcej Złota niż inni, oraz są adeptami w znajdowaniu losowych rzeczy. Ich umiejętność skradania pozwala im uniknąć konsekwencji pominięcia Codziennych. Graj jako Łotrzyk jeśli motywują cie Nagrody i Osiągnięcia, walczenie o skarby i odznaki!</string>
<string name="rogue_description">Łotrzyki uwielbiają gromadzić bogactwa, zyskując więcej Złota niż inni, oraz są adeptami w znajdowaniu losowych rzeczy. Ich umiejętność skradania pozwala im uniknąć konsekwencji pominięcia Codziennych. Graj jako Łotrzyk jeśli motywują Cię Nagrody i Osiągnięcia, walczenie o skarby i odznaki!</string>
<string name="healer_description">Medycy są odporni na obrażenia, i przedłużają tą ochronę na innych. Pominięte Codzienne i złe Nawyki nie robią na nich wrażenia, mają także sposoby na odzyskanie Zdrowia po porażce. Graj jako Medyk jeśli lubisz pomagać innym w Drużynie, lub jeśli koncepcja oszukania Śmierci dzięki ciężkiej pracy jest dla ciebie inspirująca!</string>
<string name="select_class">Wybierz klasę postaci</string>
<string name="opt_out_class">Wycofaj się</string>
@ -325,4 +335,21 @@ Od czego chcesz zacząć poprawiać swoje życie?</string>
<string name="open_in_store">Otwórz w sklepie Google Play</string>
<string name="change_class_confirmation">Jesteś pewien, że chcesz zmienić klasę? Będzie to kosztować 3 kryształy.</string>
<string name="leaderMessage" formatted="false">Wiadomość od %1$s</string>
<string name="confirm">Potwierdź</string>
<string name="market">Sklep</string>
<string name="timeTravelers">Podróżnicy w czasie</string>
<string name="seasonalShop">Sklep sezonowy</string>
<string name="empty_inbox">Nie masz żadnych wiadomości. Możesz wysłać użytkownikowi nową wiadomość za pomocą ich publicznych wiadomości!</string>
<string name="party_invite">Odblokuj poprzez zapraszanie przyjaciół</string>
<string name="no_gold">Niewystarczająca ilość złota</string>
<string name="no_potion">Nie potrzebujesz kupować eliksiru uzdrawiającego</string>
<string name="successful_purchase" formatted="false">%1$s jest w Twoim posiadaniu</string>
<string name="purchase_confirmation_title">Potwierdź zakup</string>
<string name="confirm_purchase_text" formatted="false">Zakup %1$s za %2$s %3$s</string>
<string name="gem">diament</string>
<string name="hourglass">klepsydra</string>
<string name="hourglasses">klepsydry</string>
<string name="gold_singular">złoto</string>
<string name="chat_message_copied">Wiadomość skopiowana do schowka</string>
<string name="copy_chat_message">Kopiuj do schowka</string>
</resources>

View file

@ -24,6 +24,7 @@
<string name="preference_push_you_won_challenge">Você venceu um Desafio!</string>
<string name="preference_push_received_a_private_message">Recebeu uma Mensagem Privada</string>
<string name="preference_push_gifted_gems">Gemas de presente</string>
<string name="preference_push_gifted_subscription">Assinatura Presenteada</string>
<string name="preference_push_invited_to_party">Convidado para um grupo</string>
<string name="preference_push_invited_to_guild">Convidado para uma Guilda</string>
<string name="preference_push_your_quest_has_begun">Sua missão começou</string>
@ -350,7 +351,6 @@ Para começar, quais partes da sua vida você quer melhorar?</string>
<string name="hourglass">ampulheta</string>
<string name="hourglasses">ampulhetas</string>
<string name="gold_singular">ouro</string>
<string name="gems_plural">ouro</string>
<string name="chat_message_copied">Mensagem copiada para Área de Transferência</string>
<string name="copy_chat_message">Copiar para Área e Transferência
</string>

View file

@ -350,7 +350,6 @@
<string name="hourglass">Песочные часы</string>
<string name="hourglasses">песочные часы</string>
<string name="gold_singular">золото</string>
<string name="gems_plural">золото</string>
<string name="chat_message_copied">Сообщение скопировано в буфер обмена</string>
<string name="copy_chat_message">Скопировать в буфер обмена</string>
</resources>

View file

@ -340,5 +340,4 @@
<string name="hourglass">沙漏</string>
<string name="hourglasses">沙漏</string>
<string name="gold_singular">金币</string>
<string name="gems_plural">金币</string>
</resources>

View file

@ -31,7 +31,7 @@
<dimen name="btn_separator_margin">4dip</dimen>
<dimen name="list_preferred_item_height">48dp</dimen>
<dimen name="minus_plus_buttonsize">50dp</dimen>
<dimen name="minus_plus_buttonsize">65dp</dimen>
<dimen name="view_layout_margin">4dp</dimen>
<dimen name="row_size">58dp</dimen>
<dimen name="btn_height_reward">50dp</dimen>
@ -42,7 +42,7 @@
<!-- Widget -->
<dimen name="widget_bar_horizontal_margin">20dp</dimen>
<dimen name="button_width">60dp</dimen>
<dimen name="button_width">65dp</dimen>
<dimen name="hairline_height">0.5dp</dimen>
<dimen name="checklist_divider_width">14dp</dimen>
@ -72,4 +72,9 @@
<dimen name="pet_image_height">99dp</dimen>
<dimen name="shop_width">162dp</dimen>
<dimen name="shop_height">138dp</dimen>
<dimen name="bar_icon_padding">10dp</dimen>
<dimen name="task_text_padding">16dp</dimen>
<dimen name="task_right_border_width">5dp</dimen>
<dimen name="header_bar_spacing">7dp</dimen>
<dimen name="habit_circle_background_size">40dp</dimen>
</resources>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="profile_pets_and_mounts">Pets &amp; Mounts</string>
<string name="profile_pets_found">Pets Found</string>
<string name="profile_mounts_tamed">Mounts Tamed</string>
<string name="profile_loading_data">loading member data..</string>
<string name="profile_send_message_to">Send message to %s</string>
<string name="profile_message_sent_to">Message sent to %s</string>
<string name="profile_level">Level:</string>
<string name="profile_class_bonus">Class-Bonus:</string>
<string name="profile_allocated">Allocated:</string>
<string name="profile_boosts">Boosts:</string>
<string name="profile_private_message">Private Message</string>
</resources>

View file

@ -254,6 +254,7 @@ To start, which parts of your life do you want to improve?</string>
<string name="privacy">Privacy</string>
<string name="write_message">Write Message</string>
<string name="post">Post</string>
<string name="guild_search_hint">Search for guilds</string>
<string name="todo_due" formatted="false">Due: %s</string>
<string name="daily_streak" formatted="false">current streak: %d</string>
@ -373,7 +374,7 @@ To start, which parts of your life do you want to improve?</string>
<string name="hourglass">hourglass</string>
<string name="hourglasses">hourglasses</string>
<string name="gold_singular">gold</string>
<string name="gems_plural">gold</string>
<string name="gold_plural">gold</string>
<string name="chat_message_copied">Message copied to Clipboard</string>
<string name="copy_chat_message">Copy to clipboard</string>
<string name="edit_tag_title">Edit Tag</string>

View file

@ -82,6 +82,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.net.ssl.SSLException;
@ -120,6 +121,8 @@ public class APIHelper implements Action1<Throwable> {
private final Retrofit retrofitAdapter;
private AlertDialog displayedAlert;
public String languageCode;
//private OnHabitsAPIResult mResultListener;
//private HostConfig mConfig;
public APIHelper(GsonConverterFactory gsonConverter, HostConfig hostConfig) {
@ -150,6 +153,7 @@ public class APIHelper implements Action1<Throwable> {
} else {
body = ResponseBody.create(contentType, stringJson);
}
Crashlytics.setString("last_api_call", response.request().url().toString());
return response.newBuilder().body(body).build();
};
@ -297,8 +301,13 @@ public class APIHelper implements Action1<Throwable> {
} else if (throwableClass.equals(HttpException.class)) {
HttpException error = (HttpException) throwable;
ErrorResponse res = getErrorResponse(error);
int status = error.code();
if (error.response().raw().request().url().toString().endsWith("/user/push-devices")) {
//workaround for an error that sometimes displays that the user already has this push device
return;
}
if (status >= 400 && status < 500) {
if (res != null && res.message != null && !res.message.isEmpty()) {
showConnectionProblemDialog("", res.message);
@ -408,4 +417,8 @@ public class APIHelper implements Action1<Throwable> {
public static class ErrorResponse {
public String message;
}
public Observable<ContentResult>getContent() {
return apiService.getContent(languageCode);
}
}

View file

@ -1,6 +1,5 @@
package com.habitrpg.android.habitica;
import com.magicmicky.habitrpgwrapper.lib.api.ApiService;
import com.magicmicky.habitrpgwrapper.lib.models.QuestBoss;
import com.magicmicky.habitrpgwrapper.lib.models.inventory.QuestContent;
import com.magicmicky.habitrpgwrapper.lib.models.tasks.ItemData;
@ -18,11 +17,11 @@ import rx.schedulers.Schedulers;
public class ContentCache {
private ApiService apiService;
private APIHelper apiHelper;
public ContentCache(ApiService apiService) {
this.apiService = apiService;
public ContentCache(APIHelper apiHelper) {
this.apiHelper = apiHelper;
}
public void GetQuestContent(final String key, final QuestContentCallback cb) {
@ -73,7 +72,7 @@ public class ContentCache {
}
private <T> void getContentAndSearchFor(final String typeOfSearch, final String searchKey, final GotContentEntryCallback<T> gotEntry) {
apiService.getContent()
apiHelper.getContent()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(contentResult -> {
@ -117,7 +116,7 @@ public class ContentCache {
private void getContentAndSearchForList(final String typeOfSearch, final List<String> searchKeys, final GotContentEntryCallback<List<ItemData>> gotEntry) {
List<ItemData> resultList = new ArrayList<>();
apiService.getContent()
apiHelper.getContent()
.flatMap(contentResult -> {
List<ItemData> itemList = new ArrayList<ItemData>(contentResult.gear.flat);
itemList.add(contentResult.potion);

View file

@ -7,5 +7,5 @@ public class HabitDatabase {
public static final String NAME = "Habitica";
public static final int VERSION = 25;
public static final int VERSION = 26;
}

View file

@ -155,7 +155,9 @@ public class HabiticaApplication extends MultiDexApplication {
int lastInstalledVersion = sharedPrefs.getInt("last_installed_version", 0);
if (lastInstalledVersion < info.versionCode) {
sharedPrefs.edit().putInt("last_installed_version", info.versionCode).apply();
this.lazyApiHelper.get().apiService.getContent()
APIHelper apiHelper = this.lazyApiHelper.get();
apiHelper.apiService.getContent(apiHelper.languageCode)
.compose(this.lazyApiHelper.get().configureApiCallObserver())
.subscribe(contentResult -> {
}, throwable -> {

View file

@ -7,6 +7,7 @@ import com.habitrpg.android.habitica.modules.AppModule;
import com.habitrpg.android.habitica.receivers.LocalNotificationActionReceiver;
import com.habitrpg.android.habitica.ui.activities.AboutActivity;
import com.habitrpg.android.habitica.ui.activities.ClassSelectionActivity;
import com.habitrpg.android.habitica.ui.activities.FullProfileActivity;
import com.habitrpg.android.habitica.ui.activities.GroupFormActivity;
import com.habitrpg.android.habitica.ui.activities.IntroActivity;
import com.habitrpg.android.habitica.ui.activities.LoginActivity;
@ -162,4 +163,6 @@ public interface AppComponent {
void inject(PushNotificationManager pushNotificationManager);
void inject(LocalNotificationActionReceiver localNotificationActionReceiver);
void inject(FullProfileActivity fullProfileActivity);
}

View file

@ -0,0 +1,9 @@
package com.habitrpg.android.habitica.events.commands;
public class OpenFullProfileCommand {
public String MemberId;
public OpenFullProfileCommand(String memberId){
MemberId = memberId;
}
}

View file

@ -1,6 +1,7 @@
package com.habitrpg.android.habitica.modules;
import com.habitrpg.android.habitica.APIHelper;
import com.habitrpg.android.habitica.ContentCache;
import com.habitrpg.android.habitica.HostConfig;
import com.magicmicky.habitrpgwrapper.lib.api.MaintenanceApiService;
@ -35,6 +36,12 @@ public class ApiModule {
return new APIHelper(gsonConverter, hostConfig);
}
@Provides
@Singleton
public ContentCache providesContentCache(APIHelper helper){
return new ContentCache(helper);
}
@Provides
public MaintenanceApiService providesMaintenanceApiService(GsonConverterFactory gsonConverter, HostConfig hostConfig) {
Retrofit adapter = new Retrofit.Builder()

View file

@ -105,10 +105,14 @@ public class AvatarView extends View {
}
}
private Map<LayerType, String> currentLayers;
private void showLayers(@NonNull Map<LayerType, String> layerMap) {
if (multiDraweeHolder.size() > 0) return;
int i = 0;
currentLayers = layerMap;
numberLayersInProcess.set(layerMap.size());
for (Map.Entry<LayerType, String> entry : layerMap.entrySet()) {
@ -310,9 +314,11 @@ public class AvatarView extends View {
this.user = user;
if (oldUser != null) {
Map<LayerType, String> currentLayerMap = getLayerMap(oldUser, false);
Map<LayerType, String> newLayerMap = getLayerMap(user, false);
if (!currentLayerMap.equals(newLayerMap)) {
boolean equals = currentLayers != null && currentLayers.equals(newLayerMap);
if (!equals) {
multiDraweeHolder.clear();
numberLayersInProcess.set(0);
}

View file

@ -193,4 +193,14 @@ public class AvatarWithBarsViewModel implements View.OnClickListener {
EventBus.getDefault().post(new OpenGemPurchaseFragmentCommand());
}
public void hideGems() {
gemsText.setVisibility(View.GONE);
}
public void valueBarLabelsToBlack() {
hpBar.setPartyMembers(true);
mpBar.setPartyMembers(true);
xpBar.setPartyMembers(true);
}
}

View file

@ -0,0 +1,526 @@
package com.habitrpg.android.habitica.ui.activities;
import android.content.Intent;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.CardView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.controller.BaseControllerListener;
import com.facebook.drawee.view.SimpleDraweeView;
import com.facebook.imagepipeline.image.ImageInfo;
import com.habitrpg.android.habitica.APIHelper;
import com.habitrpg.android.habitica.ContentCache;
import com.habitrpg.android.habitica.HabiticaApplication;
import com.habitrpg.android.habitica.R;
import com.habitrpg.android.habitica.components.AppComponent;
import com.habitrpg.android.habitica.ui.AvatarView;
import com.habitrpg.android.habitica.ui.AvatarWithBarsViewModel;
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser;
import com.habitrpg.android.habitica.ui.helpers.UiUtils;
import com.magicmicky.habitrpgwrapper.lib.models.Buffs;
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
import com.magicmicky.habitrpgwrapper.lib.models.Outfit;
import com.magicmicky.habitrpgwrapper.lib.models.Profile;
import com.magicmicky.habitrpgwrapper.lib.models.Stats;
import com.magicmicky.habitrpgwrapper.lib.models.tasks.ItemData;
import net.pherth.android.emoji_library.EmojiEditText;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import butterknife.BindView;
public class FullProfileActivity extends BaseActivity {
private String userId;
private String userName;
@Inject
ContentCache contentCache;
@Inject
APIHelper apiHelper;
@BindView(R.id.profile_image)
SimpleDraweeView profile_image;
@BindView(R.id.profile_blurb)
TextView blurbTextView;
@BindView(R.id.avatarView)
AvatarView avatarView;
@BindView(R.id.profile_attributes_card)
CardView attributesCardView;
@BindView(R.id.attributes_table)
TableLayout attributesTableLayout;
@BindView(R.id.attributes_collapse_icon)
ImageView attributesCollapseIcon;
@BindView(R.id.equipment_table)
TableLayout equipmentTableLayout;
@BindView(R.id.costume_table)
TableLayout costumeTableLayout;
@BindView(R.id.avatar_attributes_progress)
ProgressBar attributesProgress;
@BindView(R.id.avatar_equip_progress)
ProgressBar equipmentProgress;
@BindView(R.id.avatar_costume_progress)
ProgressBar costumeProgress;
@BindView(R.id.profile_costume_card)
CardView costumeCard;
@BindView(R.id.avatar_with_bars)
View avatar_with_bars;
private AvatarWithBarsViewModel avatarWithBars;
@BindView(R.id.fullprofile_scrollview)
ScrollView fullprofile_scrollview;
@BindView(R.id.profile_pet_count)
TextView petCount;
@BindView(R.id.profile_mount_count)
TextView mountCount;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
Bundle bundle = intent.getExtras();
this.userId = bundle.getString("userId");
setTitle(R.string.profile_loading_data);
apiHelper.apiService.GetMember(this.userId)
.compose(apiHelper.configureApiCallObserver())
.subscribe(habitRPGUser -> updateView(habitRPGUser),
throwable -> {
});
avatarWithBars = new AvatarWithBarsViewModel(this, avatar_with_bars);
avatarWithBars.hideGems();
avatarWithBars.valueBarLabelsToBlack();
avatar_with_bars.setBackgroundColor(getResources().getColor(R.color.transparent));
attributeRows.clear();
attributesCardView.setOnClickListener(view -> toggleAttributeDetails());
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.private_message) {
showSendMessageToUserDialog();
return true;
}
if (id == android.R.id.home) {
// app icon in action bar clicked; goto parent activity.
this.finish();
return true;
}
return super.onOptionsItemSelected(item);
}
private void showSendMessageToUserDialog() {
LayoutInflater factory = LayoutInflater.from(this);
final View newMessageView = factory.inflate(
R.layout.profile_new_message_dialog, null);
EmojiEditText emojiEditText = (EmojiEditText) newMessageView.findViewById(R.id.edit_new_message_text);
TextView newMessageTitle = (TextView) newMessageView.findViewById(R.id.new_message_title);
newMessageTitle.setText(String.format(getString(R.string.profile_send_message_to), userName));
final AlertDialog addMessageDialog = new AlertDialog.Builder(this)
.setPositiveButton(android.R.string.ok, (dialogInterface, i) -> {
HashMap<String, String> messageObject = new HashMap<>();
messageObject.put("message", emojiEditText.getText().toString());
messageObject.put("toUserId", userId);
apiHelper.apiService.postPrivateMessage(messageObject)
.compose(apiHelper.configureApiCallObserver())
.subscribe(postChatMessageResult -> {
UiUtils.showSnackbar(FullProfileActivity.this, FullProfileActivity.this.fullprofile_scrollview,
String.format(getString(R.string.profile_message_sent_to), userName), UiUtils.SnackbarDisplayType.NORMAL);
}, throwable -> {
});
UiUtils.dismissKeyboard(HabiticaApplication.currentActivity);
})
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) -> {
UiUtils.dismissKeyboard(HabiticaApplication.currentActivity);
})
.create();
addMessageDialog.setView(newMessageView);
addMessageDialog.show();
}
private void updateView(HabitRPGUser user) {
Profile profile = user.getProfile();
Stats stats = user.getStats();
userName = profile.getName();
setTitle(profile.getName());
String imageUrl = profile.getImageUrl();
if (imageUrl == null || imageUrl.isEmpty()) {
profile_image.setVisibility(View.GONE);
} else {
profile_image.setController(Fresco.newDraweeControllerBuilder()
.setUri(imageUrl)
.setControllerListener(new BaseControllerListener<ImageInfo>() {
@Override
public void onFailure(String id, Throwable throwable) {
profile_image.setVisibility(View.GONE);
}
})
.build());
}
String blurbText = profile.getBlurb();
if (blurbText != null && !blurbText.isEmpty()) {
blurbTextView.setText(MarkdownParser.parseMarkdown(blurbText));
}
avatarView.setUser(user);
avatarWithBars.updateData(user);
addLevelAttributes(stats, user);
petCount.setText(countEntries(user.getItems().getPets()) + "");
mountCount.setText(countEntriesBool(user.getItems().getMounts()) + "");
}
private int countEntries(HashMap<String, Integer> hashMap) {
int _count = 0;
for (Map.Entry<String, Integer> e : hashMap.entrySet()) {
if (e.getValue() == -1)
continue;
_count += e.getValue();
}
return _count;
}
private int countEntriesBool(HashMap<String, Boolean> hashMap) {
int _count = 0;
for (Map.Entry<String, Boolean> e : hashMap.entrySet()) {
if (e.getValue() == null)
continue;
_count += 1;
}
return _count;
}
// region Utils
private void stopAndHideProgress(ProgressBar bar) {
bar.setIndeterminate(false);
bar.setVisibility(View.GONE);
}
private String getCeiledValue(float val) {
return ((int) Math.ceil(val)) + "";
}
private TableRow addEquipmentRow(TableLayout table, String gearKey, String text, String stats) {
TableRow gearRow = (TableRow) getLayoutInflater().inflate(R.layout.profile_gear_tablerow, null);
SimpleDraweeView draweeView = (SimpleDraweeView) gearRow.findViewById(R.id.gear_drawee);
draweeView.setController(Fresco.newDraweeControllerBuilder()
.setUri(AvatarView.IMAGE_URI_ROOT + "shop_" + gearKey + ".png")
.setControllerListener(new BaseControllerListener<ImageInfo>() {
@Override
public void onFailure(String id, Throwable throwable) {
draweeView.setVisibility(View.GONE);
}
})
.build());
TextView keyTextView = (TextView) gearRow.findViewById(R.id.tableRowTextView1);
keyTextView.setText(text);
table.addView(gearRow);
TextView valueTextView = (TextView) gearRow.findViewById(R.id.tableRowTextView2);
if (!stats.isEmpty()) {
valueTextView.setText(stats);
} else {
valueTextView.setVisibility(View.GONE);
}
return gearRow;
}
// endregion
// region Attributes
private float attributeStrSum = 0;
private float attributeIntSum = 0;
private float attributeConSum = 0;
private float attributePerSum = 0;
private void addLevelAttributes(Stats stats, HabitRPGUser user) {
float byLevelStat = stats.getLvl() / 2.0f;
addAttributeRow(getString(R.string.profile_level), byLevelStat, byLevelStat, byLevelStat, byLevelStat, false);
loadItemDataByOutfit(user.getItems().getGear().getEquipped(), obj -> {
gotGear(obj, user);
addNormalAddBuffAttributes(stats);
stopAndHideProgress(attributesProgress);
});
if (user.getPreferences().getCostume()) {
loadItemDataByOutfit(user.getItems().getGear().getCostume(), obj -> {
gotCostume(obj);
});
} else {
costumeCard.setVisibility(View.GONE);
}
}
private void loadItemDataByOutfit(Outfit outfit, ContentCache.GotContentEntryCallback<List<ItemData>> gotEntries) {
ArrayList<String> outfitList = new ArrayList<>();
outfitList.add(outfit.getArmor());
outfitList.add(outfit.getBack());
outfitList.add(outfit.getBody());
outfitList.add(outfit.getEyeWear());
outfitList.add(outfit.getHead());
outfitList.add(outfit.getHeadAccessory());
outfitList.add(outfit.getShield());
outfitList.add(outfit.getWeapon());
contentCache.GetItemDataList(outfitList, gotEntries);
}
public void gotGear(List<ItemData> obj, HabitRPGUser user) {
float strAttributes = 0;
float intAttributes = 0;
float conAttributes = 0;
float perAttributes = 0;
// Summarize stats and fill equipment table
for (ItemData i : obj) {
int str_ = (int) i.getStr();
int int_ = (int) i.get_int();
int con_ = (int) i.getCon();
int per_ = (int) i.getPer();
strAttributes += str_;
intAttributes += int_;
conAttributes += con_;
perAttributes += per_;
StringBuilder sb = new StringBuilder();
if (str_ != 0) {
sb.append("STR " + str_ + ", ");
}
if (int_ != 0) {
sb.append("INT " + int_ + ", ");
}
if (con_ != 0) {
sb.append("CON " + con_ + ", ");
}
if (per_ != 0) {
sb.append("PER " + per_ + ", ");
}
// remove the last comma
if (sb.length() > 2) {
sb.delete(sb.length() - 2, sb.length());
}
addEquipmentRow(equipmentTableLayout, i.getKey(), i.getText(), sb.toString());
}
stopAndHideProgress(equipmentProgress);
equipmentTableLayout.setVisibility(View.VISIBLE);
addAttributeRow(getString(R.string.battle_gear) + ": ", strAttributes, intAttributes, conAttributes, perAttributes, false);
if (!user.getPreferences().isDisableClasses()) {
float strClassBonus = 0;
float intClassBonus = 0;
float conClassBonus = 0;
float perClassBonus = 0;
switch (user.getStats().get_class()) {
case rogue:
strClassBonus = strAttributes * 0.5f;
perClassBonus = perAttributes * 0.5f;
break;
case healer:
conClassBonus = conAttributes * 0.5f;
intClassBonus = intClassBonus * 0.5f;
break;
case warrior:
strClassBonus = strAttributes * 0.5f;
conClassBonus = conAttributes * 0.5f;
break;
case wizard:
intClassBonus = intClassBonus * 0.5f;
perClassBonus = perAttributes * 0.5f;
break;
}
addAttributeRow(getString(R.string.profile_class_bonus), strClassBonus, intClassBonus, conClassBonus, perClassBonus, false);
}
}
public void gotCostume(List<ItemData> obj) {
// fill costume table
for (ItemData i : obj) {
addEquipmentRow(costumeTableLayout, i.getKey(), i.getText(), "");
}
stopAndHideProgress(costumeProgress);
}
private void addNormalAddBuffAttributes(Stats stats) {
Buffs buffs = stats.getBuffs();
addAttributeRow(getString(R.string.profile_allocated), stats.getStr(), stats.get_int(), stats.getCon(), stats.getPer(), false);
addAttributeRow(getString(R.string.profile_boosts), buffs.getStr(), buffs.get_int(), buffs.getCon(), buffs.getPer(), false);
// Summary row
addAttributeRow("", attributeStrSum, attributeIntSum, attributeConSum, attributePerSum, true);
}
private TableRow addAttributeRow(String label, float strVal, float intVal, float conVal, float perVal, boolean isSummary) {
TableRow tableRow = (TableRow) getLayoutInflater().inflate(R.layout.profile_attributetablerow, null);
TextView keyTextView = (TextView) tableRow.findViewById(R.id.tv_attribute_type);
keyTextView.setText(label);
TextView strTextView = (TextView) tableRow.findViewById(R.id.tv_attribute_str);
strTextView.setText(getCeiledValue(strVal));
TextView intTextView = (TextView) tableRow.findViewById(R.id.tv_attribute_int);
intTextView.setText(getCeiledValue(intVal));
TextView conTextView = (TextView) tableRow.findViewById(R.id.tv_attribute_con);
conTextView.setText(getCeiledValue(conVal));
TextView perTextView = (TextView) tableRow.findViewById(R.id.tv_attribute_per);
perTextView.setText(getCeiledValue(perVal));
if (isSummary) {
strTextView.setTypeface(null, Typeface.BOLD);
intTextView.setTypeface(null, Typeface.BOLD);
conTextView.setTypeface(null, Typeface.BOLD);
perTextView.setTypeface(null, Typeface.BOLD);
} else {
attributeStrSum += strVal;
attributeIntSum += intVal;
attributeConSum += conVal;
attributePerSum += perVal;
attributeRows.add(tableRow);
tableRow.setVisibility(View.GONE);
}
attributesTableLayout.addView(tableRow);
return tableRow;
}
private boolean attributeDetailsHidden = true;
private ArrayList<TableRow> attributeRows = new ArrayList<>();
private void toggleAttributeDetails() {
attributeDetailsHidden = !attributeDetailsHidden;
attributesCollapseIcon.setImageDrawable(getResources().getDrawable(attributeDetailsHidden ? R.drawable.ic_keyboard_arrow_right_black_24dp : R.drawable.ic_keyboard_arrow_down_black_24dp));
for (TableRow row : attributeRows) {
row.setVisibility(attributeDetailsHidden ? View.GONE : View.VISIBLE);
}
}
// endregion
// region Navigation
@Override
public boolean onSupportNavigateUp() {
finish();
return true;
}
@Override
public void onBackPressed() {
finish();
}
// endregion
// region BaseActivity-Overrides
@Override
protected int getLayoutResId() {
return R.layout.activity_full_profile;
}
@Override
protected void injectActivity(AppComponent component) {
component.inject(this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_full_profile, menu);
return true;
}
// endregion
}

View file

@ -49,7 +49,7 @@ public class IntroActivity extends BaseActivity implements View.OnClickListener,
this.skipButton.setOnClickListener(this);
this.finishButton.setOnClickListener(this);
apiHelper.apiService.getContent()
apiHelper.apiService.getContent(apiHelper.languageCode)
.compose(apiHelper.configureApiCallObserver())
.subscribe(contentResult -> {
}, throwable -> {

View file

@ -28,6 +28,7 @@ import com.habitrpg.android.habitica.events.commands.DeleteTaskCommand;
import com.habitrpg.android.habitica.events.commands.EquipCommand;
import com.habitrpg.android.habitica.events.commands.FeedCommand;
import com.habitrpg.android.habitica.events.commands.HatchingCommand;
import com.habitrpg.android.habitica.events.commands.OpenFullProfileCommand;
import com.habitrpg.android.habitica.events.commands.OpenGemPurchaseFragmentCommand;
import com.habitrpg.android.habitica.events.commands.OpenMenuItemCommand;
import com.habitrpg.android.habitica.events.commands.SellItemCommand;
@ -45,6 +46,7 @@ import com.habitrpg.android.habitica.ui.menu.MainDrawerBuilder;
import com.habitrpg.android.habitica.userpicture.BitmapUtils;
import com.magicmicky.habitrpgwrapper.lib.api.MaintenanceApiService;
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
import com.magicmicky.habitrpgwrapper.lib.models.Preferences;
import com.magicmicky.habitrpgwrapper.lib.models.Shop;
import com.magicmicky.habitrpgwrapper.lib.models.Stats;
import com.magicmicky.habitrpgwrapper.lib.models.SuppressedModals;
@ -331,6 +333,13 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
private void setUserData(boolean fromLocalDb) {
if (user != null) {
Preferences preferences = user.getPreferences();
if(preferences!= null) {
apiHelper.languageCode = preferences.getLanguage();
}
Calendar calendar = new GregorianCalendar();
TimeZone timeZone = calendar.getTimeZone();
long offset = -TimeUnit.MINUTES.convert(timeZone.getOffset(calendar.getTimeInMillis()), TimeUnit.MILLISECONDS);
@ -1117,7 +1126,7 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
public void reloadContent(ReloadContentEvent event) {
if (!this.isloadingContent) {
this.isloadingContent = true;
this.apiHelper.apiService.getContent()
this.apiHelper.apiService.getContent(apiHelper.languageCode)
.compose(apiHelper.configureApiCallObserver())
.subscribe(contentResult -> {
isloadingContent = false;
@ -1515,6 +1524,21 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
this.filterDrawer.addItem(item);
}
@Subscribe
public void onEvent(OpenFullProfileCommand cmd) {
if(cmd.MemberId.equals("system"))
return;
Bundle bundle = new Bundle();
bundle.putString("userId", cmd.MemberId);
Intent intent = new Intent(this, FullProfileActivity.class);
intent.putExtras(bundle);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
public void removeFilterDrawerItem(int position) {
this.filterDrawer.removeItemByPosition(position);
}

View file

@ -144,7 +144,7 @@ public class ShopRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
if (item.getValue() == 1) {
currencyString = context.getString(R.string.gold_singular);
} else {
currencyString = context.getString(R.string.gems_plural);
currencyString = context.getString(R.string.gold_plural);
}
} else if (item.getCurrency().equals("hourglasses")) {
if (item.getValue() == 1) {
@ -162,10 +162,6 @@ public class ShopRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
});
}
private void canBuy() {
}
private void buyItem() {
BuyGemItemCommand command = new BuyGemItemCommand();
command.shopIdentifier = shopIdentifier;

View file

@ -6,6 +6,7 @@ import com.habitrpg.android.habitica.events.commands.CopyChatAsTodoCommand;
import com.habitrpg.android.habitica.events.commands.CopyChatMessageCommand;
import com.habitrpg.android.habitica.events.commands.DeleteChatMessageCommand;
import com.habitrpg.android.habitica.events.commands.FlagChatMessageCommand;
import com.habitrpg.android.habitica.events.commands.OpenFullProfileCommand;
import com.habitrpg.android.habitica.events.commands.OpenNewPMActivityCommand;
import com.habitrpg.android.habitica.events.commands.SendNewGroupMessageCommand;
import com.habitrpg.android.habitica.events.commands.SendNewInboxMessageCommand;
@ -261,6 +262,13 @@ public class ChatRecyclerViewAdapter extends RecyclerView.Adapter<ChatRecyclerVi
} else {
userLabel.setText(msg.user);
}
userLabel.setClickable(true);
userLabel.setOnClickListener(view -> {
OpenFullProfileCommand cmd = new OpenFullProfileCommand(msg.uuid);
EventBus.getDefault().post(cmd);
});
}
DataBindingUtils.setForegroundTintColor(userLabel, msg.getContributorForegroundColor());

View file

@ -2,12 +2,15 @@ package com.habitrpg.android.habitica.ui.adapter.social;
import com.habitrpg.android.habitica.R;
import com.habitrpg.android.habitica.databinding.ValueBarBinding;
import com.habitrpg.android.habitica.events.commands.OpenFullProfileCommand;
import com.habitrpg.android.habitica.ui.AvatarView;
import com.habitrpg.android.habitica.ui.AvatarWithBarsViewModel;
import com.habitrpg.android.habitica.ui.activities.SetupActivity;
import com.habitrpg.android.habitica.ui.helpers.ViewHelper;
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.databinding.DataBindingUtil;
import android.support.v4.content.ContextCompat;
@ -17,6 +20,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import org.greenrobot.eventbus.EventBus;
import java.util.List;
import butterknife.BindView;
@ -121,6 +126,15 @@ public class PartyMemberRecyclerViewAdapter extends RecyclerView.Adapter<PartyMe
}
ViewHelper.SetBackgroundTint(classBackground, ContextCompat.getColor(context, colorResourceID));
userName.setText(user.getProfile().getName());
itemView.setClickable(true);
itemView.setOnClickListener(view -> {
OpenFullProfileCommand cmd = new OpenFullProfileCommand(user.getId());
EventBus.getDefault().post(cmd);
});
}
}
}

View file

@ -13,21 +13,26 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
public class PublicGuildsRecyclerViewAdapter extends RecyclerView.Adapter<PublicGuildsRecyclerViewAdapter.GuildViewHolder> {
public class PublicGuildsRecyclerViewAdapter extends RecyclerView.Adapter<PublicGuildsRecyclerViewAdapter.GuildViewHolder> implements Filterable{
public APIHelper apiHelper;
private List<Group> publicGuildList;
private List<Group> fullPublicGuildList;
private List<String> memberGuildIDs;
public void setPublicGuildList(List<Group> publicGuildList) {
this.publicGuildList = publicGuildList;
this.fullPublicGuildList = new ArrayList<>(publicGuildList);
this.notifyDataSetChanged();
}
@ -94,6 +99,44 @@ public class PublicGuildsRecyclerViewAdapter extends RecyclerView.Adapter<Public
return this.memberGuildIDs != null && this.memberGuildIDs.contains(guild.id);
}
@Override
public Filter getFilter() {
return new Filter() {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
List<Group> filteredGuilds = null;
if(constraint.length() == 0) {
filteredGuilds = fullPublicGuildList;
} else {
filteredGuilds = getFilteredResults(constraint.toString().toLowerCase());
}
FilterResults results = new FilterResults();
results.values = filteredGuilds;
return results;
}
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
publicGuildList = (List<Group>) results.values;
PublicGuildsRecyclerViewAdapter.this.notifyDataSetChanged();
}
};
}
protected List<Group> getFilteredResults(String query) {
List<Group> filteredGuilds = new ArrayList<>();
for(Group guild : fullPublicGuildList) {
if(guild.name.toLowerCase().contains(query)) {
filteredGuilds.add(guild);
}
}
return filteredGuilds;
}
static class GuildViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.nameTextView)

View file

@ -16,6 +16,7 @@ import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import rx.Observable;
@ -29,7 +30,7 @@ public class RewardsRecyclerViewAdapter extends BaseTasksRecyclerViewAdapter<Rew
super(taskType, tagsHelper, layoutResource, newContext, user.getId());
this.user = user;
this.apiHelper = apiHelper;
this.contentCache = new ContentCache(apiHelper.apiService);
this.contentCache = new ContentCache(apiHelper);
}
@Override

View file

@ -149,6 +149,9 @@ public class AvatarCustomizationFragment extends BaseMainFragment {
private void updateActiveCustomization() {
Preferences prefs = this.user.getPreferences();
if (this.type == null) {
return;
}
switch (this.type) {
case "skin":
this.activeCustomization = prefs.getSkin();

View file

@ -61,7 +61,7 @@ public class AvatarOverviewFragment extends BaseMainFragment implements AdapterV
super.onCreate(savedInstanceState);
if (this.apiHelper != null) {
this.apiHelper.apiService.getContent()
this.apiHelper.apiService.getContent(apiHelper.languageCode)
.compose(apiHelper.configureApiCallObserver())
.subscribe(contentResult -> {
}, throwable -> {

View file

@ -4,14 +4,20 @@ import com.habitrpg.android.habitica.R;
import com.habitrpg.android.habitica.components.AppComponent;
import com.habitrpg.android.habitica.ui.adapter.social.PublicGuildsRecyclerViewAdapter;
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment;
import com.habitrpg.android.habitica.ui.helpers.UiUtils;
import com.habitrpg.android.habitica.ui.menu.DividerItemDecoration;
import com.magicmicky.habitrpgwrapper.lib.models.Group;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SearchView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
@ -20,7 +26,7 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
public class PublicGuildsFragment extends BaseMainFragment {
public class PublicGuildsFragment extends BaseMainFragment implements SearchView.OnQueryTextListener {
List<String> memberGuildIDs;
List<Group> guilds;
@ -30,13 +36,14 @@ public class PublicGuildsFragment extends BaseMainFragment {
private View view;
private PublicGuildsRecyclerViewAdapter viewAdapter;
private SearchView guildSearchView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
if (view == null) {
view = inflater.inflate(R.layout.fragment_recyclerview, container, false);
view = inflater.inflate(R.layout.fragment_guild_recyclerview, container, false);
unbinder = ButterKnife.bind(this, view);
recyclerView.setLayoutManager(new LinearLayoutManager(this.activity));
@ -76,4 +83,30 @@ public class PublicGuildsFragment extends BaseMainFragment {
});
}
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_public_guild, menu);
MenuItem searchItem = menu.findItem(R.id.action_guild_search);
guildSearchView = (SearchView)searchItem.getActionView();
SearchView.SearchAutoComplete theTextArea = (SearchView.SearchAutoComplete) guildSearchView.findViewById(R.id.search_src_text);
theTextArea.setHintTextColor(ContextCompat.getColor(this.activity,R.color.white));
guildSearchView.setQueryHint(getString(R.string.guild_search_hint));
guildSearchView.setOnQueryTextListener(this);
}
@Override
public boolean onQueryTextSubmit(String s) {
viewAdapter.getFilter().filter(s);
UiUtils.dismissKeyboard(this.activity);
return true;
}
@Override
public boolean onQueryTextChange(String s) {
viewAdapter.getFilter().filter(s);
return true;
}
}

View file

@ -14,6 +14,10 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.Locale;
import javax.inject.Inject;
public class TavernFragment extends BaseMainFragment {
public ViewPager viewPager;
@ -22,6 +26,9 @@ public class TavernFragment extends BaseMainFragment {
ChatListFragment chatListFragment;
GroupInformationFragment questInfoFragment;
@Inject
ContentCache contentCache;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
@ -60,8 +67,6 @@ public class TavernFragment extends BaseMainFragment {
TavernFragment.this.tabLayout.setupWithViewPager(TavernFragment.this.viewPager);
}
ContentCache contentCache = new ContentCache(apiHelper.apiService);
contentCache.GetQuestContent(group.quest.key, content -> {
if (questInfoFragment != null) {
questInfoFragment.setQuestContent(content);

View file

@ -3,6 +3,8 @@ package com.habitrpg.android.habitica.ui.fragments.social.party;
import com.habitrpg.android.habitica.ContentCache;
import com.habitrpg.android.habitica.R;
import com.habitrpg.android.habitica.components.AppComponent;
import com.habitrpg.android.habitica.events.commands.OpenFullProfileCommand;
import com.habitrpg.android.habitica.ui.activities.FullProfileActivity;
import com.habitrpg.android.habitica.ui.activities.GroupFormActivity;
import com.habitrpg.android.habitica.ui.activities.PartyInviteActivity;
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment;
@ -25,12 +27,16 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
public class PartyFragment extends BaseMainFragment {
@ -40,7 +46,9 @@ public class PartyFragment extends BaseMainFragment {
private PartyMemberListFragment partyMemberListFragment;
private GroupInformationFragment groupInformationFragment;
private ChatListFragment chatListFragment;
private ContentCache contentCache;
@Inject
ContentCache contentCache;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
@ -53,8 +61,6 @@ public class PartyFragment extends BaseMainFragment {
viewPager.setCurrentItem(0);
contentCache = new ContentCache(apiHelper.apiService);
// Get the full group data
if (this.user != null && this.user.getParty() != null && this.user.getParty().id != null) {
apiHelper.apiService.getGroup("party")

View file

@ -6,6 +6,7 @@ import com.magicmicky.habitrpgwrapper.lib.models.tasks.Task;
import org.greenrobot.eventbus.EventBus;
import android.graphics.Color;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
@ -17,6 +18,8 @@ public class HabitViewHolder extends BaseTaskViewHolder {
@BindView(R.id.btnPlusWrapper)
FrameLayout btnPlusWrapper;
@BindView(R.id.btnPlusIconView)
View btnPlusIconView;
@BindView(R.id.btnPlusBackground)
View btnPlusBackground;
@BindView(R.id.btnPlus)
@ -24,6 +27,8 @@ public class HabitViewHolder extends BaseTaskViewHolder {
@BindView(R.id.btnMinusWrapper)
FrameLayout btnMinusWrapper;
@BindView(R.id.btnMinusIconView)
View btnMinusIconView;
@BindView(R.id.btnMinusBackground)
View btnMinusBackground;
@BindView(R.id.btnMinus)

View file

@ -47,7 +47,7 @@ public interface ApiService {
Observable<Status> getStatus();
@GET("content")
Observable<ContentResult> getContent();
Observable<ContentResult> getContent(@Query("language") String language);
/* user API */
@ -197,7 +197,7 @@ public interface ApiService {
// Like returns the full chat list
@POST("groups/{gid}/chat/{mid}/like")
Observable<List<Void>> likeMessage(@Path("gid") String groupId, @Path("mid") String mid);
Observable<ChatMessage> likeMessage(@Path("gid") String groupId, @Path("mid") String mid);
@POST("groups/{gid}/chat/{mid}/flag")
Observable<Void> flagMessage(@Path("gid") String groupId, @Path("mid") String mid);
@ -236,6 +236,9 @@ public interface ApiService {
Observable<PurchaseValidationResult> validatePurchase(@Body PurchaseValidationRequest request);
//Members URL
@GET("members/{mid}")
Observable<HabitRPGUser> GetMember(@Path("mid") String memberId);
@POST("members/send-private-message")
Observable<PostChatMessageResult> postPrivateMessage(@Body HashMap<String, String> messageDetails);

View file

@ -317,8 +317,7 @@ public class HabitRPGUser extends BaseModel {
authentication.user_id = id;
flags.user_id = id;
if (contributor != null) { contributor.user_id = id; }
contributor.user_id = id;
invitations.user_id = id;
if (invitations != null) { invitations.user_id = id; }
ArrayList<Task> allTasks = new ArrayList<Task>();

View file

@ -33,7 +33,7 @@ public class Preferences extends BaseModel {
@Column
private boolean costume, toolbarCollapsed, advancedCollapsed, tagsCollapsed, newTaskEdit, disableClasses, stickyHeader, sleep, hideHeader;
@Column
private String allocationMode, shirt, skin, size, background, chair;
private String allocationMode, shirt, skin, size, background, chair, language;
@Column
private int dayStart, timezoneOffset;
@ -203,6 +203,14 @@ public class Preferences extends BaseModel {
this.disableClasses = disableClasses;
}
public String getLanguage(){
return language;
}
public void setLanguage(String language){
this.language = language;
}
@Override
public void save() {
hair.userId = user_id;

View file

@ -26,7 +26,7 @@ public class Stats extends PlayerMinStats {
}
public Integer getMaxHealth() {
return maxHealth != null ? maxHealth : Integer.valueOf(0);
return maxHealth != null ? maxHealth : Integer.valueOf(50);
}
public void setMaxHealth(Integer maxHealth) {