Compare commits
No commits in common. "fb565c1a9d45cce46b47a1e5e3e758a23b998198" and "97f1905179f5f933bc548620e025e75a4d5983ab" have entirely different histories.
fb565c1a9d
...
97f1905179
14 changed files with 55 additions and 75 deletions
3
app/.gitignore
vendored
3
app/.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
/build
|
||||
/release
|
||||
/build
|
|
@ -16,8 +16,8 @@ android {
|
|||
applicationId = "eu.m724.coincounter"
|
||||
minSdk = 30
|
||||
targetSdk = 35
|
||||
versionCode = 5
|
||||
versionName = "2.0.2"
|
||||
versionCode = 4
|
||||
versionName = "2.0.1"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
@ -56,10 +56,6 @@ android {
|
|||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
}
|
||||
|
||||
androidResources {
|
||||
generateLocaleConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
BIN
app/release/app-release.apk
Normal file
BIN
app/release/app-release.apk
Normal file
Binary file not shown.
BIN
app/release/baselineProfiles/0/app-release.dm
Normal file
BIN
app/release/baselineProfiles/0/app-release.dm
Normal file
Binary file not shown.
BIN
app/release/baselineProfiles/1/app-release.dm
Normal file
BIN
app/release/baselineProfiles/1/app-release.dm
Normal file
Binary file not shown.
37
app/release/output-metadata.json
Normal file
37
app/release/output-metadata.json
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "eu.m724.coincounter",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 3,
|
||||
"versionName": "1.1.1",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/app-release.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/app-release.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 34
|
||||
}
|
|
@ -46,7 +46,6 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.draw.rotate
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
|
@ -263,7 +262,7 @@ fun AddWalletButton(
|
|||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Add,
|
||||
contentDescription = stringResource(R.string.home_add_wallet),
|
||||
contentDescription = "Add wallet",
|
||||
modifier = Modifier.rotate(angle)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -18,9 +18,7 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import eu.m724.coincounter.R
|
||||
import eu.m724.coincounter.ui.theme.CoinCounterTheme
|
||||
import eu.m724.coincounter.wallet.compose.TransactionDialog
|
||||
import eu.m724.coincounter.wallet.compose.WalletActivityView
|
||||
|
@ -54,10 +52,7 @@ class WalletActivity : ComponentActivity() {
|
|||
FloatingActionButton(onClick = {
|
||||
transactionDialogShown = true
|
||||
}) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Create,
|
||||
contentDescription = stringResource(R.string.wallet_new_transaction)
|
||||
)
|
||||
Icon(Icons.Filled.Create, "New transaction")
|
||||
}
|
||||
}
|
||||
) { innerPadding ->
|
||||
|
|
|
@ -34,7 +34,6 @@ import androidx.compose.ui.focus.focusRequester
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
|
@ -88,7 +87,7 @@ fun TransactionDialog(
|
|||
.weight(1f)
|
||||
.focusRequester(firstFocus)
|
||||
.focusProperties { next = secondFocus },
|
||||
supportingText = { Text(stringResource(R.string.create_transaction_label)) },
|
||||
supportingText = { Text("Label") },
|
||||
keyboardOptions = KeyboardOptions.Default.copy(
|
||||
imeAction = ImeAction.Next
|
||||
),
|
||||
|
@ -107,7 +106,7 @@ fun TransactionDialog(
|
|||
.focusRequester(secondFocus),
|
||||
supportingText = {
|
||||
Text(
|
||||
text = stringResource(R.string.create_transaction_value),
|
||||
text = "Value",
|
||||
color = if (!valueValid) MaterialTheme.colorScheme.error else Color.Unspecified
|
||||
)
|
||||
},
|
||||
|
@ -118,11 +117,7 @@ fun TransactionDialog(
|
|||
isError = !valueValid,
|
||||
trailingIcon = {
|
||||
if (!valueValid)
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.baseline_error_24),
|
||||
contentDescription = stringResource(R.string.create_transaction_value_error),
|
||||
tint = MaterialTheme.colorScheme.error
|
||||
)
|
||||
Icon(painterResource(id = R.drawable.baseline_error_24), "error", tint = MaterialTheme.colorScheme.error)
|
||||
},
|
||||
singleLine = true
|
||||
)
|
||||
|
@ -134,7 +129,7 @@ fun TransactionDialog(
|
|||
checked = absoluteChecked,
|
||||
onCheckedChange = { absoluteChecked = it }
|
||||
)
|
||||
Text(text = stringResource(R.string.create_transaction_absolute))
|
||||
Text(text = "Absolute")
|
||||
}
|
||||
}
|
||||
Row(
|
||||
|
@ -147,7 +142,7 @@ fun TransactionDialog(
|
|||
onDismiss()
|
||||
}
|
||||
) {
|
||||
Text(text = stringResource(R.string.create_transaction_cancel))
|
||||
Text(text = "Cancel")
|
||||
}
|
||||
TextButton(
|
||||
onClick = {
|
||||
|
@ -155,12 +150,11 @@ fun TransactionDialog(
|
|||
if (doubleValue != null) {
|
||||
onConfirm(label, (doubleValue * 100).toInt(), absoluteChecked) // TODO handle fixed point
|
||||
} else {
|
||||
Toast.makeText(context,
|
||||
context.getString(R.string.create_transaction_nan), Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(context, "Value is not a number", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
) {
|
||||
Text(stringResource(R.string.create_transaction_confirm))
|
||||
Text("Create transaction")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,8 @@ import androidx.compose.material3.Text
|
|||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import eu.m724.coincounter.R
|
||||
|
||||
/**
|
||||
* A dialog that's shown when you long click on wallet name
|
||||
|
@ -39,13 +37,13 @@ fun ActionsDialog(
|
|||
modifier = Modifier.padding(16.dp)
|
||||
) {
|
||||
TextButton(onClick = onRename) {
|
||||
Text(stringResource(R.string.wallet_actions_rename))
|
||||
Text("Rename wallet")
|
||||
}
|
||||
TextButton(onClick = onDelete) {
|
||||
Text(stringResource(R.string.wallet_actions_delete))
|
||||
Text("Delete wallet")
|
||||
}
|
||||
TextButton(onClick = onDismiss) {
|
||||
Text(stringResource(R.string.wallet_actions_cancel))
|
||||
Text("Cancel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,8 @@ import androidx.compose.runtime.setValue
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import eu.m724.coincounter.R
|
||||
|
||||
@Composable
|
||||
fun RenameDialog(
|
||||
|
@ -54,7 +52,7 @@ fun RenameDialog(
|
|||
.fillMaxWidth()
|
||||
.weight(1f)
|
||||
.focusRequester(focusRequester),
|
||||
supportingText = { Text(stringResource(R.string.wallet_rename_name)) },
|
||||
supportingText = { Text("New name") },
|
||||
singleLine = true
|
||||
)
|
||||
}
|
||||
|
@ -68,14 +66,14 @@ fun RenameDialog(
|
|||
onDismiss()
|
||||
}
|
||||
) {
|
||||
Text(text = stringResource(R.string.wallet_rename_cancel))
|
||||
Text(text = "Cancel")
|
||||
}
|
||||
TextButton(
|
||||
onClick = {
|
||||
onRename(value)
|
||||
}
|
||||
) {
|
||||
Text(stringResource(R.string.wallet_rename_confirm))
|
||||
Text("Rename")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
unqualifiedResLocale=en
|
|
@ -1,20 +0,0 @@
|
|||
<resources>
|
||||
<string name="app_name">Coin Counter</string>
|
||||
<string name="title_activity_main">Coin Counter</string>
|
||||
<string name="title_activity_wallet">WalletActivity</string>
|
||||
<string name="create_transaction_confirm">Utwórz transakcję</string>
|
||||
<string name="create_transaction_nan">Wartość musi być liczbą</string>
|
||||
<string name="create_transaction_cancel">Anuluj</string>
|
||||
<string name="create_transaction_absolute">Bezwzględna</string>
|
||||
<string name="create_transaction_value_error">Błąd</string>
|
||||
<string name="create_transaction_value">Wartość</string>
|
||||
<string name="create_transaction_label">Etykieta</string>
|
||||
<string name="wallet_actions_rename">Zmień nazwę portfela</string>
|
||||
<string name="wallet_actions_delete">Usuń portfel</string>
|
||||
<string name="wallet_actions_cancel">Anuluj</string>
|
||||
<string name="wallet_rename_name">Nowa nazwa</string>
|
||||
<string name="wallet_rename_cancel">Anuluj</string>
|
||||
<string name="wallet_rename_confirm">Zmień nazwę</string>
|
||||
<string name="wallet_new_transaction">Nowa transakcja</string>
|
||||
<string name="home_add_wallet">Utwórz portfel</string>
|
||||
</resources>
|
|
@ -2,19 +2,4 @@
|
|||
<string name="app_name">Coin Counter</string>
|
||||
<string name="title_activity_main">Coin Counter</string>
|
||||
<string name="title_activity_wallet">WalletActivity</string>
|
||||
<string name="create_transaction_confirm">Create transaction</string>
|
||||
<string name="create_transaction_nan">Value must be a number</string>
|
||||
<string name="create_transaction_cancel">Cancel</string>
|
||||
<string name="create_transaction_absolute">Absolute</string>
|
||||
<string name="create_transaction_value_error">Error</string>
|
||||
<string name="create_transaction_value">Value</string>
|
||||
<string name="create_transaction_label">Label</string>
|
||||
<string name="wallet_actions_rename">Rename wallet</string>
|
||||
<string name="wallet_actions_delete">Delete wallet</string>
|
||||
<string name="wallet_actions_cancel">Cancel</string>
|
||||
<string name="wallet_rename_name">New name</string>
|
||||
<string name="wallet_rename_cancel">Cancel</string>
|
||||
<string name="wallet_rename_confirm">Rename</string>
|
||||
<string name="wallet_new_transaction">New transaction</string>
|
||||
<string name="home_add_wallet">Create wallet</string>
|
||||
</resources>
|
Loading…
Reference in a new issue