Skip to content

Commit

Permalink
Merge pull request #72 from edipo2s/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
edipo2s authored Jul 6, 2017
2 parents 2eb97bb + d124217 commit 527dc45
Show file tree
Hide file tree
Showing 22 changed files with 151 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Created by https://www.gitignore.io/api/android,intellij,osx,windows,linux,gradle,java

secrets.properties
AppsByEdipo.keystore

### Android ###
# Built application files
*.apk
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 20 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ apply plugin: 'io.fabric'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
buildToolsVersion "25.0.3"
packagingOptions.excludes = ['META-INF/services/javax.annotation.processing.Processor',
'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'META-INF/README.txt',
'LICENSE.txt', 'NOTICE.txt', 'README.txt', '.readme']

def props = new Properties()
props.load(file("secrets.properties").newInputStream())
defaultConfig {
applicationId "com.ediposouza.teslesgendstracker"
minSdkVersion prepareToRelease ? 16 : 21
Expand All @@ -21,31 +24,29 @@ android {

buildConfigField "boolean", "ENABLE_LOGS_IN_RELEASE", "false"
buildConfigField "boolean", "PREPARE_TO_RELEASE", "$prepareToRelease"
resValue "string", "app_ads_card_full", "$key_ads_card_full"
resValue "string", "app_ads_card_list", "$key_ads_card_list"
resValue "string", "app_ads_deck_list", "$key_ads_deck_list"
resValue "string", "app_ads_new_deck_card_list", "$key_ads_new_deck_card_list"
resValue "string", "app_ads_match_history_list", "$key_ads_match_history_list"
resValue "string", "app_ads_match_statistics_class_full", "$key_ads_match_statistics_class_full"
resValue "string", "app_ads_new_matches_full", "$key_ads_new_matches_full"
resValue "string", "app_ads_news_list", "$key_ads_news_list"
resValue "string", "app_ads_season_list", "$key_ads_season_list"
resValue "string", "app_ads_patch_full", "$key_ads_patch_full"
resValue "string", "key_ads_intersticial", "$key_ads_intersticial"
resValue "string", "facebook_app_id", "$key_facebook_app_id"
resValue "string", "mixpanel_app_id", "$key_mixpanel_app_id"
resValue "string", "app_ads_card_full", props.getProperty('key_ads_card_full')
resValue "string", "app_ads_card_list", props.getProperty('key_ads_card_list')
resValue "string", "app_ads_deck_list", props.getProperty('key_ads_deck_list')
resValue "string", "app_ads_new_deck_card_list", props.getProperty('key_ads_new_deck_card_list')
resValue "string", "app_ads_match_history_list", props.getProperty('key_ads_match_history_list')
resValue "string", "app_ads_match_statistics_class_full", props.getProperty('key_ads_match_statistics_class_full')
resValue "string", "app_ads_new_matches_full", props.getProperty('key_ads_new_matches_full')
resValue "string", "app_ads_news_list", props.getProperty('key_ads_news_list')
resValue "string", "app_ads_season_list", props.getProperty('key_ads_season_list')
resValue "string", "app_ads_patch_full", props.getProperty('key_ads_patch_full')
resValue "string", "key_ads_intersticial", props.getProperty('key_ads_intersticial')
resValue "string", "facebook_app_id", props.getProperty('key_facebook_app_id')
resValue "string", "mixpanel_app_id", props.getProperty('key_mixpanel_app_id')
multiDexEnabled true
vectorDrawables.useSupportLibrary true
}
signingConfigs {
release {
try {
def props = new Properties()
props.load(file(propsFile).newInputStream())
storeFile file(props.keystore_file)
storePassword props.keystore_pass
storeFile file('AppsByEdipo.keystore')
storePassword props.getProperty('keystore_pass')
keyAlias "tes_legends_tracker"
keyPassword props.tes_legends_tracker_pass
keyPassword props.getProperty('tes_legends_tracker_pass')
} catch (e) {
println(e.message)
}
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions app/src/main/kotlin/com/ediposouza/teslesgendstracker/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.ediposouza.teslesgendstracker.util.MetricAction
import com.ediposouza.teslesgendstracker.util.MetricsManager
import com.google.firebase.auth.FirebaseAuth
import com.google.firebase.database.FirebaseDatabase
import com.google.firebase.iid.FirebaseInstanceId
import com.jakewharton.threetenabp.AndroidThreeTen
import hotchemi.android.rate.AppRate
import timber.log.Timber
Expand Down Expand Up @@ -58,6 +59,7 @@ class App : MultiDexApplication() {

private fun initializeDependencies() {
Timber.plant(LoggerManager())
Timber.d("Device token: ${FirebaseInstanceId.getInstance().token}")
MetricsManager.initialize(this)
MetricsManager.trackAction(MetricAction.ACTION_APP_LAUNCH())
AndroidThreeTen.init(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ data class Card(
val shout: Int,
val creators: List<String>,
val generates: List<String>,
val tokens: List<String>
val tokens: List<String>,
val lore: String,
val loreLink: String

) : Comparable<Card>, Parcelable {

Expand All @@ -413,7 +415,7 @@ data class Card(
val DUMMY = Card("", "", CardSet.CORE, CardAttribute.DUAL, CardAttribute.STRENGTH,
CardAttribute.WILLPOWER, CardRarity.EPIC, false, 0, 0, 0, CardType.ACTION,
CardRace.ARGONIAN, emptyList<CardKeyword>(), "", CardArenaTier.AVERAGE,
listOf(), false, "", 0, listOf(), listOf(), listOf())
listOf(), false, "", 0, listOf(), listOf(), listOf(), "", "")

const val ARTS_PATH = "Arts"
const val ARTS_TOKENS_PATH = "TokensArts"
Expand All @@ -436,7 +438,7 @@ data class Card(
1 == source.readInt(), source.readString(), source.readInt(),
mutableListOf<String>().apply { source.readStringList(this) },
mutableListOf<String>().apply { source.readStringList(this) },
mutableListOf<String>().apply { source.readStringList(this) })
mutableListOf<String>().apply { source.readStringList(this) }, source.readString(), source.readString())

override fun describeContents() = 0

Expand Down Expand Up @@ -550,6 +552,8 @@ data class Card(
dest?.writeStringList(creators)
dest?.writeStringList(generates)
dest?.writeStringList(tokens)
dest?.writeString(lore)
dest?.writeString(loreLink)
}

override fun compareTo(other: Card): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ abstract class FirebaseParsers {
val creators: String = ""
val generates: String = ""
val tokens: String = ""
val lore: String = ""
val loreLink: String = ""

fun toCard(shortName: String, set: CardSet, attr: CardAttribute): Card {
var clsAttr1 = attr
Expand All @@ -54,7 +56,7 @@ abstract class FirebaseParsers {
},
text, CardArenaTier.of(arenaTier), getCardArenaTierPlus(), evolves, season, shout,
creators.split(", ").filter { it.isNotEmpty() }, generates.split(", ").filter { it.isNotEmpty() },
tokens.split(", ").filter { it.isNotEmpty() })
tokens.split(", ").filter { it.isNotEmpty() }, lore, loreLink)
}

private fun getCardArenaTierPlus(): List<CardArenaTierPlus?> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ class DashActivity : BaseFilterActivity(),
}
if (App.hasUserDonated()) {
dash_navigation_view.menu.findItem(R.id.menu_donate)?.apply {
isEnabled = false
title = getString(R.string.menu_donate_done)
icon = ContextCompat.getDrawable(this@DashActivity, R.drawable.ic_no_ads)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ import android.os.Environment
import android.os.Handler
import android.provider.MediaStore
import android.provider.Settings
import android.support.customtabs.CustomTabsIntent
import android.support.design.widget.BottomSheetBehavior
import android.support.v4.app.ActivityCompat
import android.support.v4.app.ActivityOptionsCompat
import android.support.v4.content.ContextCompat
import android.support.v4.view.ViewCompat
import android.support.v7.widget.*
import android.text.format.DateUtils
Expand Down Expand Up @@ -318,6 +320,19 @@ class CardActivity : BaseActivity() {
card_race.visibility = View.VISIBLE.takeIf { card.type == CardType.CREATURE } ?: View.GONE
card_race_desc.text = card.race.desc
card_race_desc.visibility = View.GONE.takeIf { card.race.desc.isEmpty() } ?: View.VISIBLE
val hasLore = card.lore.isNotEmpty()
card_lore_label.visibility = View.VISIBLE.takeIf { hasLore } ?: View.GONE
card_lore_more.visibility = View.VISIBLE.takeIf { hasLore } ?: View.GONE
card_lore.visibility = View.VISIBLE.takeIf { hasLore } ?: View.GONE
card_lore.text = card.lore
card_lore_more.setOnClickListener {
CustomTabsIntent.Builder()
.setToolbarColor(ContextCompat.getColor(this, R.color.colorPrimary))
.setStartAnimations(this, R.anim.slide_in_right, R.anim.slide_out_left)
.setExitAnimations(this, R.anim.slide_in_left, R.anim.slide_out_right)
.build()
.launchUrl(this, Uri.parse(card.loreLink))
}
card_arena_tier.text = card.arenaTier.name.toLowerCase().capitalize()
configureTokens()
configureShoutLevels()
Expand Down
48 changes: 38 additions & 10 deletions app/src/main/res/layout/include_card_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,42 @@
tools:text="None" />

<TextView
android:id="@+id/card_sounds_label"
android:id="@+id/card_lore_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_race_desc"
android:layout_marginTop="@dimen/default_margin"
android:layout_marginTop="@dimen/small_margin"
android:text="@string/card_about_label"
android:textStyle="bold" />

<TextView
android:id="@+id/card_lore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_race_desc"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_toEndOf="@id/card_lore_label"
tools:text="'Dremora are a Daedric race of humanoids, created and mostly in service to Mehrunes Dagon. A Markynaz is a duke rank, the highest level Dremora that most adventurers will encounter. Like all Daedra, Dremora are immortal, so they have a very alien mindset.' - Quillypen" />

<TextView
android:id="@+id/card_lore_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_lore"
android:layout_alignParentEnd="true"
android:text="@string/card_about_more_label"
android:textColor="@color/blue_500"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />

<TextView
android:id="@+id/card_sounds_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_lore_more"
android:layout_marginTop="@dimen/medium_margin"
android:text="@string/card_sounds_label"
android:textStyle="bold"
android:visibility="gone"
Expand All @@ -242,9 +273,9 @@
style="@style/CardSoundText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_race_desc"
android:layout_below="@id/card_lore_more"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_marginTop="@dimen/default_margin"
android:layout_toEndOf="@id/card_sounds_label"
android:text="@string/card_sounds_play_label"
tools:visibility="visible" />
Expand All @@ -254,9 +285,8 @@
style="@style/CardSoundText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_race_desc"
android:layout_alignTop="@id/card_sound_play"
android:layout_marginStart="@dimen/huge_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_toEndOf="@id/card_sound_play"
android:text="@string/card_sounds_attack_label"
tools:visibility="visible" />
Expand All @@ -266,9 +296,8 @@
style="@style/CardSoundText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/card_race_desc"
android:layout_alignTop="@id/card_sound_attack"
android:layout_marginStart="@dimen/huge_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_toEndOf="@id/card_sound_attack"
android:text="@string/card_sounds_extra_label"
tools:visibility="visible" />
Expand All @@ -278,8 +307,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_below="@id/card_race_desc"
android:layout_marginTop="@dimen/small_margin"
android:layout_alignBottom="@id/card_sounds_label"
android:src="@drawable/ic_notification"
android:visibility="gone"
tools:visibility="visible" />
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/raw/changelog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog bulletedList="true">
<changelogversion
versionName="1.6.0"
changeDate="July 5, 2017">
<changelogtext>[b]Feature:[/b] Add Card Lore support</changelogtext>
<changelogtext>Add Heroes of Skyrim card arts</changelogtext>
<changelogtext>Add Heroes of Skyrim card sounds</changelogtext>
<changelogtext>Fixes and improvements</changelogtext>
</changelogversion>
<changelogversion
versionName="1.5.0"
changeDate="June 28, 2017">
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
<string name="card_collection_edit_success">Editieren der Sammlung aktiviert</string>
<string name="card_set_label">Satz</string>
<string name="card_race_label">Rasse</string>
<string name="card_about_label">Über:</string>
<string name="card_about_more_label">Mehr</string>
<string name="card_sounds_label">Ton:</string>
<string name="card_sounds_attack_label">Angriff</string>
<string name="card_sounds_play_label">Abspielen</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
<string name="card_collection_edit_success">¡La edición de colecciones está habilitada!</string>
<string name="card_set_label">Conjunto:</string>
<string name="card_race_label">Raza:</string>
<string name="card_about_label">Acerca de:</string>
<string name="card_about_more_label">Más</string>
<string name="card_sounds_label">Sonidos:</string>
<string name="card_sounds_attack_label">Ataque</string>
<string name="card_sounds_play_label">Jugar</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
<string name="card_collection_edit_success">¡Hai abilitato la possibilità di modificare la collezione!</string>
<string name="card_set_label">Set:</string>
<string name="card_race_label">Razza:</string>
<string name="card_about_label">Informazioni:</string>
<string name="card_about_more_label">Di Più</string>
<string name="card_sounds_label">Suoni:</string>
<string name="card_sounds_attack_label">Attacca</string>
<string name="card_sounds_play_label">Gioca</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
<string name="card_collection_edit_success">Edição da coleção habilitada!</string>
<string name="card_set_label">Expanção:</string>
<string name="card_race_label">Raça:</string>
<string name="card_about_label">Sobre:</string>
<string name="card_about_more_label">Mais</string>
<string name="card_sounds_label">Sons:</string>
<string name="card_sounds_attack_label">Ataque</string>
<string name="card_sounds_play_label">Jogar</string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
<string name="card_collection_edit_success">Коллекция редактировать включен!</string>
<string name="card_set_label">Сет:</string>
<string name="card_race_label">Раса:</string>
<string name="card_about_label">Около:</string>
<string name="card_about_more_label">Больше</string>
<string name="card_sounds_label">Звуки:</string>
<string name="card_sounds_attack_label"></string>
<string name="card_sounds_play_label">Играть</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<color name="card_zero_qtd">#889e9e9e</color>
<color name="grey_900_with_alpha">#88212121</color>

<color name="blue_500">#2196F3</color>
<color name="indigo_500">#3f51b5</color>
<color name="indigo_700">#303f9f</color>
<color name="amber_500">#FF9800</color>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
<string name="card_collection_edit_success">Collection edit enabled!</string>
<string name="card_set_label">Set:</string>
<string name="card_race_label">Race:</string>
<string name="card_about_label">About:</string>
<string name="card_about_more_label">More</string>
<string name="card_sounds_label">Sounds:</string>
<string name="card_sounds_attack_label">Attack</string>
<string name="card_sounds_play_label">Play</string>
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

buildscript {
ext {
appVersionName = "1.5.0"
appVersionCode = 41
appVersionName = "1.6.0"
appVersionCode = 42
prepareToRelease = false

kotlin_version = "1.1.3"
kotlin_version = "1.1.3-2"
}

repositories {
Expand Down
Loading

0 comments on commit 527dc45

Please sign in to comment.