Skip to content

Commit

Permalink
remove helvetica and add natura and avon templates
Browse files Browse the repository at this point in the history
  • Loading branch information
hayna-foursys committed May 24, 2023
1 parent 3948957 commit bb14ed2
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ fastlane/README.md
.externalNativeBuild
.cxx
github_credentials.properties
github_credentials.properties.sample
github_credentials.properties.sample
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions designsystem/src/main/res/values/theme_natura_dark_ssot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,10 @@
<item name="assetBrandNeutralBFile">@drawable/natura_b_official_dark</item>
<item name="assetBrandCustomAFile">@drawable/natura_a_custom</item>
<item name="assetBrandCustomBFile">@drawable/natura_b_custom</item>
<item name="assetFontFileDisplay">@font/helvetica_now_display_bd</item>
<item name="assetFontFileHeadline">@font/helvetica_now_display_md</item>
<item name="assetFontFileBodyRegular">@font/helvetica_now_display_regular</item>
<item name="assetFontFileBodyBold">@font/helvetica_now_display_bd</item>
<item name="assetFontFileDisplay">@font/roboto_regular</item>
<item name="assetFontFileHeadline">@font/roboto_regular</item>
<item name="assetFontFileBodyRegular">@font/roboto_regular</item>
<item name="assetFontFileBodyBold">@font/roboto_medium</item>
<item name="alertTitlePrimaryFontWeight">sans-serif-medium</item>
<item name="alertTitleFallbackFontWeight">sans-serif</item>
<item name="alertContentPrimaryFontWeight">sans-serif</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@
<item name="assetBrandNeutralBFile">@drawable/natura_b_official_dark</item>
<item name="assetBrandCustomAFile">@drawable/natura_a_custom</item>
<item name="assetBrandCustomBFile">@drawable/natura_b_custom</item>
<item name="assetFontFileDisplay">@font/helvetica_now_display_bd</item>
<item name="assetFontFileHeadline">@font/helvetica_now_display_md</item>
<item name="assetFontFileBodyRegular">@font/helvetica_now_display_regular</item>
<item name="assetFontFileBodyBold">@font/helvetica_now_display_bd</item>
<item name="assetFontFileDisplay">@font/roboto_regular</item>
<item name="assetFontFileHeadline">@font/roboto_regular</item>
<item name="assetFontFileBodyRegular">@font/roboto_regular</item>
<item name="assetFontFileBodyBold">@font/roboto_medium</item>
<item name="alertTitlePrimaryFontWeight">sans-serif-medium</item>
<item name="alertTitleFallbackFontWeight">sans-serif</item>
<item name="alertContentPrimaryFontWeight">sans-serif</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class BrandSelectorActivity : AppCompatActivity(), View.OnClickListener {
binding.avonThemeButton.id -> openSampleBy(AVON)
binding.aesopThemeButton.id -> openSampleBy(AESOP)
binding.conBelezaThemeButton.id -> openSampleBy(CONSULTORIA)
binding.naturav2ThemeButton.id -> openSampleBy(NATURAV2)
binding.avonv2ThemeButton.id -> openSampleBy(AVONV2)
else -> openSampleBy(TBS)
}
}
Expand All @@ -47,6 +49,8 @@ class BrandSelectorActivity : AppCompatActivity(), View.OnClickListener {
binding.tbsThemeButton.setOnClickListener(this)
binding.aesopThemeButton.setOnClickListener(this)
binding.conBelezaThemeButton.setOnClickListener(this)
binding.naturav2ThemeButton.setOnClickListener(this)
binding.avonv2ThemeButton.setOnClickListener(this)
}

