diff --git a/.travis.yml b/.travis.yml index 72ac656dd..f8dcfb42e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,29 @@ language: android jdk: oraclejdk8 +sudo: required +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 before_install: + - $CXX --version - export JAVA7_HOME=/usr/lib/jvm/java-7-oracle - export JAVA8_HOME=/usr/lib/jvm/java-8-oracle - - nvm install 6.9.3 - - nvm use 6.9.3 - - npm i -g npm@4 - - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 - - echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list - - sudo apt-get update - - sudo apt-get install mongodb-org-server - - git clone https://github.com/HabitRPG/habitrpg.git ../habitrpg - - until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 2; done - - cd ../habitrpg && cp config.json.example config.json && npm install - - npm start & - - until nc -z localhost 3000; do echo Waiting for Habitica Server; sleep 2; done - - cd - + - if [ $REQUIRES_SERVER ]; then nvm install 6.9.3; fi + - if [ $REQUIRES_SERVER ]; then nvm use 6.9.3; fi + - if [ $REQUIRES_SERVER ]; then npm i -g npm@4; fi + - if [ $REQUIRES_SERVER ]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; fi + - if [ $REQUIRES_SERVER ]; then echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list; fi + - if [ $REQUIRES_SERVER ]; then sudo apt-get update; fi + - if [ $REQUIRES_SERVER ]; then sudo apt-get install mongodb-org-server; fi + - if [ $REQUIRES_SERVER ]; then git clone https://github.com/HabitRPG/habitrpg.git ../habitrpg; fi + - if [ $REQUIRES_SERVER ]; then until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 2; done; fi + - if [ $REQUIRES_SERVER ]; then cd ../habitrpg && cp config.json.example config.json && npm install; fi + - if [ $REQUIRES_SERVER ]; then npm start; fi & + - if [ $REQUIRES_SERVER ]; then until nc -z localhost 3000; do echo Waiting for Habitica Server; sleep 2; done; fi + - if [ $REQUIRES_SERVER ]; then cd -; fi android: components: # Uncomment the lines below if you want to @@ -42,9 +50,16 @@ android: - 'android-sdk-preview-license-52d11cd2' - 'android-sdk-license-.+' - 'google-gdk-license-.+' +before_script: + - cp habitica.properties.travis habitica.properties + - cp habitica.resources.example habitica.resources + - cp Habitica/google-services.json.example Habitica/google-services.json script: - - cp habitica.properties.travis habitica.properties - - cp habitica.resources.example habitica.resources - - cp Habitica/google-services.json.example Habitica/google-services.json - - ./gradlew assembleDebug -PdisablePreDex - - ./gradlew testDebugUnitTest -PdisablePreDex --stacktrace --info + - ./gradlew $TEST +env: + global: + - CXX=g++-4.8 + - DISABLE_REQUEST_LOGGING=true + matrix: + - TEST="assembleDebug -PdisablePreDex" + - TEST="testDebugUnitTest -PdisablePreDex --stacktrace --info" REQUIRES_SERVER=true diff --git a/.tx/config b/.tx/config index a3df04c4e..69b82749a 100644 --- a/.tx/config +++ b/.tx/config @@ -1,6 +1,6 @@ [main] host = https://www.transifex.com -lang_map = pt_BR: pt-rBR, zh_TW: zh-rTW, hr_HR: hr-rHR, pt_PT: pt-rPT, en_GB: en-rGB +lang_map = pt_BR: pt-rBR, zh_TW: zh-rTW, hr_HR: hr-rHR, pt_PT: pt-rPT, en_GB: en-rGB, he: iw, id: in [habitica-android.store_stringsxml] file_filter = translations/store_strings-.xml diff --git a/Habitica/AndroidManifest.xml b/Habitica/AndroidManifest.xml index 48932a209..7e415a6bb 100644 --- a/Habitica/AndroidManifest.xml +++ b/Habitica/AndroidManifest.xml @@ -2,14 +2,14 @@ + android:targetSdkVersion="25" /> @@ -75,7 +75,9 @@ - + - + diff --git a/Habitica/res/drawable/ic_keyboard_arrow_up_black_24dp.xml b/Habitica/res/drawable/ic_keyboard_arrow_up_black_24dp.xml new file mode 100644 index 000000000..0f8503e44 --- /dev/null +++ b/Habitica/res/drawable/ic_keyboard_arrow_up_black_24dp.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Habitica/res/drawable/pill_bg.xml b/Habitica/res/drawable/pill_bg.xml new file mode 100644 index 000000000..c5f636827 --- /dev/null +++ b/Habitica/res/drawable/pill_bg.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Habitica/res/drawable/pill_bg_green.xml b/Habitica/res/drawable/pill_bg_green.xml new file mode 100644 index 000000000..873c7a182 --- /dev/null +++ b/Habitica/res/drawable/pill_bg_green.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Habitica/res/drawable/pill_bg_purple.xml b/Habitica/res/drawable/pill_bg_purple.xml new file mode 100644 index 000000000..9dea0a7a0 --- /dev/null +++ b/Habitica/res/drawable/pill_bg_purple.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Habitica/res/drawable/pill_bg_red.xml b/Habitica/res/drawable/pill_bg_red.xml new file mode 100644 index 000000000..ec876d10c --- /dev/null +++ b/Habitica/res/drawable/pill_bg_red.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Habitica/res/drawable/subscription_selected.xml b/Habitica/res/drawable/subscription_selected.xml new file mode 100644 index 000000000..574a817f9 --- /dev/null +++ b/Habitica/res/drawable/subscription_selected.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Habitica/res/drawable/subscription_unselected.xml b/Habitica/res/drawable/subscription_unselected.xml new file mode 100644 index 000000000..c290a3fdd --- /dev/null +++ b/Habitica/res/drawable/subscription_unselected.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Habitica/res/layout/activity_full_profile.xml b/Habitica/res/layout/activity_full_profile.xml index ffd566b61..6e398d916 100644 --- a/Habitica/res/layout/activity_full_profile.xml +++ b/Habitica/res/layout/activity_full_profile.xml @@ -9,7 +9,7 @@ @@ -295,11 +293,11 @@ android:textStyle="bold" /> + android:id="@+id/attributes_collapse_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp" + android:layout_gravity="bottom" /> diff --git a/Habitica/res/layout/activity_gem_purchase.xml b/Habitica/res/layout/activity_gem_purchase.xml index 7776fe9a0..4c0e82efc 100644 --- a/Habitica/res/layout/activity_gem_purchase.xml +++ b/Habitica/res/layout/activity_gem_purchase.xml @@ -19,10 +19,11 @@ android:elevation="0dp" tools:context=".ui.activities.MainActivity"> - + app:tabMode="fixed" /> diff --git a/Habitica/res/layout/avatar_with_bars.xml b/Habitica/res/layout/avatar_with_bars.xml index a7605bd7b..f943080e2 100644 --- a/Habitica/res/layout/avatar_with_bars.xml +++ b/Habitica/res/layout/avatar_with_bars.xml @@ -1,21 +1,22 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/avatar_with_bars_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:adjustViewBounds="true" + android:fitsSystemWindows="true" + android:focusable="true" + android:focusableInTouchMode="true" + android:orientation="vertical" + android:background="@color/brand" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:paddingStart="16dp" + android:paddingEnd="16dp"> @@ -72,7 +73,8 @@ android:drawablePadding="6dp" android:gravity="center" android:textSize="14sp" - android:textColor="@color/textColorSecondaryDark" /> + android:textColor="@color/textColorSecondaryDark" + tools:text="Lvl 12 Warrior" /> + app:srcCompat="@drawable/ic_keyboard_arrow_right_gray_24dp"/> \ No newline at end of file diff --git a/Habitica/res/layout/dialog_challenge_detail.xml b/Habitica/res/layout/dialog_challenge_detail.xml index 90d22542c..ab70fcc7a 100644 --- a/Habitica/res/layout/dialog_challenge_detail.xml +++ b/Habitica/res/layout/dialog_challenge_detail.xml @@ -70,7 +70,7 @@ @@ -138,7 +138,7 @@ android:orientation="horizontal"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/border_1f000000" + android:orientation="horizontal" + android:weightSum="3" + android:baselineAligned="false"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@drawable/border_1f000000" + android:weightSum="3" + android:baselineAligned="false"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@drawable/border_1f000000" + android:weightSum="3" + android:baselineAligned="false"> - - - - - - \ No newline at end of file diff --git a/Habitica/res/layout/dialog_challenge_detail_todo.xml b/Habitica/res/layout/dialog_challenge_detail_todo.xml index 5fc9d7fa3..402ded014 100644 --- a/Habitica/res/layout/dialog_challenge_detail_todo.xml +++ b/Habitica/res/layout/dialog_challenge_detail_todo.xml @@ -1,11 +1,12 @@ + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/border_1f000000" + android:orientation="horizontal" + android:weightSum="3" + android:baselineAligned="false"> + android:focusable="true" + android:maxLines="1"/>