Skip to content

Commit 9d865c0

Browse files
committed
1) Fixed bug when title bar appears on api 31 and higher; 2) Translated Contact us text;
1 parent 3f0233d commit 9d865c0

File tree

10 files changed

+18
-5
lines changed

10 files changed

+18
-5
lines changed

app/src/main/java/com/itami/calorie_tracker/core/presentation/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class MainActivity : AppCompatActivity() {
2424
navigationBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT)
2525
)
2626
super.onCreate(savedInstanceState)
27+
actionBar?.hide()
2728
installSplashScreen().setKeepOnScreenCondition {
2829
mainViewModel.showSplash
2930
}

app/src/main/java/com/itami/calorie_tracker/profile_feature/presentation/screens/contact_us/ContactUsScreen.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,18 @@ private fun ContactUsTextSection(
230230
modifier: Modifier = Modifier,
231231
appNameColor: Color = CalorieTrackerTheme.colors.primary,
232232
appName: String = stringResource(id = R.string.app_name),
233+
contactUsText: String = stringResource(R.string.dont_hesitate_to_contact_us),
233234
) {
235+
234236
val annotatedString = remember {
235237
buildAnnotatedString {
236-
append("Don’t hesitate to contact us if you find a bug or have a suggestion. We highly appreciate any feedback provided, as it helps us improve your ")
238+
val startIndex = contactUsText.indexOf(appName)
239+
val endIndex = startIndex + appName.length
240+
append(contactUsText.substring(0, startIndex))
237241
withStyle(style = SpanStyle(color = appNameColor, fontWeight = FontWeight.Medium)) {
238242
append(appName)
239243
}
240-
append(".")
244+
append(contactUsText.substring(endIndex))
241245
}
242246
}
243247

app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,5 @@
265265
<string name="error_invalid_old_password">Ungültiges altes Passwort.</string>
266266
<string name="password_has_been_changed">Das Passwort wurde geändert.</string>
267267
<string name="ml">ml</string>
268+
<string name="dont_hesitate_to_contact_us">"Zögern Sie nicht, uns zu kontaktieren, wenn Sie einen Fehler finden oder einen Vorschlag haben. Wir schätzen jedes Feedback sehr, da es uns hilft, Ihren Calorie Tracker zu verbessern."</string>
268269
</resources>

app/src/main/res/values-en/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,4 +271,5 @@
271271
<string name="error_invalid_old_password">Invalid old password.</string>
272272
<string name="password_has_been_changed">Password has been changed.</string>
273273
<string name="ml">ml</string>
274+
<string name="dont_hesitate_to_contact_us">"Don’t hesitate to contact us if you find a bug or have a suggestion. We highly appreciate any feedback provided, as it helps us improve your "</string>
274275
</resources>

app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,5 @@
266266
<string name="error_invalid_old_password">Contraseña antigua inválida.</string>
267267
<string name="password_has_been_changed">Se ha cambiado la contraseña.</string>
268268
<string name="ml">ml</string>
269+
<string name="dont_hesitate_to_contact_us">"No dude en contactarnos si encuentra un error o tiene una sugerencia. Agradecemos enormemente cualquier comentario proporcionado, ya que nos ayuda a mejorar su Calorie Tracker."</string>
269270
</resources>

app/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,5 @@
265265
<string name="error_invalid_old_password">Ancien mot de passe invalide.</string>
266266
<string name="password_has_been_changed">Le mot de passe a été changé.</string>
267267
<string name="ml">ml</string>
268+
<string name="dont_hesitate_to_contact_us">"N'hésitez pas à nous contacter si vous trouvez un bug ou si vous avez une suggestion. Nous apprécions grandement tout retour fourni, car cela nous aide à améliorer votre Calorie Tracker."</string>
268269
</resources>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<resources>
22

3-
<style name="Theme.CalorieTracker" parent="Theme.AppCompat.Light.NoActionBar">
3+
<style name="Theme.CalorieTracker" parent="Theme.AppCompat.NoActionBar">
44
<item name="android:statusBarColor">#0D0D0D</item>
55
<item name="android:navigationBarColor">#0D0D0D</item>
6+
<item name="showTitle">false</item>
67
</style>
78

89
</resources>

app/src/main/res/values-ru/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<string name="calorie_intake">Потребление калорий</string>
133133
<string name="dark_theme">Темная тема</string>
134134
<string name="theme_dark">Темная</string>
135-
<string name="theme_light">Светла</string>
135+
<string name="theme_light">Светлая</string>
136136
<string name="theme_system">Системная</string>
137137
<string name="desc_icon_contrast">Иконка контраста</string>
138138
<string name="title_contact_us">Связаться с нами</string>
@@ -267,4 +267,5 @@
267267
<string name="error_invalid_old_password">Неверный старый пароль.</string>
268268
<string name="password_has_been_changed">Вы успешно сменили пароль.</string>
269269
<string name="ml">мл</string>
270+
<string name="dont_hesitate_to_contact_us">"Не стесняйтесь связаться с нами, если вы обнаружите ошибку или у вас есть предложение. Мы высоко ценим любые отзывы, так как они помогают нам улучшить ваш Calorie Tracker."</string>
270271
</resources>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,5 @@
270270
<string name="error_invalid_old_password">Invalid old password.</string>
271271
<string name="password_has_been_changed">Password has been changed.</string>
272272
<string name="ml">ml</string>
273+
<string name="dont_hesitate_to_contact_us">"Don’t hesitate to contact us if you find a bug or have a suggestion. We highly appreciate any feedback provided, as it helps us improve your Calorie Tracker"</string>
273274
</resources>

app/src/main/res/values/themes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<resources>
22

3-
<style name="Theme.CalorieTracker" parent="Theme.AppCompat.Light.NoActionBar">
3+
<style name="Theme.CalorieTracker" parent="Theme.AppCompat.NoActionBar">
44
<item name="android:statusBarColor">#FFFFFF</item>
55
<item name="android:navigationBarColor">#FFFFFF</item>
6+
<item name="showTitle">false</item>
67
</style>
78

89
</resources>

0 commit comments

Comments
 (0)