private fun openSampleBy(brandTheme: String) {
Expand All @@ -61,5 +65,7 @@ class BrandSelectorActivity : AppCompatActivity(), View.OnClickListener {
const val TBS = "bodyshop"
const val AESOP = "aesop"
const val CONSULTORIA = "consultoria"
const val NATURAV2 = "naturav2"
const val AVONV2 = "avonv2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class ThemeRepository(context: Context) {
"avon" -> R.style.Theme_Avon_Light
"aesop" -> R.style.Theme_Aesop_Light
"consultoria" -> R.style.Theme_ConsultoriaDeBeleza_Light
"naturav2" -> R.style.Theme_Natura_V2_Light
"avonv2" -> R.style.Theme_Avon_V2_Light
else -> R.style.Theme_TheBodyShop_Light
}
}
Expand All @@ -38,6 +40,8 @@ class ThemeRepository(context: Context) {
"avon" -> R.style.Theme_Avon_Dark
"aesop" -> R.style.Theme_Aesop_Dark
"consultoria" -> R.style.Theme_ConsultoriaDeBeleza_Dark
"naturav2" -> R.style.Theme_Natura_V2_Dark
"avonv2" -> R.style.Theme_Avon_V2_Dark
else -> R.style.Theme_TheBodyShop_Dark
}
}
Expand All @@ -48,6 +52,8 @@ class ThemeRepository(context: Context) {
"avon" -> R.style.Theme_Avon_Light_NoActionBar
"aesop" -> R.style.Theme_Aesop_Light_NoActionBar
"consultoria" -> R.style.Theme_ConsultoriaDeBeleza_Light_NoActionBar
"naturav2" -> R.style.Theme_Natura_V2_Light_NoActionBar
"avonv2" -> R.style.Theme_Avon_V2_Light_NoActionBar
else -> R.style.Theme_TheBodyShop_Light_NoActionBar
}
}
Expand All @@ -58,6 +64,8 @@ class ThemeRepository(context: Context) {
"avon" -> R.style.Theme_Avon_Dark_NoActionBar
"aesop" -> R.style.Theme_Aesop_Dark_NoActionBar
"consultoria" -> R.style.Theme_ConsultoriaDeBeleza_Dark_NoActionBar
"naturav2" -> R.style.Theme_Natura_V2_Dark_NoActionBar
"avonv2" -> R.style.Theme_Avon_V2_Dark_NoActionBar
else -> R.style.Theme_TheBodyShop_Dark_NoActionBar
}
}
Expand Down
38 changes: 38 additions & 0 deletions sample/src/main/res/layout/activity_brand_selector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,43 @@
app:srcCompat="@drawable/consultoriadebeleza_b_official"
app:tint="@color/black" />
</androidx.cardview.widget.CardView>

<androidx.cardview.widget.CardView
android:id="@+id/naturaV2ThemeButton"
android:layout_width="match_parent"
android:layout_height="?sizeLargeX"
android:layout_marginBottom="?spacingSmall"
android:gravity="center"
android:orientation="horizontal"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="?borderRadiusMedium">

<ImageView
android:layout_width="?sizeHugeX"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/brand_selector_naturav2_text"
app:srcCompat="@drawable/natura_b_official"
app:tint="@color/black" />
</androidx.cardview.widget.CardView>

<androidx.cardview.widget.CardView
android:id="@+id/avonV2ThemeButton"
android:layout_width="match_parent"
android:layout_height="?sizeLargeX"
android:layout_marginBottom="?spacingSmall"
android:gravity="center"
android:orientation="horizontal"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="?borderRadiusMedium">

<ImageView
android:layout_width="?sizeHugeX"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/brand_selector_avonv2_text"
app:srcCompat="@drawable/avon_v2_a_official"
app:tint="@color/black" />
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>
2 changes: 2 additions & 0 deletions sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@
<string name="brand_selector_naturaeco_text">NaturaeCo</string>
<string name="brand_selector_tbs_text">The Body Shop</string>
<string name="brand_selector_conBeleza_text">Consultoria de Beleza</string>
<string name="brand_selector_naturav2_text">Natura v2</string>
<string name="brand_selector_avonv2_text">Avon v2</string>
<string name="alert_with_title">Alert Only Title</string>
<string name="alert_success">Alert Success</string>
<string name="alert_success_outlined">Alert Success Outlined</string>
Expand Down

0 comments on commit bb14ed2

Please sign in to comment.