Skip to content

Commit

Permalink
Merge branch 'master' of github.com:natura-cosmeticos/natds-android
Browse files Browse the repository at this point in the history
  • Loading branch information
mlcsouza committed Dec 3, 2020
2 parents cfad131 + 28c0353 commit 0b3bcad
Show file tree
Hide file tree
Showing 282 changed files with 96 additions and 2,460 deletions.
1 change: 1 addition & 0 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ excluded_words:
- xhdpi
- xxhdpi
- xxxhdpi
- natds-commons

spellcheck_filenames: true
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ enable-animations:
publish-ds-lib-prod: clean
./gradlew build publish --stacktrace

run-all-sanitycheck-steps: lint unit-test instrumentation-test
run-all-pipeline-steps: lint unit-test instrumentation-test

update-icons:
sh ./tools/update_icons.sh

kill-all-emulators:
sh ./tools/kill_emulators.sh
finish-all-emulators:
sh ./tools/finish_emulators.sh

publish-docs:
bash ./tools/create_docs.sh
Expand Down
15 changes: 15 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ allprojects {
google()
jcenter()
maven { url "https://www.jitpack.io" }
def githubProperties = new Properties()
def githubFile = rootProject.file("github_credentials.properties")
if (githubFile.exists()) {
githubProperties.load(new FileInputStream(githubFile))
}

maven {
name = "natds-commons"
url = uri("https://maven.pkg.github.com/natura-cosmeticos/natds-commons")
credentials {
username = githubProperties['github.username'] ?: System.getenv("GITHUB_USERNAME")
password = githubProperties['github.password'] ?: System.getenv("GITHUB_API_KEY")
}
}
}
}

Expand Down Expand Up @@ -53,4 +67,5 @@ ext {
espressoIntentsVersion = '3.1.0'
mockKVersion = '1.10.0'
coreKTXVersion = '1.3.0'
iconsVersion = '0.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ class ExpansionPanel @JvmOverloads constructor(

private fun showContentArea() {
contentArea.visibility = View.VISIBLE
icon.setImageResource(R.drawable.ds_ic_outlined_navigation_arrowtop)
icon.setImageResource(R.drawable.default_icon_outlined_navigation_arrowtop)
container.setBackgroundResource(R.drawable.ds_expansion_panel_border_expanded)

onStateChangeListener.invoke(true)
}

private fun hideContentArea() {
contentArea.visibility = View.GONE
icon.setImageResource(R.drawable.ds_ic_outlined_navigation_arrowbottom)
icon.setImageResource(R.drawable.default_icon_outlined_navigation_arrowbottom)
container.setBackgroundResource(R.drawable.ds_expansion_panel_border_collapsed)

onStateChangeListener.invoke(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class MenuView @JvmOverloads constructor(
}

private fun configDefaultIconIfEmpty() {
iconMenu.setImageResource(R.drawable.outlined_default_mockup)
iconMenu.setImageResource(R.drawable.default_icon_outlined_default_mockup)
}

private fun setMenuIconImage(iconName: String?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Shortcut @JvmOverloads constructor(

fun setIcon(icon: String?) {
icon?.apply {
val drawableId = context.resources.getIdentifier(icon?.replace("-", "_"), "drawable", context.packageName)
val drawableId = context.resources.getIdentifier(icon.replace("-", "_"), "drawable", context.packageName)

if (drawableId == ICON_NOT_FOUND) {
configDefaultIconIfEmpty()
Expand All @@ -78,7 +78,7 @@ class Shortcut @JvmOverloads constructor(
}

private fun configDefaultIconIfEmpty() {
iconContainer.setImageResource(R.drawable.filled_default_mockup)
iconContainer.setImageResource(R.drawable.default_icon_outlined_default_mockup)
}

fun getIcon(): ImageView {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0b3bcad

Please sign in to comment.