Merge branch 'develop' of https://github.com/HabitRPG/habitica-android into challenges_joined
Conflicts: Habitica/AndroidManifest.xml Habitica/res/drawable-hdpi/ic_header_exp.png Habitica/res/drawable-hdpi/ic_header_gem.png Habitica/res/drawable-hdpi/ic_header_gold.png Habitica/res/drawable-hdpi/ic_header_healer.png Habitica/res/drawable-hdpi/ic_header_heart.png Habitica/res/drawable-hdpi/ic_header_mage.png Habitica/res/drawable-hdpi/ic_header_magic.png Habitica/res/drawable-hdpi/ic_header_rogue.png Habitica/res/drawable-hdpi/ic_header_silver.png Habitica/res/drawable-hdpi/ic_header_warrior.png Habitica/res/drawable-mdpi/ic_header_exp.png Habitica/res/drawable-mdpi/ic_header_gem.png Habitica/res/drawable-mdpi/ic_header_gold.png Habitica/res/drawable-mdpi/ic_header_healer.png Habitica/res/drawable-mdpi/ic_header_heart.png Habitica/res/drawable-mdpi/ic_header_mage.png Habitica/res/drawable-mdpi/ic_header_magic.png Habitica/res/drawable-mdpi/ic_header_rogue.png Habitica/res/drawable-mdpi/ic_header_silver.png Habitica/res/drawable-mdpi/ic_header_warrior.png Habitica/res/drawable-xhdpi/ic_header_exp.png Habitica/res/drawable-xhdpi/ic_header_gem.png Habitica/res/drawable-xhdpi/ic_header_gold.png Habitica/res/drawable-xhdpi/ic_header_healer.png Habitica/res/drawable-xhdpi/ic_header_heart.png Habitica/res/drawable-xhdpi/ic_header_mage.png Habitica/res/drawable-xhdpi/ic_header_magic.png Habitica/res/drawable-xhdpi/ic_header_rogue.png Habitica/res/drawable-xhdpi/ic_header_silver.png Habitica/res/drawable-xhdpi/ic_header_warrior.png Habitica/res/drawable-xxhdpi/ic_header_exp.png Habitica/res/drawable-xxhdpi/ic_header_gem.png Habitica/res/drawable-xxhdpi/ic_header_gold.png Habitica/res/drawable-xxhdpi/ic_header_healer.png Habitica/res/drawable-xxhdpi/ic_header_heart.png Habitica/res/drawable-xxhdpi/ic_header_mage.png Habitica/res/drawable-xxhdpi/ic_header_magic.png Habitica/res/drawable-xxhdpi/ic_header_rogue.png Habitica/res/drawable-xxhdpi/ic_header_silver.png Habitica/res/drawable-xxhdpi/ic_header_warrior.png Habitica/res/values/colors.xml Habitica/res/values/strings.xml Habitica/src/main/java/com/habitrpg/android/habitica/components/AppComponent.java Habitica/src/main/java/com/habitrpg/android/habitica/ui/viewHolders/tasks/BaseTaskViewHolder.java Habitica/src/main/java/com/magicmicky/habitrpgwrapper/lib/api/ApiService.java
18
.travis.yml
|
|
@ -3,9 +3,9 @@ jdk: oraclejdk8
|
|||
before_install:
|
||||
- export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
|
||||
- export JAVA8_HOME=/usr/lib/jvm/java-8-oracle
|
||||
- nvm install 4.1.1
|
||||
- nvm use 4.1.1
|
||||
- npm i -g npm@3
|
||||
- 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
|
||||
|
|
@ -24,10 +24,10 @@ android:
|
|||
- tools
|
||||
|
||||
# The BuildTools version used by your project
|
||||
- build-tools-24.0.2
|
||||
- build-tools-24.0.3
|
||||
|
||||
# The SDK version used to compile your project
|
||||
- android-24
|
||||
- android-25
|
||||
|
||||
# Additional components
|
||||
- extra-google-google_play_services
|
||||
|
|
@ -38,9 +38,13 @@ android:
|
|||
# if you need to run emulator(s) during your tests
|
||||
#- sys-img-armeabi-v7a-android-19
|
||||
#- sys-img-x86-android-17
|
||||
licenses:
|
||||
- 'android-sdk-preview-license-52d11cd2'
|
||||
- 'android-sdk-license-.+'
|
||||
- 'google-gdk-license-.+'
|
||||
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
|
||||
- ./gradlew testDebugUnitTest --info
|
||||
- ./gradlew assembleDebug -PdisablePreDex
|
||||
- ./gradlew testDebugUnitTest -PdisablePreDex --stacktrace --info
|
||||
|
|
|
|||
|
|
@ -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="136"
|
||||
android:versionName="0.0.34.5"
|
||||
android:versionCode="139"
|
||||
android:versionName="0.0.35"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
|
|
@ -25,7 +26,8 @@
|
|||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme">
|
||||
android:theme="@style/AppTheme"
|
||||
tools:replace="android:name">
|
||||
<activity
|
||||
android:name=".ui.activities.MainActivity"
|
||||
android:label="@string/app_name"
|
||||
|
|
@ -33,7 +35,6 @@
|
|||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
|
@ -140,7 +141,6 @@
|
|||
android:configChanges=
|
||||
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:label="@string/app_name" />
|
||||
<activity android:name=".ui.activities.MaintenanceActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
|
@ -177,7 +177,6 @@
|
|||
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".helpers.notifications.HabiticaFirebaseMessagingService">
|
||||
<intent-filter>
|
||||
|
|
@ -215,7 +214,15 @@
|
|||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.appwidget.provider"
|
||||
android:resource="@xml/dailies_task_widget_info" />
|
||||
android:resource="@xml/task_list_widget_info" />
|
||||
</receiver>
|
||||
<receiver android:name=".widget.TodoListWidgetProvider"
|
||||
android:label="@string/widget_todo_list">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.appwidget.provider"
|
||||
android:resource="@xml/task_list_widget_info" />
|
||||
</receiver>
|
||||
<receiver android:name=".widget.HabitButtonWidgetProvider"
|
||||
android:label="@string/widget_habit_button">
|
||||
|
|
@ -229,6 +236,9 @@
|
|||
<service
|
||||
android:name=".widget.DailiesWidgetService"
|
||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||
<service
|
||||
android:name=".widget.TodosWidgetService"
|
||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||
<service android:name=".widget.HabitButtonWidgetService"/>
|
||||
</application>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,291 +1,279 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.android.databinding'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.neenbedankt.android-apt'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.21.5'
|
||||
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
|
||||
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.1'
|
||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
||||
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://oss.sonatype.org/content/repositories/snapshots"
|
||||
}
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
|
||||
// Material View Pager
|
||||
maven {
|
||||
url "http://dl.bintray.com/florent37/maven"
|
||||
}
|
||||
|
||||
// Markdown
|
||||
maven {
|
||||
url "https://s3.amazonaws.com/repo.commonsware.com"
|
||||
}
|
||||
|
||||
maven {
|
||||
url "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
//Networking
|
||||
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
|
||||
compile 'com.squareup.okhttp3:okhttp:3.4.1'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
|
||||
//REST API handling
|
||||
compile ('com.squareup.retrofit2:retrofit:2.1.0') {
|
||||
exclude module: 'okhttp'
|
||||
}
|
||||
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
|
||||
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
|
||||
|
||||
//Crash Logging
|
||||
compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
|
||||
// View Elements Binding :)
|
||||
compile 'com.jakewharton:butterknife:8.2.1'
|
||||
apt 'com.jakewharton:butterknife-compiler:8.2.1'
|
||||
|
||||
//Dependency Injection
|
||||
compile 'com.google.dagger:dagger:2.5'
|
||||
apt 'com.google.dagger:dagger-compiler:2.5'
|
||||
provided 'org.glassfish:javax.annotation:10.0-b28'
|
||||
//App Compatibility and Material Design
|
||||
compile('com.mikepenz:materialdrawer:5.3.6@aar') {
|
||||
transitive = true
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:24.2.1'
|
||||
compile 'com.android.support:design:24.2.1'
|
||||
compile 'com.android.support:gridlayout-v7:24.2.1'
|
||||
compile 'com.android.support:recyclerview-v7:24.2.1'
|
||||
compile 'com.android.support:preference-v14:24.2.1'
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
|
||||
// Image Loading/Caching
|
||||
compile 'com.squareup.picasso:picasso:2.5.2'
|
||||
|
||||
//QR Code
|
||||
compile 'com.github.kenglxn.QRGen:android:2.2.0'
|
||||
|
||||
// Emojis
|
||||
compile 'com.github.viirus:emoji-lib:0.0.3.2'
|
||||
|
||||
// Markdown
|
||||
compile 'com.commonsware.cwac:anddown:0.2.4'
|
||||
|
||||
// About View for all dependent Libraries, we are using
|
||||
compile('com.mikepenz:aboutlibraries:5.7.1@aar') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
// a better fab alternative
|
||||
compile 'com.github.clans:fab:1.6.4'
|
||||
|
||||
// ORM
|
||||
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
|
||||
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
|
||||
compile "com.raizlabs.android:DBFlow:2.2.1"
|
||||
|
||||
//Eventbus
|
||||
compile 'org.greenrobot:eventbus:3.0.0'
|
||||
|
||||
// IAP Handling / Verification
|
||||
compile 'org.solovyev.android:checkout:0.7.5@aar'
|
||||
|
||||
//Facebook
|
||||
compile('com.facebook.android:facebook-android-sdk:4.11.0') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
|
||||
|
||||
//RxJava
|
||||
compile 'io.reactivex:rxandroid:1.2.1'
|
||||
compile 'io.reactivex:rxjava:1.2.0'
|
||||
|
||||
//Analytics
|
||||
compile 'com.amplitude:android-sdk:2.9.2'
|
||||
|
||||
// Fresco Image Management Library
|
||||
compile('com.facebook.fresco:fresco:0.11.0') {
|
||||
exclude module: 'bolts-android'
|
||||
}
|
||||
compile('com.facebook.fresco:animated-gif:0.11.0') {
|
||||
exclude module: 'bolts-android'
|
||||
}
|
||||
//Tests
|
||||
testCompile "junit:junit:4.10"
|
||||
testCompile "org.assertj:assertj-core:1.7.0"
|
||||
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
|
||||
testCompile "org.robolectric:robolectric:3.1"
|
||||
testCompile 'org.robolectric:shadows-multidex:3.1'
|
||||
testCompile "org.robolectric:shadows-support-v4:3.1"
|
||||
testCompile "org.mockito:mockito-core:1.10.19"
|
||||
|
||||
//Leak Detection
|
||||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
|
||||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
|
||||
|
||||
//Push Notifications
|
||||
compile 'com.google.firebase:firebase-core:9.4.0'
|
||||
compile 'com.google.firebase:firebase-messaging:9.4.0'
|
||||
|
||||
compile 'com.google.android.gms:play-services-auth:9.4.0'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "24.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.habitrpg.android.habitica"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
signingConfigs {
|
||||
release
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
debuggable true
|
||||
multiDexEnabled true
|
||||
// Disable fabric build ID generation for debug builds
|
||||
ext.enableCrashlytics = false
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider"
|
||||
resValue "string", "app_name", "Habitica Debug"
|
||||
}
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
debuggable false
|
||||
multiDexEnabled true
|
||||
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider"
|
||||
resValue "string", "app_name", "Habitica"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src/main/java']
|
||||
resources.srcDirs = ['src/main/java']
|
||||
aidl.srcDirs = ['src/main/java']
|
||||
renderscript.srcDirs = ['src/main/java']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
robolectric {
|
||||
manifest.srcFile 'AndroidManifestTesting.xml'
|
||||
java.srcDir file('src/test/java/')
|
||||
res.srcDirs = ['res']
|
||||
}
|
||||
release.setRoot('build-types/release')
|
||||
instrumentTest.setRoot('tests')
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dexOptions {
|
||||
preDexLibraries false
|
||||
javaMaxHeapSize "4g" // Use gig increments depending on needs
|
||||
incremental true
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'UnusedResources'
|
||||
}
|
||||
}
|
||||
|
||||
def Properties props = new Properties()
|
||||
def propFile = new File('signingrelease.properties')
|
||||
if (propFile.canRead()) {
|
||||
props.load(new FileInputStream(propFile))
|
||||
|
||||
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
|
||||
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
|
||||
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
||||
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
|
||||
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
||||
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
|
||||
} else {
|
||||
println 'signing.properties found but some entries are missing'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
} else {
|
||||
println 'signing.properties not found'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
|
||||
// Add Habitica Properties to buildConfigField
|
||||
final File HRPG_PROPS_FILE = new File('habitica.properties')
|
||||
if (HRPG_PROPS_FILE.canRead()) {
|
||||
def Properties HRPG_PROPS = new Properties()
|
||||
HRPG_PROPS.load(new FileInputStream(HRPG_PROPS_FILE))
|
||||
|
||||
if (HRPG_PROPS != null) {
|
||||
android.buildTypes.all { buildType ->
|
||||
HRPG_PROPS.any { property ->
|
||||
buildType.buildConfigField "String", property.key, "\"${property.value}\""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new InvalidUserDataException('habitica.properties found but some entries are missing')
|
||||
}
|
||||
} else {
|
||||
throw new MissingResourceException('habitica.properties not found')
|
||||
}
|
||||
|
||||
// Add Habitica Resources to resources
|
||||
final File HRPG_RES_FILE = new File('habitica.resources')
|
||||
if (HRPG_RES_FILE.canRead()) {
|
||||
def Properties HRPG_RES = new Properties()
|
||||
HRPG_RES.load(new FileInputStream(HRPG_RES_FILE))
|
||||
|
||||
if (HRPG_RES != null) {
|
||||
android.buildTypes.all { buildType ->
|
||||
HRPG_RES.any { property ->
|
||||
buildType.resValue "string", property.key, "\"${property.value}\""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new InvalidUserDataException('habitica.resources found but some entries are missing')
|
||||
}
|
||||
} else {
|
||||
throw new MissingResourceException('habitica.resources not found')
|
||||
}
|
||||
|
||||
tasks.whenTaskAdded { task ->
|
||||
if (task.name.equals("lint")) {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.getkeepsafe.dexcount'
|
||||
apply plugin: 'com.android.application' //or apply plugin: 'java'
|
||||
apply plugin: 'me.tatarka.retrolambda'
|
||||
apply plugin: 'com.jakewharton.hugo'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.android.databinding'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.neenbedankt.android-apt'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.21.5'
|
||||
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
|
||||
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.1'
|
||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
|
||||
// Material View Pager
|
||||
maven { url "http://dl.bintray.com/florent37/maven" }
|
||||
|
||||
// Markdown
|
||||
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
|
||||
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
//Networking
|
||||
compile 'com.squareup.okhttp3:okhttp:3.4.1'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
|
||||
//REST API handling
|
||||
compile('com.squareup.retrofit2:retrofit:2.1.0') {
|
||||
exclude module: 'okhttp'
|
||||
}
|
||||
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
|
||||
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
|
||||
|
||||
//Crash Logging
|
||||
releaseCompile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
|
||||
// View Elements Binding :)
|
||||
compile 'com.jakewharton:butterknife:8.4.0'
|
||||
apt 'com.jakewharton:butterknife-compiler:8.4.0'
|
||||
|
||||
//Dependency Injection
|
||||
compile 'com.google.dagger:dagger:2.7'
|
||||
apt 'com.google.dagger:dagger-compiler:2.7'
|
||||
provided 'org.glassfish:javax.annotation:10.0-b28'
|
||||
//App Compatibility and Material Design
|
||||
compile('com.mikepenz:materialdrawer:5.3.6@aar') {
|
||||
transitive = true
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:design:25.0.1'
|
||||
compile 'com.android.support:recyclerview-v7:25.0.1'
|
||||
compile 'com.android.support:preference-v14:25.0.1'
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
|
||||
//QR Code
|
||||
compile 'com.github.kenglxn.QRGen:android:2.2.0'
|
||||
|
||||
// Emojis
|
||||
compile 'com.github.viirus:emoji-lib:0.0.3.2'
|
||||
|
||||
// Markdown
|
||||
compile 'com.commonsware.cwac:anddown:0.2.4'
|
||||
|
||||
// About View for all dependent Libraries, we are using
|
||||
compile('com.mikepenz:aboutlibraries:5.7.1@aar') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
// a better fab alternative
|
||||
compile 'com.github.clans:fab:1.6.4'
|
||||
|
||||
// ORM
|
||||
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
|
||||
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
|
||||
compile "com.raizlabs.android:DBFlow:2.2.1"
|
||||
|
||||
//Eventbus
|
||||
compile 'org.greenrobot:eventbus:3.0.0'
|
||||
|
||||
// IAP Handling / Verification
|
||||
compile 'org.solovyev.android:checkout:0.7.5@aar'
|
||||
|
||||
//Facebook
|
||||
compile('com.facebook.android:facebook-android-sdk:4.17.0') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
|
||||
|
||||
//RxJava
|
||||
compile 'io.reactivex:rxandroid:1.2.1'
|
||||
compile 'io.reactivex:rxjava:1.2.0'
|
||||
|
||||
//Analytics
|
||||
compile 'com.amplitude:android-sdk:2.9.2'
|
||||
|
||||
// Fresco Image Management Library
|
||||
compile('com.facebook.fresco:fresco:0.14.0') {
|
||||
exclude module: 'bolts-android'
|
||||
}
|
||||
compile('com.facebook.fresco:animated-gif:0.14.0') {
|
||||
exclude module: 'bolts-android'
|
||||
}
|
||||
//Tests
|
||||
testCompile "junit:junit:4.10"
|
||||
testCompile "org.assertj:assertj-core:1.7.0"
|
||||
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
|
||||
testCompile "org.robolectric:robolectric:3.2"
|
||||
testCompile 'org.robolectric:shadows-multidex:3.1'
|
||||
testCompile "org.robolectric:shadows-support-v4:3.1"
|
||||
testCompile "org.mockito:mockito-core:1.10.19"
|
||||
|
||||
//Leak Detection
|
||||
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
|
||||
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
|
||||
|
||||
//Push Notifications
|
||||
compile 'com.google.firebase:firebase-core:9.4.0'
|
||||
compile 'com.google.firebase:firebase-messaging:9.4.0'
|
||||
|
||||
compile 'com.google.android.gms:play-services-auth:9.4.0'
|
||||
|
||||
compile(project(':seeds-sdk')) {
|
||||
exclude group: 'com.google.android.gms'
|
||||
exclude group: 'com.android.support', module: 'multidex'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "24.0.3"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.habitrpg.android.habitica"
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
signingConfigs {
|
||||
release
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
debuggable true
|
||||
multiDexEnabled true
|
||||
// Disable fabric build ID generation for debug builds
|
||||
ext.enableCrashlytics = false
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider"
|
||||
resValue "string", "app_name", "Habitica Debug"
|
||||
}
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
debuggable false
|
||||
multiDexEnabled true
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider"
|
||||
resValue "string", "app_name", "Habitica"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src/main/java']
|
||||
resources.srcDirs = ['src/main/java']
|
||||
aidl.srcDirs = ['src/main/java']
|
||||
renderscript.srcDirs = ['src/main/java']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
robolectric {
|
||||
manifest.srcFile 'AndroidManifestTesting.xml'
|
||||
java.srcDir file('src/test/java/')
|
||||
res.srcDirs = ['res']
|
||||
}
|
||||
instrumentTest.setRoot('tests')
|
||||
release { java.srcDirs = ['src/release/java'] }
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dexOptions {
|
||||
preDexLibraries false
|
||||
javaMaxHeapSize "4g" // Use gig increments depending on needs
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'UnusedResources'
|
||||
}
|
||||
}
|
||||
|
||||
def Properties props = new Properties()
|
||||
def propFile = new File('signingrelease.properties')
|
||||
if (propFile.canRead()) {
|
||||
props.load(new FileInputStream(propFile))
|
||||
|
||||
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
|
||||
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
|
||||
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
||||
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
|
||||
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
||||
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
|
||||
} else {
|
||||
println 'signing.properties found but some entries are missing'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
} else {
|
||||
println 'signing.properties not found'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
|
||||
// Add Habitica Properties to buildConfigField
|
||||
final File HRPG_PROPS_FILE = new File('habitica.properties')
|
||||
if (HRPG_PROPS_FILE.canRead()) {
|
||||
def Properties HRPG_PROPS = new Properties()
|
||||
HRPG_PROPS.load(new FileInputStream(HRPG_PROPS_FILE))
|
||||
|
||||
if (HRPG_PROPS != null) {
|
||||
android.buildTypes.all { buildType ->
|
||||
HRPG_PROPS.any { property ->
|
||||
buildType.buildConfigField "String", property.key, "\"${property.value}\""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new InvalidUserDataException('habitica.properties found but some entries are missing')
|
||||
}
|
||||
} else {
|
||||
throw new MissingResourceException('habitica.properties not found')
|
||||
}
|
||||
|
||||
// Add Habitica Resources to resources
|
||||
final File HRPG_RES_FILE = new File('habitica.resources')
|
||||
if (HRPG_RES_FILE.canRead()) {
|
||||
def Properties HRPG_RES = new Properties()
|
||||
HRPG_RES.load(new FileInputStream(HRPG_RES_FILE))
|
||||
|
||||
if (HRPG_RES != null) {
|
||||
android.buildTypes.all { buildType ->
|
||||
HRPG_RES.any { property ->
|
||||
buildType.resValue "string", property.key, "\"${property.value}\""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new InvalidUserDataException('habitica.resources found but some entries are missing')
|
||||
}
|
||||
} else {
|
||||
throw new MissingResourceException('habitica.resources not found')
|
||||
}
|
||||
|
||||
tasks.whenTaskAdded { task ->
|
||||
if (task.name.equals("lint")) {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.getkeepsafe.dexcount'
|
||||
apply plugin: 'com.android.application' //or apply plugin: 'java'
|
||||
apply plugin: 'me.tatarka.retrolambda'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
"client_info": {
|
||||
"mobilesdk_app_id": "app-id",
|
||||
"android_client_info": {
|
||||
"package_name": "com.habitrpg.android.habitica.debug"
|
||||
"package_name": "com.habitrpg.android.habitica"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
|
|
|
|||
BIN
Habitica/res/drawable-hdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 793 B |
BIN
Habitica/res/drawable-hdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-hdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 895 B |
BIN
Habitica/res/drawable-hdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 737 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1,003 B |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 973 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 992 B |
BIN
Habitica/res/drawable-hdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
Habitica/res/drawable-hdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
Habitica/res/drawable-hdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-hdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
Habitica/res/drawable-hdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
Habitica/res/drawable-mdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
Habitica/res/drawable-mdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
Habitica/res/drawable-mdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 543 B |
BIN
Habitica/res/drawable-mdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 508 B |
|
Before Width: | Height: | Size: 741 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 716 B |
|
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 623 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 620 B |
BIN
Habitica/res/drawable-mdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
Habitica/res/drawable-mdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
Habitica/res/drawable-mdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
Habitica/res/drawable-mdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
Habitica/res/drawable-mdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 437 B |
BIN
Habitica/res/drawable-xhdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 997 B |
BIN
Habitica/res/drawable-xhdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Habitica/res/drawable-xhdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-xhdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
Habitica/res/drawable-xhdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 969 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Habitica/res/drawable-xhdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 672 B |
BIN
Habitica/res/drawable-xxhdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 292 B |
BIN
Habitica/res/drawable-xxhdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
Habitica/res/drawable-xxhdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 1,014 B |
|
Before Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 494 B |
|
Before Width: | Height: | Size: 315 B |
|
Before Width: | Height: | Size: 656 B |
|
Before Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 109 B |
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 3.1 KiB |
BIN
Habitica/res/drawable/seeds_badge_store.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
|
@ -294,7 +294,7 @@
|
|||
android:text="@string/attributes"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/attributes_collapse_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -390,5 +390,41 @@
|
|||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/profile_achievements_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/profile_achievements"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/avatar_achievements_progress"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<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" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
|||
|
|
@ -1,218 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/login.linear.layout"
|
||||
android:gravity="center"
|
||||
android:paddingTop="40dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:orientation="vertical"
|
||||
android:shrinkColumns="0"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<TableRow
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_large"
|
||||
android:id="@+id/login.linear.layout"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/ic_gryphon"
|
||||
android:layout_span="2" />
|
||||
</TableRow>
|
||||
android:src="@drawable/ic_gryphon"/>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView2"
|
||||
android:src="@drawable/ic_habitica"
|
||||
android:layout_span="2" />
|
||||
</TableRow>
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/username_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/LoginRow">
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_username"
|
||||
android:drawableStart="@drawable/ic_username"
|
||||
android:drawablePadding="@dimen/spacing_large"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textPersonName"
|
||||
android:nextFocusDown="@+id/email"
|
||||
android:hint="@string/username"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:id="@+id/imageView4"
|
||||
android:src="@drawable/ic_username"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="4dp" />
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:imeOptions="actionNext"
|
||||
android:drawableLeft="@drawable/ic_email"
|
||||
android:nextFocusDown="@+id/password"
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="@dimen/spacing_large"
|
||||
android:hint="@string/emailAddress"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="@dimen/login_field_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/username"
|
||||
/>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/email_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/LoginRow">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:id="@+id/imageView5"
|
||||
android:src="@drawable/ic_email"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="4dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="@dimen/login_field_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/emailAddress" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/password_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/LoginRow">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:id="@+id/imageView6"
|
||||
android:src="@drawable/ic_password"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="4dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="@dimen/login_field_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionNext"
|
||||
android:hint="@string/password"
|
||||
/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/confirm_password_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/LoginRow">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:id="@+id/imageView7"
|
||||
android:src="@drawable/ic_password"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="4dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="@dimen/login_field_width"
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionDone"
|
||||
android:hint="@string/confirmpassword" />
|
||||
</TableRow>
|
||||
android:imeOptions="actionNext"
|
||||
android:nextFocusDown="@+id/confirm_password"
|
||||
android:drawableLeft="@drawable/ic_email"
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="@dimen/spacing_large"
|
||||
android:hint="@string/password"/>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp">
|
||||
<EditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:drawableLeft="@drawable/ic_email"
|
||||
android:drawableStart="@drawable/ic_email"
|
||||
android:drawablePadding="@dimen/spacing_large"
|
||||
android:imeOptions="actionDone"
|
||||
android:hint="@string/confirmpassword"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/login_btn"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/register_btn"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/rounded_purple_square"
|
||||
android:layout_span="2"
|
||||
android:layout_marginBottom="8dp"
|
||||
/>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/PB_AsyncTask"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
android:layout_span="2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
<com.facebook.login.widget.LoginButton
|
||||
android:id="@+id/login_button"
|
||||
<ProgressBar
|
||||
android:id="@+id/PB_AsyncTask"
|
||||
android:indeterminate="true"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
android:layout_span="2"/>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
<Button
|
||||
android:id="@+id/login_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
<com.google.android.gms.common.SignInButton
|
||||
android:id="@+id/google_login_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/register_btn"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:background="@drawable/rounded_purple_square"/>
|
||||
|
||||
android:layout_span="2"/>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
<com.google.android.gms.common.SignInButton
|
||||
android:id="@+id/google_login_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
app:buttonSize="wide"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
<com.facebook.login.widget.LoginButton
|
||||
android:id="@+id/login_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/forgot_pw_tv"
|
||||
android:layout_width="250dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/forgot_pw_tv"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/best_10"
|
||||
android:layout_span="2"
|
||||
/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
android:textColor="@color/best_10"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
android:gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
style="@style/CardTitle"/>
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
android:orientation="vertical"
|
||||
android:background="@drawable/selection_highlight"
|
||||
style="@style/CardContent">
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="@dimen/pet_image_width"
|
||||
android:layout_height="@dimen/pet_image_height"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
android:paddingBottom="8dp"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/selection_highlight">
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="@dimen/avatar_width"
|
||||
android:layout_height="@dimen/avatar_height"
|
||||
bind:imageName='@{imageNamed == null ? "head_0" : imageNamed}'
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@android:color/black" />
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="@dimen/avatar_width"
|
||||
android:layout_height="@dimen/avatar_height"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@android:color/black" />
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -14,6 +18,12 @@
|
|||
android:id="@+id/checkBoxHolder"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent">
|
||||
<View
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="1dp"/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="@dimen/checkbox_size"
|
||||
|
|
@ -25,7 +35,7 @@
|
|||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/task_text_padding"
|
||||
android:paddingStart="@dimen/task_text_padding"
|
||||
android:paddingRight="@dimen/task_text_padding"
|
||||
|
|
@ -45,10 +55,54 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
<TextView
|
||||
android:id="@+id/streakTextView"
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/taskIconWrapper"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/task_icon_space">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/specialTaskText"
|
||||
android:layout_weight="1"
|
||||
android:drawableStart="@drawable/task_icon_calendar"
|
||||
android:visibility="invisible"
|
||||
android:textColor="@color/task_secondary_text"/>
|
||||
<TextView
|
||||
android:id="@+id/streakTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:drawableStart="@drawable/task_icon_streak"
|
||||
tools:text="10"
|
||||
android:textColor="@color/task_secondary_text" />
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_challenge"
|
||||
android:id="@+id/iconviewChallenge"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/belongs_to_challenge"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_reminder"
|
||||
android:id="@+id/iconviewReminder"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_reminder"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_tag"
|
||||
android:id="@+id/iconviewTag"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_tag"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:id="@+id/checklistIndicatorWrapper"
|
||||
|
|
@ -79,6 +133,12 @@
|
|||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_gravity="bottom"/>
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/checklistSeparator"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
36
Habitica/res/layout/dialog_achievement_details.xml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dip"
|
||||
android:paddingTop="24dip"
|
||||
android:paddingRight="24dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/achievement_image"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/achievement_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:paddingLeft="15dip"
|
||||
android:text="example title" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/achievement_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="example text"
|
||||
android:paddingTop="15dip" />
|
||||
</LinearLayout>
|
||||
46
Habitica/res/layout/dialog_login_incentive.xml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:id="@+id/imageView" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:id="@+id/you_earned_message" />
|
||||
|
||||
<TextView
|
||||
android:text=""
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/you_earned_message"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:id="@+id/next_unlock_message" />
|
||||
|
||||
<Button
|
||||
android:text="@string/see_you_tomorrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/next_unlock_message"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="50dp"
|
||||
android:id="@+id/confirm_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
fab:fab_elevationCompat="6dp"
|
||||
android:src="@drawable/fab_add"
|
||||
fab:fab_size="mini"
|
||||
fab:fab_label="New Habit" />
|
||||
fab:fab_label="@string/new_habit" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/fab.new.daily"
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
android:src="@drawable/fab_add"
|
||||
fab:fab_size="mini"
|
||||
fab:fab_label="New Daily" />
|
||||
fab:fab_label="@string/new_daily" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/fab.new.todo"
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
|
||||
android:src="@drawable/fab_add"
|
||||
fab:fab_size="mini"
|
||||
fab:fab_label="New Todo" />
|
||||
fab:fab_label="@string/new_todo" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/fab.new.reward"
|
||||
|
|
@ -85,6 +85,6 @@
|
|||
|
||||
android:src="@drawable/fab_add"
|
||||
fab:fab_size="mini"
|
||||
fab:fab_label="New Reward" />
|
||||
fab:fab_label="@string/new_reward" />
|
||||
|
||||
</com.github.clans.fab.FloatingActionMenu>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:gemAmount="84"
|
||||
app:gemDrawable="@drawable/gems_84" />
|
||||
app:gemDrawable="@drawable/gems_84"
|
||||
app:showSeedsPromo="true" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
|
|
|
|||
|
|
@ -129,6 +129,20 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
bind:parsemarkdown="@{group.description}" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="@{group.leaderName.length() == 0 ? View.GONE : View.VISIBLE}">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{@string/leaderName(group.leaderName)}" />
|
||||
<net.pherth.android.emoji_library.EmojiTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
bind:parsemarkdown="@{group.leaderName}"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -258,7 +272,7 @@
|
|||
style="@style/CardTitle"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:layout_margin="24dp" />
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
style="@style/RowWrapper"
|
||||
android:id="@+id/gear_container">
|
||||
|
||||
<ImageView
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:layout_width="@dimen/gear_image_size"
|
||||
android:layout_height="@dimen/gear_image_size"
|
||||
android:id="@+id/gear_image"
|
||||
|
|
|
|||