Skip to content

Commit

Permalink
Merge pull request #29 from DennisBauer/development
Browse files Browse the repository at this point in the history
Improve displaying long expenses
  • Loading branch information
DennisBauer authored Oct 7, 2023
2 parents 97f569b + 1e7669f commit 10e341b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -166,6 +167,7 @@ private fun RecurringExpense(
"${recurringExpenseData.everyXRecurrence} " +
stringResource(id = recurringExpenseData.recurrence.stringRes),
style = MaterialTheme.typography.bodyLarge,
textAlign = TextAlign.End,
)
}
}
Expand Down Expand Up @@ -213,6 +215,15 @@ private fun RecurringExpenseOverviewPreview() {
everyXRecurrence = 1,
recurrence = Recurrence.Monthly,
),
RecurringExpenseData(
id = 3,
name = "Yearly Test Subscription",
description = "Test Description with another very long name",
price = 72f,
monthlyPrice = 6f,
everyXRecurrence = 1,
recurrence = Recurrence.Yearly,
),
),
onItemClicked = {},
)
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<string name="edit_expense_name_placeholder">z.B. Netflix</string>
<string name="edit_expense_price">Preis</string>
<string name="edit_expense_recurrence">Abrechnungszeitraum</string>
<string name="edit_expense_recurrence_day">Tag(e)</string>
<string name="edit_expense_recurrence_week">Woche(n)</string>
<string name="edit_expense_recurrence_month">Monat(e)</string>
<string name="edit_expense_recurrence_year">Jahr(e)</string>
<string name="edit_expense_recurrence_day">T</string>
<string name="edit_expense_recurrence_week">W</string>
<string name="edit_expense_recurrence_month">M</string>
<string name="edit_expense_recurrence_year">J</string>

<string name="settings_title">Einstellungen</string>
</resources>
8 changes: 4 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<string name="edit_expense_name_placeholder">e.g. Netflix</string>
<string name="edit_expense_price">Price</string>
<string name="edit_expense_recurrence">Recurrence</string>
<string name="edit_expense_recurrence_day">Day(s)</string>
<string name="edit_expense_recurrence_week">Week(s)</string>
<string name="edit_expense_recurrence_month">Month(s)</string>
<string name="edit_expense_recurrence_year">Year(s)</string>
<string name="edit_expense_recurrence_day">D</string>
<string name="edit_expense_recurrence_week">W</string>
<string name="edit_expense_recurrence_month">M</string>
<string name="edit_expense_recurrence_year">Y</string>

<string name="settings_title">Settings</string>

Expand Down

0 comments on commit 10e341b

Please sign in to comment.