Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Added strings in strings.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
code-a1 committed Apr 20, 2022
1 parent d278d07 commit a8163f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/ivy/wallet/ui/loan/LoanBottomBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.ivy.wallet.R
import com.ivy.wallet.ui.IvyWalletPreview
Expand All @@ -20,7 +21,7 @@ internal fun BoxWithConstraintsScope.LoanBottomBar(
) {
BackBottomBar(onBack = onClose) {
IvyButton(
text = "Add loan",
text = stringResource(R.string.add_loan),
iconStart = R.drawable.ic_plus
) {
onAdd()
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/ivy/wallet/ui/loan/LoansScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -92,9 +93,8 @@ private fun BoxWithConstraintsScope.UI(
Spacer(Modifier.weight(1f))

NoLoansEmptyState(
emptyStateTitle = "No loans",
emptyStateText = "You don't have any loans.\n" +
"Tap the \"+ Add loan\" to add one."
emptyStateTitle = stringResource(R.string.no_loans),
emptyStateText = stringResource(R.string.no_loans_description)
)

Spacer(Modifier.weight(1f))
Expand Down Expand Up @@ -166,7 +166,7 @@ private fun Toolbar(
.padding(start = 24.dp, end = 16.dp)
) {
Text(
text = "Loans",
text = stringResource(R.string.loans),
style = UI.typo.h2.style(
color = UI.colors.pureInverse,
fontWeight = FontWeight.ExtraBold
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,7 @@
<string name="set_currency">Set currency</string>
<string name="no_transactions">No transactions</string>
<string name="no_transactions_description">You don\'t have any transactions for %1$s.\nYou can add one by tapping the \"+\" button.</string>
<string name="add_loan">Add loan</string>
<string name="no_loans">No loans</string>
<string name="no_loans_description">You don\'t have any loans.\nTap the \"+ Add loan\" to add one.</string>
</resources>

0 comments on commit a8163f4

Please sign in to comment.