mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-24 15:47:53 -05:00
Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5be2308606 | ||
|
|
a2e81d08d7 | ||
|
|
9f5f0e79f4 | ||
|
|
3f8c4c94ce | ||
|
|
46895c0037 | ||
|
|
65c98a4840 | ||
|
|
67c58c10b2 | ||
|
|
8d82a4616f | ||
|
|
01a272f8e6 | ||
|
|
0235a397cf | ||
|
|
e37ee6f812 | ||
|
|
2b5ea47d9f | ||
|
|
0fcdaf3f60 | ||
|
|
b2cb38b61d | ||
|
|
fd1fe168cc | ||
|
|
9deb80ff9b | ||
|
|
75fdd7390f | ||
|
|
7cd6c17b55 | ||
|
|
c273d8d17f | ||
|
|
c1b02f58ff | ||
|
|
0bac2dfb62 | ||
|
|
4f0288e396 | ||
|
|
55f0399325 | ||
|
|
e756c6e50b | ||
|
|
b8c022dc70 | ||
|
|
d823ddd8aa | ||
|
|
352b42bba0 | ||
|
|
89894131d9 | ||
|
|
5ddcb0a668 | ||
|
|
5d5b1f0a63 | ||
|
|
03e638786b | ||
|
|
7d5b2f8dc8 | ||
|
|
13257d17fc | ||
|
|
5e8a589d9a | ||
|
|
44711043b9 | ||
|
|
80ee8aa860 | ||
|
|
cd6685b974 | ||
|
|
b5f464000b | ||
|
|
27159323d5 | ||
|
|
9551ce8a8b | ||
|
|
525471f749 | ||
|
|
57bedd0300 | ||
|
|
c3345a1a15 | ||
|
|
15f6bd86a1 | ||
|
|
e2ad1c9da2 | ||
|
|
7082669612 | ||
|
|
d595d24769 | ||
|
|
4287d66f6f | ||
|
|
311361d105 | ||
|
|
4a88e39deb | ||
|
|
4511590263 | ||
|
|
d0c30ffa1c | ||
|
|
813c2bff85 | ||
|
|
0c3cf43841 | ||
|
|
6c651f7e3e | ||
|
|
ef7fc92920 | ||
|
|
ccaf70c749 | ||
|
|
2299bf9d86 | ||
|
|
b65f8f32ca | ||
|
|
47695d3a72 | ||
|
|
439c660b2e | ||
|
|
4293d7d4b2 | ||
|
|
e368e66b8a | ||
|
|
992a7f9e84 | ||
|
|
ecf0faf00a | ||
|
|
64178f3fd1 | ||
|
|
dab6588800 | ||
|
|
f71bb32592 | ||
|
|
0c44212d92 | ||
|
|
ce149c91e9 |
23
.github/workflows/autoclose-needs-info.yml
vendored
Normal file
23
.github/workflows/autoclose-needs-info.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: 'Close issues and PRs needing info for too long'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
days-before-stale: -1
|
||||
days-before-close: 90
|
||||
close-issue-message: 'This issue is missing necessary information and cannot be worked on in its current state. It has therefore been closed to keep the issue tracker clean. If you have more information, feel free to reopen it.'
|
||||
close-pr-message: 'This PR is missing necessary information and cannot be merged in its current state. It has therefore been closed to keep the issue tracker clean. If you have more information, feel free to reopen it.'
|
||||
only-labels: 'needs info'
|
||||
stale-issue-label: 'needs info'
|
||||
stale-pr-label: 'needs info'
|
||||
remove-stale-when-updated: false
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,5 +1,27 @@
|
||||
# Changelog
|
||||
|
||||
## v2.2.3 (2021-08-13)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix widget creating different-looking shortcut than app shortcuts
|
||||
- Replace default Android black screen with splash screen
|
||||
|
||||
## v2.2.2 (2021-08-08)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix crash on rotation in loyalty card edit activity
|
||||
|
||||
## v2.2.1 (2021-08-07)
|
||||
|
||||
Changes:
|
||||
|
||||
- Improve Stocard importer
|
||||
- Fix importing Catima export with multiline note
|
||||
- Scale card title in acceptable range
|
||||
- Animation improvements
|
||||
|
||||
## v2.2.0 (2021-08-02)
|
||||
|
||||
Changes:
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "me.hackerchick.catima"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 30
|
||||
versionCode 76
|
||||
versionName "2.2.0"
|
||||
versionCode 79
|
||||
versionName "2.2.3"
|
||||
|
||||
vectorDrawables.useSupportLibrary true
|
||||
multiDexEnabled true
|
||||
@@ -77,6 +77,7 @@ dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.3.3'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
@@ -86,7 +87,7 @@ dependencies {
|
||||
implementation 'com.google.zxing:core:3.4.1'
|
||||
implementation 'org.apache.commons:commons-csv:1.8'
|
||||
implementation 'com.jaredrummler:colorpicker:1.1.0'
|
||||
implementation 'com.github.invissvenska:NumberPickerPreference:1.0.2'
|
||||
implementation 'com.github.invissvenska:NumberPickerPreference:1.0.3'
|
||||
implementation 'net.lingala.zip4j:zip4j:2.8.0'
|
||||
|
||||
// SpotBugs
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<activity
|
||||
android:name="protect.card_locker.MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import android.view.MenuItem;
|
||||
@@ -94,14 +92,8 @@ public class BarcodeSelectorActivity extends AppCompatActivity
|
||||
barcodeViewMap.put(BarcodeFormat.UPC_E.name(), new Pair<>(R.id.upceBarcode, R.id.upceBarcodeText));
|
||||
|
||||
EditText cardId = findViewById(R.id.cardId);
|
||||
cardId.addTextChangedListener(new TextWatcher()
|
||||
cardId.addTextChangedListener(new SimpleTextWatcher()
|
||||
{
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after)
|
||||
{
|
||||
// Noting to do
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{
|
||||
@@ -113,12 +105,6 @@ public class BarcodeSelectorActivity extends AppCompatActivity
|
||||
setButtonListener(noBarcodeButtonView, s.toString());
|
||||
noBarcodeButtonView.setEnabled(s.length() > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s)
|
||||
{
|
||||
// Noting to do
|
||||
}
|
||||
});
|
||||
|
||||
final Bundle b = getIntent().getExtras();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -12,6 +10,8 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.content.pm.ShortcutInfoCompat;
|
||||
import androidx.core.content.pm.ShortcutManagerCompat;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -69,23 +69,9 @@ public class CardShortcutConfigure extends AppCompatActivity implements LoyaltyC
|
||||
|
||||
Log.d(TAG, "Creating shortcut for card " + loyaltyCard.store + "," + loyaltyCard.id);
|
||||
|
||||
Intent shortcutIntent = new Intent(CardShortcutConfigure.this, LoyaltyCardViewActivity.class);
|
||||
shortcutIntent.setAction(Intent.ACTION_MAIN);
|
||||
// Prevent instances of the view activity from piling up; if one exists let this
|
||||
// one replace it.
|
||||
shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("id", loyaltyCard.id);
|
||||
bundle.putBoolean("view", true);
|
||||
shortcutIntent.putExtras(bundle);
|
||||
ShortcutInfoCompat shortcut = ShortcutHelper.createShortcutBuilder(CardShortcutConfigure.this, loyaltyCard).build();
|
||||
|
||||
Bitmap iconBitmap = Utils.generateIcon(CardShortcutConfigure.this, loyaltyCard, true).getLetterTile();
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, loyaltyCard.store);
|
||||
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, iconBitmap);
|
||||
setResult(RESULT_OK, intent);
|
||||
setResult(RESULT_OK, ShortcutManagerCompat.createShortcutResultIntent(CardShortcutConfigure.this, shortcut));
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package protect.card_locker;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.DatabaseUtils;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
@@ -12,6 +13,7 @@ import com.google.zxing.BarcodeFormat;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -270,8 +272,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
contentValues.put(LoyaltyCardDbIds.BARCODE_TYPE, barcodeType != null ? barcodeType.toString() : null);
|
||||
contentValues.put(LoyaltyCardDbIds.HEADER_COLOR, headerColor);
|
||||
contentValues.put(LoyaltyCardDbIds.STAR_STATUS, starStatus);
|
||||
final long newId = db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
return newId;
|
||||
return db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
}
|
||||
|
||||
public long insertLoyaltyCard(final SQLiteDatabase db, final String store,
|
||||
@@ -291,8 +292,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
contentValues.put(LoyaltyCardDbIds.BARCODE_TYPE, barcodeType != null ? barcodeType.toString() : null);
|
||||
contentValues.put(LoyaltyCardDbIds.HEADER_COLOR, headerColor);
|
||||
contentValues.put(LoyaltyCardDbIds.STAR_STATUS,starStatus);
|
||||
final long newId = db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
return newId;
|
||||
return db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
}
|
||||
|
||||
public long insertLoyaltyCard(final SQLiteDatabase db, final int id, final String store,
|
||||
@@ -313,8 +313,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
contentValues.put(LoyaltyCardDbIds.BARCODE_TYPE, barcodeType != null ? barcodeType.toString() : null);
|
||||
contentValues.put(LoyaltyCardDbIds.HEADER_COLOR, headerColor);
|
||||
contentValues.put(LoyaltyCardDbIds.STAR_STATUS,starStatus);
|
||||
final long newId = db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
return newId;
|
||||
return db.insert(LoyaltyCardDbIds.TABLE, null, contentValues);
|
||||
}
|
||||
|
||||
public boolean updateLoyaltyCard(final int id, final String store, final String note,
|
||||
@@ -335,8 +334,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
contentValues.put(LoyaltyCardDbIds.BARCODE_TYPE, barcodeType != null ? barcodeType.toString() : null);
|
||||
contentValues.put(LoyaltyCardDbIds.HEADER_COLOR, headerColor);
|
||||
int rowsUpdated = db.update(LoyaltyCardDbIds.TABLE, contentValues,
|
||||
LoyaltyCardDbIds.ID + "=?",
|
||||
new String[]{Integer.toString(id)});
|
||||
whereAttrs(LoyaltyCardDbIds.ID), withArgs(id));
|
||||
return (rowsUpdated == 1);
|
||||
}
|
||||
|
||||
@@ -346,23 +344,21 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put(LoyaltyCardDbIds.STAR_STATUS,starStatus);
|
||||
int rowsUpdated = db.update(LoyaltyCardDbIds.TABLE, contentValues,
|
||||
LoyaltyCardDbIds.ID + "=?",
|
||||
new String[]{Integer.toString(id)});
|
||||
whereAttrs(LoyaltyCardDbIds.ID),
|
||||
withArgs(id));
|
||||
return (rowsUpdated == 1);
|
||||
}
|
||||
|
||||
public LoyaltyCard getLoyaltyCard(final int id)
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
Cursor data = db.rawQuery("select * from " + LoyaltyCardDbIds.TABLE +
|
||||
" where " + LoyaltyCardDbIds.ID + "=?", new String[]{String.format("%d", id)});
|
||||
Cursor data = db.query(LoyaltyCardDbIds.TABLE, null, whereAttrs(LoyaltyCardDbIds.ID), withArgs(id), null, null, null);
|
||||
|
||||
LoyaltyCard card = null;
|
||||
|
||||
if(data.getCount() == 1)
|
||||
{
|
||||
data.moveToFirst();
|
||||
|
||||
card = LoyaltyCard.toLoyaltyCard(data);
|
||||
}
|
||||
|
||||
@@ -377,7 +373,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
Cursor data = db.rawQuery("select * from " + LoyaltyCardDbGroups.TABLE + " g " +
|
||||
" LEFT JOIN " + LoyaltyCardDbIdsGroups.TABLE + " ig ON ig." + LoyaltyCardDbIdsGroups.groupID + " = g." + LoyaltyCardDbGroups.ID +
|
||||
" where " + LoyaltyCardDbIdsGroups.cardID + "=?" +
|
||||
" ORDER BY " + LoyaltyCardDbIdsGroups.groupID, new String[]{String.format("%d", id)});
|
||||
" ORDER BY " + LoyaltyCardDbIdsGroups.groupID, withArgs(id));
|
||||
|
||||
List<Group> groups = new ArrayList<>();
|
||||
|
||||
@@ -403,8 +399,8 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
|
||||
// First delete lookup table entries associated with this card
|
||||
db.delete(LoyaltyCardDbIdsGroups.TABLE,
|
||||
LoyaltyCardDbIdsGroups.cardID + " = ? ",
|
||||
new String[]{String.format("%d", id)});
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.cardID),
|
||||
withArgs(id));
|
||||
|
||||
// Then create entries for selected values
|
||||
for (Group group : groups) {
|
||||
@@ -419,8 +415,8 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
{
|
||||
// First delete lookup table entries associated with this card
|
||||
db.delete(LoyaltyCardDbIdsGroups.TABLE,
|
||||
LoyaltyCardDbIdsGroups.cardID + " = ? ",
|
||||
new String[]{String.format("%d", id)});
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.cardID),
|
||||
withArgs(id));
|
||||
|
||||
// Then create entries for selected values
|
||||
for (Group group : groups) {
|
||||
@@ -436,13 +432,13 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
SQLiteDatabase db = getWritableDatabase();
|
||||
// Delete card
|
||||
int rowsDeleted = db.delete(LoyaltyCardDbIds.TABLE,
|
||||
LoyaltyCardDbIds.ID + " = ? ",
|
||||
new String[]{String.format("%d", id)});
|
||||
whereAttrs(LoyaltyCardDbIds.ID),
|
||||
withArgs(id));
|
||||
|
||||
// And delete lookup table entries associated with this card
|
||||
db.delete(LoyaltyCardDbIdsGroups.TABLE,
|
||||
LoyaltyCardDbIdsGroups.cardID + " = ? ",
|
||||
new String[]{String.format("%d", id)});
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.cardID),
|
||||
withArgs(id));
|
||||
|
||||
// Also wipe card images associated with this card
|
||||
try {
|
||||
@@ -492,11 +488,11 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
List<Integer> allowedIds = getGroupCardIds(group._id);
|
||||
|
||||
// Empty group
|
||||
if (allowedIds.size() > 0) {
|
||||
if (!allowedIds.isEmpty()) {
|
||||
groupFilter.append("AND (");
|
||||
|
||||
for (int i = 0; i < allowedIds.size(); i++) {
|
||||
groupFilter.append(LoyaltyCardDbIds.ID + " = " + allowedIds.get(i));
|
||||
groupFilter.append(LoyaltyCardDbIds.ID + " = ").append(allowedIds.get(i));
|
||||
if (i != allowedIds.size() - 1) {
|
||||
groupFilter.append(" OR ");
|
||||
}
|
||||
@@ -507,20 +503,18 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
}
|
||||
}
|
||||
|
||||
Cursor res = db.rawQuery("select * from " + LoyaltyCardDbIds.TABLE +
|
||||
return db.rawQuery("select * from " + LoyaltyCardDbIds.TABLE +
|
||||
" WHERE (" + LoyaltyCardDbIds.STORE + " LIKE ? " +
|
||||
" OR " + LoyaltyCardDbIds.NOTE + " LIKE ? )" +
|
||||
groupFilter.toString() +
|
||||
" ORDER BY " + LoyaltyCardDbIds.STAR_STATUS + " DESC," + LoyaltyCardDbIds.STORE + " COLLATE NOCASE ASC " +
|
||||
limitString, selectionArgs, null);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public int getLoyaltyCardCount()
|
||||
{
|
||||
// An empty string will match everything
|
||||
return getLoyaltyCardCount("");
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
return (int) DatabaseUtils.queryNumEntries(db, LoyaltyCardDbIds.TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -532,25 +526,11 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
public int getLoyaltyCardCount(String filter)
|
||||
{
|
||||
String actualFilter = String.format("%%%s%%", filter);
|
||||
String[] selectionArgs = { actualFilter, actualFilter };
|
||||
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
Cursor data = db.rawQuery("SELECT Count(*) FROM " + LoyaltyCardDbIds.TABLE +
|
||||
" WHERE " + LoyaltyCardDbIds.STORE + " LIKE ? " +
|
||||
" OR " + LoyaltyCardDbIds.NOTE + " LIKE ? "
|
||||
, selectionArgs, null);
|
||||
|
||||
int numItems = 0;
|
||||
|
||||
if(data.getCount() == 1)
|
||||
{
|
||||
data.moveToFirst();
|
||||
numItems = data.getInt(0);
|
||||
}
|
||||
|
||||
data.close();
|
||||
|
||||
return numItems;
|
||||
return (int) DatabaseUtils.queryNumEntries(db, LoyaltyCardDbIds.TABLE,
|
||||
LoyaltyCardDbIds.STORE + " LIKE ? " +
|
||||
" OR " + LoyaltyCardDbIds.NOTE + " LIKE ? ", withArgs(actualFilter, actualFilter));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -562,47 +542,40 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
|
||||
Cursor res = db.rawQuery("select * from " + LoyaltyCardDbGroups.TABLE +
|
||||
return db.rawQuery("select * from " + LoyaltyCardDbGroups.TABLE +
|
||||
" ORDER BY " + LoyaltyCardDbGroups.ORDER + " ASC," + LoyaltyCardDbGroups.ID + " COLLATE NOCASE ASC", null, null);
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<Group> getGroups() {
|
||||
Cursor data = getGroupCursor();
|
||||
try(Cursor data = getGroupCursor()) {
|
||||
List<Group> groups = new ArrayList<>();
|
||||
|
||||
List<Group> groups = new ArrayList<>();
|
||||
if (!data.moveToFirst()) {
|
||||
return groups;
|
||||
}
|
||||
|
||||
groups.add(Group.toGroup(data));
|
||||
while (data.moveToNext()) {
|
||||
groups.add(Group.toGroup(data));
|
||||
}
|
||||
|
||||
if (!data.moveToFirst()) {
|
||||
data.close();
|
||||
return groups;
|
||||
}
|
||||
|
||||
groups.add(Group.toGroup(data));
|
||||
|
||||
while (data.moveToNext()) {
|
||||
groups.add(Group.toGroup(data));
|
||||
}
|
||||
|
||||
data.close();
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void reorderGroups(final List<Group> groups)
|
||||
{
|
||||
Integer order = 0;
|
||||
|
||||
SQLiteDatabase db = getWritableDatabase();
|
||||
ContentValues contentValues;
|
||||
|
||||
for (Group group : groups)
|
||||
{
|
||||
contentValues = new ContentValues();
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put(LoyaltyCardDbGroups.ORDER, order);
|
||||
|
||||
db.update(LoyaltyCardDbGroups.TABLE, contentValues,
|
||||
LoyaltyCardDbGroups.ID + "=?",
|
||||
new String[]{group._id});
|
||||
whereAttrs(LoyaltyCardDbGroups.ID),
|
||||
withArgs(group._id));
|
||||
|
||||
order++;
|
||||
}
|
||||
@@ -611,18 +584,15 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
public Group getGroup(final String groupName)
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
Cursor data = db.rawQuery("select * from " + LoyaltyCardDbGroups.TABLE +
|
||||
" where " + LoyaltyCardDbGroups.ID + "=?", new String[]{groupName});
|
||||
Cursor data = db.query(LoyaltyCardDbGroups.TABLE, null,
|
||||
whereAttrs(LoyaltyCardDbGroups.ID), withArgs(groupName), null, null, null);
|
||||
|
||||
Group group = null;
|
||||
|
||||
if(data.getCount() == 1)
|
||||
{
|
||||
data.moveToFirst();
|
||||
|
||||
group = Group.toGroup(data);
|
||||
}
|
||||
|
||||
data.close();
|
||||
|
||||
return group;
|
||||
@@ -631,28 +601,14 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
public int getGroupCount()
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
Cursor data = db.rawQuery("SELECT Count(*) FROM " + LoyaltyCardDbGroups.TABLE, null);
|
||||
|
||||
int numItems = 0;
|
||||
|
||||
if(data.getCount() == 1)
|
||||
{
|
||||
data.moveToFirst();
|
||||
numItems = data.getInt(0);
|
||||
}
|
||||
|
||||
data.close();
|
||||
|
||||
return numItems;
|
||||
return (int) DatabaseUtils.queryNumEntries(db, LoyaltyCardDbGroups.TABLE);
|
||||
}
|
||||
|
||||
public List<Integer> getGroupCardIds(final String groupName)
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
Cursor data = db.rawQuery("SELECT " + LoyaltyCardDbIdsGroups.cardID +
|
||||
" FROM " + LoyaltyCardDbIdsGroups.TABLE +
|
||||
" WHERE " + LoyaltyCardDbIdsGroups.groupID + " =? ", new String[]{groupName});
|
||||
|
||||
Cursor data = db.query(LoyaltyCardDbIdsGroups.TABLE, withArgs(LoyaltyCardDbIdsGroups.cardID),
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.groupID), withArgs(groupName), null, null, null);
|
||||
List<Integer> cardIds = new ArrayList<>();
|
||||
|
||||
if (!data.moveToFirst()) {
|
||||
@@ -678,8 +634,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put(LoyaltyCardDbGroups.ID, name);
|
||||
contentValues.put(LoyaltyCardDbGroups.ORDER, getGroupCount());
|
||||
final long newId = db.insert(LoyaltyCardDbGroups.TABLE, null, contentValues);
|
||||
return newId;
|
||||
return db.insert(LoyaltyCardDbGroups.TABLE, null, contentValues);
|
||||
}
|
||||
|
||||
public boolean insertGroup(final SQLiteDatabase db, final String name)
|
||||
@@ -688,7 +643,7 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
contentValues.put(LoyaltyCardDbGroups.ID, name);
|
||||
contentValues.put(LoyaltyCardDbGroups.ORDER, getGroupCount());
|
||||
final long newId = db.insert(LoyaltyCardDbGroups.TABLE, null, contentValues);
|
||||
return (newId != -1);
|
||||
return newId != -1;
|
||||
}
|
||||
|
||||
public boolean updateGroup(final String groupName, final String newName)
|
||||
@@ -708,13 +663,13 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
try {
|
||||
// Update group name
|
||||
int groupsChanged = db.update(LoyaltyCardDbGroups.TABLE, groupContentValues,
|
||||
LoyaltyCardDbGroups.ID + "=?",
|
||||
new String[]{groupName});
|
||||
whereAttrs(LoyaltyCardDbGroups.ID),
|
||||
withArgs(groupName));
|
||||
|
||||
// Also update lookup tables
|
||||
db.update(LoyaltyCardDbIdsGroups.TABLE, lookupContentValues,
|
||||
LoyaltyCardDbIdsGroups.groupID + "=?",
|
||||
new String[]{groupName});
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.groupID),
|
||||
withArgs(groupName));
|
||||
|
||||
if (groupsChanged == 1) {
|
||||
db.setTransactionSuccessful();
|
||||
@@ -738,13 +693,13 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
try {
|
||||
// Delete group
|
||||
int groupsDeleted = db.delete(LoyaltyCardDbGroups.TABLE,
|
||||
LoyaltyCardDbGroups.ID + " = ? ",
|
||||
new String[]{groupName});
|
||||
whereAttrs(LoyaltyCardDbGroups.ID),
|
||||
withArgs(groupName));
|
||||
|
||||
// And delete lookup table entries associated with this group
|
||||
db.delete(LoyaltyCardDbIdsGroups.TABLE,
|
||||
LoyaltyCardDbIdsGroups.groupID + " = ? ",
|
||||
new String[]{groupName});
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.groupID),
|
||||
withArgs(groupName));
|
||||
|
||||
if (groupsDeleted == 1) {
|
||||
db.setTransactionSuccessful();
|
||||
@@ -764,21 +719,24 @@ public class DBHelper extends SQLiteOpenHelper
|
||||
{
|
||||
SQLiteDatabase db = getReadableDatabase();
|
||||
|
||||
Cursor data = db.rawQuery("SELECT Count(*) FROM " + LoyaltyCardDbIdsGroups.TABLE +
|
||||
" where " + LoyaltyCardDbIdsGroups.groupID + "=?",
|
||||
new String[]{groupName});
|
||||
return (int) DatabaseUtils.queryNumEntries(db, LoyaltyCardDbIdsGroups.TABLE,
|
||||
whereAttrs(LoyaltyCardDbIdsGroups.groupID), withArgs(groupName));
|
||||
}
|
||||
|
||||
int numItems = 0;
|
||||
|
||||
if(data.getCount() == 1)
|
||||
{
|
||||
data.moveToFirst();
|
||||
numItems = data.getInt(0);
|
||||
private String whereAttrs(String... attrs) {
|
||||
if (attrs.length == 0) {
|
||||
return null;
|
||||
}
|
||||
StringBuilder whereClause = new StringBuilder(attrs[0]).append("=?");
|
||||
for (int i = 1; i < attrs.length; i++) {
|
||||
whereClause.append(" AND ").append(attrs[i]).append("=?");
|
||||
}
|
||||
return whereClause.toString();
|
||||
}
|
||||
|
||||
data.close();
|
||||
|
||||
return numItems;
|
||||
private String[] withArgs(Object... object) {
|
||||
return Arrays.stream(object)
|
||||
.map(String::valueOf)
|
||||
.toArray(String[]::new);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,18 +15,26 @@ import protect.card_locker.preferences.Settings;
|
||||
class GroupCursorAdapter extends BaseCursorAdapter<GroupCursorAdapter.GroupListItemViewHolder>
|
||||
{
|
||||
Settings mSettings;
|
||||
private final Cursor mCursor;
|
||||
private Cursor mCursor;
|
||||
private final Context mContext;
|
||||
private final GroupCursorAdapter.GroupAdapterListener mListener;
|
||||
DBHelper mDb;
|
||||
|
||||
public GroupCursorAdapter(Context inputContext, Cursor inputCursor, GroupCursorAdapter.GroupAdapterListener inputListener) {
|
||||
super(inputCursor);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mCursor = inputCursor;
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mDb = new DBHelper(inputContext);
|
||||
|
||||
swapCursor(mCursor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swapCursor(Cursor inputCursor) {
|
||||
super.swapCursor(inputCursor);
|
||||
mCursor = inputCursor;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
@@ -10,7 +12,7 @@ import java.util.Date;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class LoyaltyCard {
|
||||
public class LoyaltyCard implements Parcelable {
|
||||
public final int id;
|
||||
public final String store;
|
||||
public final String note;
|
||||
@@ -22,6 +24,7 @@ public class LoyaltyCard {
|
||||
@Nullable
|
||||
public final String barcodeId;
|
||||
|
||||
@Nullable
|
||||
public final BarcodeFormat barcodeType;
|
||||
|
||||
@Nullable
|
||||
@@ -31,7 +34,7 @@ public class LoyaltyCard {
|
||||
|
||||
public LoyaltyCard(final int id, final String store, final String note, final Date expiry,
|
||||
final BigDecimal balance, final Currency balanceType, final String cardId,
|
||||
final String barcodeId, final BarcodeFormat barcodeType, final Integer headerColor,
|
||||
@Nullable final String barcodeId, @Nullable final BarcodeFormat barcodeType, @Nullable final Integer headerColor,
|
||||
final int starStatus)
|
||||
{
|
||||
this.id = id;
|
||||
@@ -47,6 +50,38 @@ public class LoyaltyCard {
|
||||
this.starStatus = starStatus;
|
||||
}
|
||||
|
||||
protected LoyaltyCard(Parcel in) {
|
||||
id = in.readInt();
|
||||
store = in.readString();
|
||||
note = in.readString();
|
||||
long tmpExpiry = in.readLong();
|
||||
expiry = tmpExpiry != -1 ? new Date(tmpExpiry) : null;
|
||||
balance = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
|
||||
balanceType = (Currency) in.readValue(Currency.class.getClassLoader());
|
||||
cardId = in.readString();
|
||||
barcodeId = in.readString();
|
||||
String tmpBarcodeType = in.readString();
|
||||
barcodeType = !tmpBarcodeType.isEmpty() ? BarcodeFormat.valueOf(tmpBarcodeType) : null;
|
||||
int tmpHeaderColor = in.readInt();
|
||||
headerColor = tmpHeaderColor != -1 ? tmpHeaderColor : null;
|
||||
starStatus = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeInt(id);
|
||||
parcel.writeString(store);
|
||||
parcel.writeString(note);
|
||||
parcel.writeLong(expiry != null ? expiry.getTime() : -1);
|
||||
parcel.writeValue(balance);
|
||||
parcel.writeValue(balanceType);
|
||||
parcel.writeString(cardId);
|
||||
parcel.writeString(barcodeId);
|
||||
parcel.writeString(barcodeType != null ? barcodeType.toString() : "");
|
||||
parcel.writeInt(headerColor != null ? headerColor : -1);
|
||||
parcel.writeInt(starStatus);
|
||||
}
|
||||
|
||||
public static LoyaltyCard toLoyaltyCard(Cursor cursor)
|
||||
{
|
||||
int id = cursor.getInt(cursor.getColumnIndexOrThrow(DBHelper.LoyaltyCardDbIds.ID));
|
||||
@@ -89,4 +124,21 @@ public class LoyaltyCard {
|
||||
|
||||
return new LoyaltyCard(id, store, note, expiry, balance, balanceType, cardId, barcodeId, barcodeType, headerColor, starred);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public static final Creator<LoyaltyCard> CREATOR = new Creator<LoyaltyCard>() {
|
||||
@Override
|
||||
public LoyaltyCard createFromParcel(Parcel in) {
|
||||
return new LoyaltyCard(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoyaltyCard[] newArray(int size) {
|
||||
return new LoyaltyCard[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,14 +39,22 @@ public class LoyaltyCardCursorAdapter extends BaseCursorAdapter<LoyaltyCardCurso
|
||||
public LoyaltyCardCursorAdapter(Context inputContext, Cursor inputCursor, CardAdapterListener inputListener)
|
||||
{
|
||||
super(inputCursor);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mCursor = inputCursor;
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mSelectedItems = new SparseBooleanArray();
|
||||
mAnimationItemsIndex = new SparseBooleanArray();
|
||||
|
||||
mDarkModeEnabled = MainActivity.isDarkModeEnabled(inputContext);
|
||||
|
||||
swapCursor(mCursor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swapCursor(Cursor inputCursor) {
|
||||
super.swapCursor(inputCursor);
|
||||
mCursor = inputCursor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ import android.content.res.TypedArray;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.media.ExifInterface;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -21,7 +20,6 @@ import android.os.LocaleList;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
@@ -71,6 +69,7 @@ import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.exifinterface.media.ExifInterface;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
@@ -78,6 +77,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
private final String STATE_TAB_INDEX = "savedTab";
|
||||
private final String STATE_TEMP_CARD = "tempLoyaltyCard";
|
||||
|
||||
private static final int ID_IMAGE_FRONT = 0;
|
||||
private static final int ID_IMAGE_BACK = 1;
|
||||
@@ -185,10 +185,12 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
super.onSaveInstanceState(savedInstanceState);
|
||||
tabs = findViewById(R.id.tabs);
|
||||
savedInstanceState.putInt(STATE_TAB_INDEX, tabs.getSelectedTabPosition());
|
||||
savedInstanceState.putParcelable(STATE_TEMP_CARD, tempLoyaltyCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
|
||||
tempLoyaltyCard = savedInstanceState.getParcelable(STATE_TEMP_CARD);
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
tabs = findViewById(R.id.tabs);
|
||||
tabs.selectTab(tabs.getTabAt(savedInstanceState.getInt(STATE_TAB_INDEX)));
|
||||
@@ -245,34 +247,22 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
}
|
||||
};
|
||||
|
||||
storeFieldEdit.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
storeFieldEdit.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
updateTempState(LoyaltyCardField.store, s.toString());
|
||||
generateIcon(s.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) { }
|
||||
});
|
||||
|
||||
noteFieldEdit.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
noteFieldEdit.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
updateTempState(LoyaltyCardField.note, s.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) { }
|
||||
});
|
||||
|
||||
expiryField.addTextChangedListener(new TextWatcher() {
|
||||
expiryField.addTextChangedListener(new SimpleTextWatcher() {
|
||||
CharSequence lastValue;
|
||||
|
||||
@Override
|
||||
@@ -311,10 +301,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
}
|
||||
});
|
||||
|
||||
balanceField.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
balanceField.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
try {
|
||||
@@ -327,15 +314,9 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) { }
|
||||
});
|
||||
|
||||
balanceCurrencyField.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
balanceCurrencyField.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
Currency currency;
|
||||
@@ -391,7 +372,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
}
|
||||
});
|
||||
|
||||
cardIdFieldView.addTextChangedListener(new TextWatcher() {
|
||||
cardIdFieldView.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
if (initDone && !onResuming) {
|
||||
@@ -411,12 +392,9 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
updateTempState(LoyaltyCardField.cardId, s.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) { }
|
||||
});
|
||||
|
||||
barcodeIdField.addTextChangedListener(new TextWatcher() {
|
||||
barcodeIdField.addTextChangedListener(new SimpleTextWatcher() {
|
||||
CharSequence lastValue;
|
||||
|
||||
@Override
|
||||
@@ -475,10 +453,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
}
|
||||
});
|
||||
|
||||
barcodeTypeField.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
barcodeTypeField.addTextChangedListener(new SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if (!s.toString().isEmpty()) {
|
||||
|
||||
@@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.constraintlayout.widget.Guideline;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
@@ -64,7 +65,7 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
TextView groupsView;
|
||||
TextView balanceView;
|
||||
TextView expiryView;
|
||||
TextView storeName;
|
||||
AppCompatTextView storeName;
|
||||
ImageButton maximizeButton;
|
||||
ImageView barcodeImage;
|
||||
ImageButton minimizeButton;
|
||||
@@ -429,6 +430,12 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
|
||||
|
||||
storeName.setText(loyaltyCard.store);
|
||||
storeName.setTextSize(settings.getFontSizeMax(settings.getLargeFont()));
|
||||
TextViewCompat.setAutoSizeTextTypeUniformWithConfiguration(
|
||||
storeName,
|
||||
settings.getFontSizeMin(settings.getLargeFont()),
|
||||
settings.getFontSizeMax(settings.getLargeFont()),
|
||||
1,
|
||||
TypedValue.COMPLEX_UNIT_DIP);
|
||||
|
||||
int backgroundHeaderColor;
|
||||
if(loyaltyCard.headerColor != null)
|
||||
|
||||
@@ -16,7 +16,6 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
@@ -30,6 +29,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.view.ActionMode;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -47,6 +47,8 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
protected String mFilter = "";
|
||||
protected int selectedTab = 0;
|
||||
private RecyclerView mCardList;
|
||||
private View mHelpText;
|
||||
private View mNoMatchingCardsText;
|
||||
|
||||
private ActionMode.Callback mCurrentActionModeCallback = new ActionMode.Callback()
|
||||
{
|
||||
@@ -175,13 +177,12 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
@Override
|
||||
protected void onCreate(Bundle inputSavedInstanceState)
|
||||
{
|
||||
setTheme(R.style.AppTheme_NoActionBar);
|
||||
super.onCreate(inputSavedInstanceState);
|
||||
setContentView(R.layout.main_activity);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
updateLoyaltyCardList(mFilter, null);
|
||||
|
||||
TabLayout groupsTabLayout = findViewById(R.id.groups);
|
||||
groupsTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
@Override
|
||||
@@ -218,13 +219,24 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
}
|
||||
};
|
||||
|
||||
final View helpText = findViewById(R.id.helpText);
|
||||
final View noMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
final View list = findViewById(R.id.list);
|
||||
mHelpText = findViewById(R.id.helpText);
|
||||
mNoMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
mCardList = findViewById(R.id.list);
|
||||
|
||||
helpText.setOnTouchListener(gestureTouchListener);
|
||||
noMatchingCardsText.setOnTouchListener(gestureTouchListener);
|
||||
list.setOnTouchListener(gestureTouchListener);
|
||||
mHelpText.setOnTouchListener(gestureTouchListener);
|
||||
mNoMatchingCardsText.setOnTouchListener(gestureTouchListener);
|
||||
mCardList.setOnTouchListener(gestureTouchListener);
|
||||
|
||||
// Init card list
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mCardList.setLayoutManager(mLayoutManager);
|
||||
mCardList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new LoyaltyCardCursorAdapter(this, null, this);
|
||||
mCardList.setAdapter(mAdapter);
|
||||
registerForContextMenu(mCardList);
|
||||
|
||||
updateLoyaltyCardList(mFilter, null);
|
||||
|
||||
/*
|
||||
* This was added for Huawei, but Huawei is just too much of a fucking pain.
|
||||
@@ -330,7 +342,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
MenuItem searchItem = mMenu.findItem(R.id.action_search);
|
||||
searchItem.collapseActionView();
|
||||
}
|
||||
recreate();
|
||||
ActivityCompat.recreate(this);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -384,20 +396,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
group = (Group) tag;
|
||||
}
|
||||
|
||||
mCardList = findViewById(R.id.list);
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mCardList.setLayoutManager(mLayoutManager);
|
||||
mCardList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
final TextView helpText = findViewById(R.id.helpText);
|
||||
final TextView noMatchingCardsText = findViewById(R.id.noMatchingCardsText);
|
||||
|
||||
Cursor cardCursor = mDB.getLoyaltyCardCursor(filterText, group);
|
||||
|
||||
mAdapter = new LoyaltyCardCursorAdapter(this, cardCursor, this);
|
||||
mCardList.setAdapter(mAdapter);
|
||||
|
||||
registerForContextMenu(mCardList);
|
||||
mAdapter.swapCursor(mDB.getLoyaltyCardCursor(filterText, group));
|
||||
|
||||
if(mDB.getLoyaltyCardCount() > 0)
|
||||
{
|
||||
@@ -405,21 +404,21 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
// to ensure that the noMatchingCardsText doesn't end up being shown below
|
||||
// the keyboard
|
||||
mCardList.setVisibility(View.VISIBLE);
|
||||
helpText.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.GONE);
|
||||
if(mAdapter.getItemCount() > 0)
|
||||
{
|
||||
noMatchingCardsText.setVisibility(View.GONE);
|
||||
mNoMatchingCardsText.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
noMatchingCardsText.setVisibility(View.VISIBLE);
|
||||
mNoMatchingCardsText.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mCardList.setVisibility(View.GONE);
|
||||
helpText.setVisibility(View.VISIBLE);
|
||||
noMatchingCardsText.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.VISIBLE);
|
||||
mNoMatchingCardsText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (mCurrentActionMode != null) {
|
||||
@@ -682,7 +681,6 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
@Override
|
||||
public void onRowClicked(int inputPosition)
|
||||
{
|
||||
|
||||
if (mAdapter.getSelectedItemCount() > 0)
|
||||
{
|
||||
enableActionMode(inputPosition);
|
||||
@@ -699,7 +697,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
|
||||
b.putInt("id", loyaltyCard.id);
|
||||
i.putExtras(b);
|
||||
|
||||
ShortcutHelper.updateShortcuts(MainActivity.this, loyaltyCard, i);
|
||||
ShortcutHelper.updateShortcuts(MainActivity.this, loyaltyCard);
|
||||
|
||||
startActivityForResult(i, Utils.MAIN_REQUEST);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package protect.card_locker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputType;
|
||||
import android.view.MenuItem;
|
||||
@@ -28,6 +27,8 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
private final DBHelper mDb = new DBHelper(this);
|
||||
private TextView mHelpText;
|
||||
private RecyclerView mGroupList;
|
||||
GroupCursorAdapter mAdapter;
|
||||
|
||||
@Override
|
||||
@@ -42,19 +43,28 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
{
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
updateGroupList();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateGroupList();
|
||||
|
||||
FloatingActionButton addButton = findViewById(R.id.fabAdd);
|
||||
addButton.setOnClickListener(v -> createGroup());
|
||||
addButton.bringToFront();
|
||||
|
||||
mGroupList = findViewById(R.id.list);
|
||||
mHelpText = findViewById(R.id.helpText);
|
||||
|
||||
// Init group list
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
mGroupList.setLayoutManager(mLayoutManager);
|
||||
mGroupList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new GroupCursorAdapter(this, null, this);
|
||||
mGroupList.setAdapter(mAdapter);
|
||||
|
||||
updateGroupList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,29 +74,17 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
|
||||
private void updateGroupList()
|
||||
{
|
||||
final RecyclerView groupList = findViewById(R.id.list);
|
||||
final TextView helpText = findViewById(R.id.helpText);
|
||||
mAdapter.swapCursor(mDb.getGroupCursor());
|
||||
|
||||
if (mDb.getGroupCount() == 0) {
|
||||
groupList.setVisibility(View.GONE);
|
||||
helpText.setVisibility(View.VISIBLE);
|
||||
mGroupList.setVisibility(View.GONE);
|
||||
mHelpText.setVisibility(View.VISIBLE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
groupList.setVisibility(View.VISIBLE);
|
||||
helpText.setVisibility(View.GONE);
|
||||
|
||||
Cursor groupCursor = mDb.getGroupCursor();
|
||||
|
||||
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
|
||||
groupList.setLayoutManager(mLayoutManager);
|
||||
groupList.setItemAnimator(new DefaultItemAnimator());
|
||||
|
||||
mAdapter = new GroupCursorAdapter(this, groupCursor, this);
|
||||
groupList.setAdapter(mAdapter);
|
||||
|
||||
registerForContextMenu(groupList);
|
||||
mGroupList.setVisibility(View.VISIBLE);
|
||||
mHelpText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void invalidateHomescreenActiveTab()
|
||||
@@ -160,7 +158,7 @@ public class ManageGroupsActivity extends AppCompatActivity implements GroupCurs
|
||||
mDb.reorderGroups(groups);
|
||||
|
||||
// Update UI
|
||||
mAdapter.notifyItemMoved(currentIndex, newIndex);
|
||||
updateGroupList();
|
||||
|
||||
// Ordering may have changed, so invalidate
|
||||
invalidateHomescreenActiveTab();
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.core.content.pm.ShortcutInfoCompat;
|
||||
import androidx.core.content.pm.ShortcutManagerCompat;
|
||||
import androidx.core.graphics.drawable.IconCompat;
|
||||
|
||||
class ShortcutHelper
|
||||
{
|
||||
// Android documentation says that no more than 5 shortcuts
|
||||
@@ -30,135 +30,113 @@ class ShortcutHelper
|
||||
* card exceeds the max number of shortcuts, then the least recently
|
||||
* used card shortcut is discarded.
|
||||
*/
|
||||
@TargetApi(25)
|
||||
static void updateShortcuts(Context context, LoyaltyCard card, Intent intent)
|
||||
static void updateShortcuts(Context context, LoyaltyCard card)
|
||||
{
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1)
|
||||
LinkedList<ShortcutInfoCompat> list = new LinkedList<>(ShortcutManagerCompat.getDynamicShortcuts(context));
|
||||
|
||||
DBHelper dbHelper = new DBHelper(context);
|
||||
|
||||
String shortcutId = Integer.toString(card.id);
|
||||
|
||||
// Sort the shortcuts by rank, so working with the relative order will be easier.
|
||||
// This sorts so that the lowest rank is first.
|
||||
Collections.sort(list, Comparator.comparingInt(ShortcutInfoCompat::getRank));
|
||||
|
||||
Integer foundIndex = null;
|
||||
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
{
|
||||
ShortcutManager shortcutManager = context.getSystemService(ShortcutManager.class);
|
||||
LinkedList<ShortcutInfo> list = new LinkedList<>(shortcutManager.getDynamicShortcuts());
|
||||
|
||||
DBHelper dbHelper = new DBHelper(context);
|
||||
|
||||
String shortcutId = Integer.toString(card.id);
|
||||
|
||||
// Sort the shortcuts by rank, so working with the relative order will be easier.
|
||||
// This sorts so that the lowest rank is first.
|
||||
Collections.sort(list, new Comparator<ShortcutInfo>()
|
||||
if(list.get(index).getId().equals(shortcutId))
|
||||
{
|
||||
@Override
|
||||
public int compare(ShortcutInfo o1, ShortcutInfo o2)
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1)
|
||||
{
|
||||
return o1.getRank() - o2.getRank();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
// Found the item already
|
||||
foundIndex = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Integer foundIndex = null;
|
||||
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
if(foundIndex != null)
|
||||
{
|
||||
// If the item is already found, then the list needs to be
|
||||
// reordered, so that the selected item now has the lowest
|
||||
// rank, thus letting it survive longer.
|
||||
ShortcutInfoCompat found = list.remove(foundIndex.intValue());
|
||||
list.addFirst(found);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The item is new to the list. First, we need to trim the list
|
||||
// until it is able to accept a new item, then the item is
|
||||
// inserted.
|
||||
while(list.size() >= MAX_SHORTCUTS)
|
||||
{
|
||||
if(list.get(index).getId().equals(shortcutId))
|
||||
{
|
||||
// Found the item already
|
||||
foundIndex = index;
|
||||
break;
|
||||
}
|
||||
list.pollLast();
|
||||
}
|
||||
|
||||
if(foundIndex != null)
|
||||
{
|
||||
// If the item is already found, then the list needs to be
|
||||
// reordered, so that the selected item now has the lowest
|
||||
// rank, thus letting it survive longer.
|
||||
ShortcutInfo found = list.remove(foundIndex.intValue());
|
||||
list.addFirst(found);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The item is new to the list. First, we need to trim the list
|
||||
// until it is able to accept a new item, then the item is
|
||||
// inserted.
|
||||
while(list.size() >= MAX_SHORTCUTS)
|
||||
{
|
||||
list.pollLast();
|
||||
}
|
||||
ShortcutInfoCompat shortcut = createShortcutBuilder(context, card).build();
|
||||
|
||||
ShortcutInfo shortcut = new ShortcutInfo.Builder(context, Integer.toString(card.id))
|
||||
.setShortLabel(card.store)
|
||||
.setLongLabel(card.store)
|
||||
.setIntent(intent)
|
||||
.build();
|
||||
list.addFirst(shortcut);
|
||||
}
|
||||
|
||||
list.addFirst(shortcut);
|
||||
}
|
||||
LinkedList<ShortcutInfoCompat> finalList = new LinkedList<>();
|
||||
|
||||
LinkedList<ShortcutInfo> finalList = new LinkedList<>();
|
||||
// The ranks are now updated; the order in the list is the rank.
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
{
|
||||
ShortcutInfoCompat prevShortcut = list.get(index);
|
||||
|
||||
// The ranks are now updated; the order in the list is the rank.
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
{
|
||||
ShortcutInfo prevShortcut = list.get(index);
|
||||
LoyaltyCard loyaltyCard = dbHelper.getLoyaltyCard(Integer.parseInt(prevShortcut.getId()));
|
||||
|
||||
Intent shortcutIntent = prevShortcut.getIntent();
|
||||
|
||||
Bitmap iconBitmap = Utils.generateIcon(context, dbHelper.getLoyaltyCard(Integer.parseInt(prevShortcut.getId())), true).getLetterTile();
|
||||
Icon icon;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
icon = Icon.createWithAdaptiveBitmap(iconBitmap);
|
||||
} else {
|
||||
icon = Icon.createWithBitmap(iconBitmap);
|
||||
}
|
||||
|
||||
// Prevent instances of the view activity from piling up; if one exists let this
|
||||
// one replace it.
|
||||
shortcutIntent.setFlags(shortcutIntent.getFlags() | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
|
||||
ShortcutInfo updatedShortcut = new ShortcutInfo.Builder(context, prevShortcut.getId())
|
||||
.setShortLabel(prevShortcut.getShortLabel())
|
||||
.setLongLabel(prevShortcut.getLongLabel())
|
||||
.setIntent(shortcutIntent)
|
||||
.setIcon(icon)
|
||||
ShortcutInfoCompat updatedShortcut = createShortcutBuilder(context, loyaltyCard)
|
||||
.setRank(index)
|
||||
.build();
|
||||
|
||||
finalList.addLast(updatedShortcut);
|
||||
}
|
||||
|
||||
shortcutManager.setDynamicShortcuts(finalList);
|
||||
finalList.addLast(updatedShortcut);
|
||||
}
|
||||
|
||||
ShortcutManagerCompat.setDynamicShortcuts(context, finalList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the given card id from the app shortcuts, if such a
|
||||
* shortcut exists.
|
||||
*/
|
||||
@TargetApi(25)
|
||||
static void removeShortcut(Context context, int cardId)
|
||||
{
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1)
|
||||
List<ShortcutInfoCompat> list = ShortcutManagerCompat.getDynamicShortcuts(context);
|
||||
|
||||
String shortcutId = Integer.toString(cardId);
|
||||
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
{
|
||||
ShortcutManager shortcutManager = context.getSystemService(ShortcutManager.class);
|
||||
List<ShortcutInfo> list = shortcutManager.getDynamicShortcuts();
|
||||
|
||||
String shortcutId = Integer.toString(cardId);
|
||||
|
||||
for(int index = 0; index < list.size(); index++)
|
||||
if(list.get(index).getId().equals(shortcutId))
|
||||
{
|
||||
if(list.get(index).getId().equals(shortcutId))
|
||||
{
|
||||
list.remove(index);
|
||||
break;
|
||||
}
|
||||
list.remove(index);
|
||||
break;
|
||||
}
|
||||
|
||||
shortcutManager.setDynamicShortcuts(list);
|
||||
}
|
||||
|
||||
ShortcutManagerCompat.setDynamicShortcuts(context, list);
|
||||
}
|
||||
|
||||
static ShortcutInfoCompat.Builder createShortcutBuilder(Context context, LoyaltyCard loyaltyCard) {
|
||||
Intent intent = new Intent(context, LoyaltyCardViewActivity.class);
|
||||
intent.setAction(Intent.ACTION_MAIN);
|
||||
// Prevent instances of the view activity from piling up; if one exists let this
|
||||
// one replace it.
|
||||
intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putInt("id", loyaltyCard.id);
|
||||
bundle.putBoolean("view", true);
|
||||
intent.putExtras(bundle);
|
||||
|
||||
Bitmap iconBitmap = Utils.generateIcon(context, loyaltyCard, true).getLetterTile();
|
||||
|
||||
IconCompat icon = IconCompat.createWithAdaptiveBitmap(iconBitmap);
|
||||
|
||||
return new ShortcutInfoCompat.Builder(context, Integer.toString(loyaltyCard.id))
|
||||
.setShortLabel(loyaltyCard.store)
|
||||
.setLongLabel(loyaltyCard.store)
|
||||
.setIntent(intent)
|
||||
.setIcon(icon);
|
||||
}
|
||||
}
|
||||
|
||||
15
app/src/main/java/protect/card_locker/SimpleTextWatcher.java
Normal file
15
app/src/main/java/protect/card_locker/SimpleTextWatcher.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package protect.card_locker;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
|
||||
public class SimpleTextWatcher implements TextWatcher {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) { }
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) { }
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.media.ExifInterface;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
@@ -34,6 +33,7 @@ import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.exifinterface.media.ExifInterface;
|
||||
|
||||
public class Utils {
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.StringReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Currency;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -142,18 +143,36 @@ public class CatimaImporter implements Importer
|
||||
String tmp = input.readLine();
|
||||
|
||||
if (tmp == null || tmp.isEmpty()) {
|
||||
boolean sectionParsed = false;
|
||||
|
||||
switch (part) {
|
||||
case 0:
|
||||
// This is the version info, ignore
|
||||
sectionParsed = true;
|
||||
break;
|
||||
case 1:
|
||||
parseV2Groups(db, database, stringPart);
|
||||
try {
|
||||
parseV2Groups(db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
parseV2Cards(context, db, database, stringPart);
|
||||
try {
|
||||
parseV2Cards(context, db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
parseV2CardGroups(db, database, stringPart);
|
||||
try {
|
||||
parseV2CardGroups(db, database, stringPart);
|
||||
sectionParsed = true;
|
||||
} catch (FormatException e) {
|
||||
// We may have a multiline field, try again
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new FormatException("Issue parsing CSV data, too many parts for v2 parsing");
|
||||
@@ -163,8 +182,12 @@ public class CatimaImporter implements Importer
|
||||
break;
|
||||
}
|
||||
|
||||
part += 1;
|
||||
stringPart = "";
|
||||
if (sectionParsed) {
|
||||
part += 1;
|
||||
stringPart = "";
|
||||
} else {
|
||||
stringPart += tmp + "\n";
|
||||
}
|
||||
} else {
|
||||
stringPart += tmp + "\n";
|
||||
}
|
||||
@@ -183,9 +206,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse groups
|
||||
final CSVParser groupParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : groupParser) {
|
||||
importGroup(database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -196,6 +221,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
groupParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importGroup(database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
public void parseV2Cards(Context context, DBHelper db, SQLiteDatabase database, String data) throws IOException, FormatException, InterruptedException
|
||||
@@ -203,9 +232,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse cards
|
||||
final CSVParser cardParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : cardParser) {
|
||||
importLoyaltyCard(context, database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -216,6 +247,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
cardParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importLoyaltyCard(context, database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
public void parseV2CardGroups(DBHelper db, SQLiteDatabase database, String data) throws IOException, FormatException, InterruptedException
|
||||
@@ -223,9 +258,11 @@ public class CatimaImporter implements Importer
|
||||
// Parse card group mappings
|
||||
final CSVParser cardGroupParser = new CSVParser(new StringReader(data), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
List<CSVRecord> records = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (CSVRecord record : cardGroupParser) {
|
||||
importCardGroupMapping(database, db, record);
|
||||
records.add(record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -236,6 +273,10 @@ public class CatimaImporter implements Importer
|
||||
} finally {
|
||||
cardGroupParser.close();
|
||||
}
|
||||
|
||||
for (CSVRecord record : records) {
|
||||
importCardGroupMapping(database, db, record);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,20 +9,23 @@ import com.google.zxing.BarcodeFormat;
|
||||
import net.lingala.zip4j.io.inputstream.ZipInputStream;
|
||||
import net.lingala.zip4j.model.LocalFileHeader;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVParser;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.R;
|
||||
import protect.card_locker.Utils;
|
||||
import protect.card_locker.ZipUtils;
|
||||
|
||||
@@ -37,7 +40,25 @@ public class StocardImporter implements Importer
|
||||
{
|
||||
public void importData(Context context, DBHelper db, InputStream input, char[] password) throws IOException, FormatException, JSONException, ParseException {
|
||||
HashMap<String, HashMap<String, Object>> loyaltyCardHashMap = new HashMap<>();
|
||||
HashMap<String, String> providers = new HashMap<>();
|
||||
HashMap<String, HashMap<String, String>> providers = new HashMap<>();
|
||||
|
||||
final CSVParser parser = new CSVParser(new InputStreamReader(context.getResources().openRawResource(R.raw.stocard_stores), StandardCharsets.UTF_8), CSVFormat.RFC4180.withHeader());
|
||||
|
||||
try
|
||||
{
|
||||
for (CSVRecord record : parser)
|
||||
{
|
||||
HashMap<String, String> recordData = new HashMap<>();
|
||||
recordData.put("name", record.get("name"));
|
||||
recordData.put("barcodeFormat", record.get("barcodeFormat"));
|
||||
|
||||
providers.put(record.get("_id"), recordData);
|
||||
}
|
||||
|
||||
parser.close();
|
||||
} catch(IllegalArgumentException|IllegalStateException e) {
|
||||
throw new FormatException("Issue parsing CSV data", e);
|
||||
}
|
||||
|
||||
ZipInputStream zipInputStream = new ZipInputStream(input, password);
|
||||
|
||||
@@ -68,9 +89,7 @@ public class StocardImporter implements Importer
|
||||
};
|
||||
}
|
||||
|
||||
if (startsWith(nameParts, providersFileName, 0) && !localFileHeader.isDirectory()) {
|
||||
providers = parseProviders(zipInputStream);
|
||||
} else if (startsWith(nameParts, cardBaseName, 1)) {
|
||||
if (startsWith(nameParts, cardBaseName, 1)) {
|
||||
// Extract cardName
|
||||
cardName = nameParts[cardBaseName.length].split("\\.", 2)[0];
|
||||
|
||||
@@ -139,10 +158,13 @@ public class StocardImporter implements Importer
|
||||
database.beginTransaction();
|
||||
|
||||
for (HashMap<String, Object> loyaltyCardData : loyaltyCardHashMap.values()) {
|
||||
String store = providers.get(loyaltyCardData.get("_providerId").toString());
|
||||
String providerId = (String) loyaltyCardData.get("_providerId");
|
||||
HashMap<String, String> providerData = providers.get(providerId);
|
||||
|
||||
String store = providerData != null ? providerData.get("name") : providerId;
|
||||
String note = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "note", "");
|
||||
String cardId = (String) loyaltyCardData.get("cardId");
|
||||
String barcodeTypeString = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "barcodeType", null);
|
||||
String barcodeTypeString = (String) Utils.hashmapGetOrDefault(loyaltyCardData, "barcodeType", providerData != null ? providerData.get("barcodeFormat") : null);
|
||||
BarcodeFormat barcodeType = null;
|
||||
if (barcodeTypeString != null) {
|
||||
if (barcodeTypeString.equals("RSS_DATABAR_EXPANDED")) {
|
||||
@@ -194,33 +216,4 @@ public class StocardImporter implements Importer
|
||||
|
||||
return loyaltyCardHashMap;
|
||||
}
|
||||
|
||||
private HashMap<String, String> parseProviders(ZipInputStream zipInputStream) throws IOException, JSONException {
|
||||
// FIXME: This is probably completely wrong, but it works for the one and only test file I have
|
||||
JSONObject jsonObject = ZipUtils.readJSON(zipInputStream);
|
||||
|
||||
JSONArray providerIdList = jsonObject.getJSONArray("provider_id_list");
|
||||
JSONArray providerList = jsonObject.getJSONArray("provider_list");
|
||||
|
||||
// Resort, put IDs with - in them after IDs without any -
|
||||
List<String> providerIds = new ArrayList<>();
|
||||
List<String> customProviderIds = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < providerIdList.length(); i++) {
|
||||
String providerId = providerIdList.get(i).toString();
|
||||
if (providerId.contains("-")) {
|
||||
customProviderIds.add(providerId);
|
||||
} else {
|
||||
providerIds.add(providerId);
|
||||
}
|
||||
}
|
||||
providerIds.addAll(customProviderIds);
|
||||
|
||||
HashMap<String, String> providers = new HashMap<>();
|
||||
for (int i = 0; i < jsonObject.getInt("number_of_cards"); i++) {
|
||||
providers.put(providerIds.get(i), providerList.get(i).toString());
|
||||
}
|
||||
|
||||
return providers;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import android.view.MenuItem;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.preference.Preference;
|
||||
@@ -79,7 +80,7 @@ public class SettingsActivity extends AppCompatActivity
|
||||
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.recreate();
|
||||
ActivityCompat.recreate(activity);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
7
app/src/main/res/drawable/background_splash.xml
Normal file
7
app/src/main/res/drawable/background_splash.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@color/ic_launcher_background"/>
|
||||
<item android:gravity="center"
|
||||
android:width="256dp"
|
||||
android:height="256dp"
|
||||
android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</layer-list>
|
||||
@@ -275,7 +275,7 @@
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:contentScrim="?colorPrimary"
|
||||
app:expandedTitleGravity="top">
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/storeName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
7
app/src/main/res/raw/readme.md
Normal file
7
app/src/main/res/raw/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# stocard_stores.csv
|
||||
|
||||
stocard_stores.csv was created by extracting /data/data/de.stocard/de.stocard.stocard/databases/stores on a rooted devices and running the following command over it:
|
||||
|
||||
sqlite3 -header -csv stores "select _id,name,barcodeFormat from stores" > stocard_stores.csv
|
||||
|
||||
Only used for data portability reasons (ensuring importing works). Do NOT copy this anywhere else or use it for any purpose other than ensuring we can import a GDPR-provided export. We want to make sure this stays under fair use.
|
||||
4249
app/src/main/res/raw/stocard_stores.csv
Normal file
4249
app/src/main/res/raw/stocard_stores.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -158,21 +158,21 @@
|
||||
<string name="importVoucherVault">Внасяне от Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Изберете файла <i>vouchervault.json</i>, предварително изнесен от Voucher Vault.
|
||||
\nИли създайте такъв файл от меню Изнасяне от Voucher Vault.</string>
|
||||
<string name="importStocardMessage">Изберете файла <i>***-sync.zip</i>, предварително изнесен от Stocard и ръчно изберете вида на щрихкодовете.
|
||||
\nИли получете такъв файл като пишете до support@stocardapp.com с молба за копие от вашата информация.</string>
|
||||
<string name="importStocardMessage">Изберете вашия <i>***-sync.zip</i> експорт от Stocard, за да го импортирате.
|
||||
\nИли го получете, като изпратите имейл на support@stocardapp.com с искане за експорт на вашите данни.</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Изберете файла <i>LoyaltyCardKeychain.csv</i>, предварително изнесен от Loyalty Card Keychain.
|
||||
\nИли създайте такъв файл от меню Внасяне/изнасяне от друго устройство със Loyalty Card Keychain като изберете Изнасяне.</string>
|
||||
<string name="failedParsingImportUriError">Препратката не може да бъде анализирана за внасяне</string>
|
||||
<string name="card_ids_copied">[не превеждай този низ, https://github.com/TheLastProject/Catima/issues/278]</string>
|
||||
<string name="failedGeneratingShareURL">Грешка при създаване на адрес за споделяне. Изпратете доклад за дефект.</string>
|
||||
<string name="deleteTitle">Премахване на карта</string>
|
||||
<string name="deleteTitle">Изтрийте картата</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Премахване на карта</item>
|
||||
<item quantity="other">Премахване на карти</item>
|
||||
<item quantity="one">Изтриване на <xliff:g>%d</xliff:g> карта</item>
|
||||
<item quantity="other">Изтриване на <xliff:g>%d</xliff:g> карти</item>
|
||||
</plurals>
|
||||
<string name="deleteConfirmation">Потвърдете премахване на карта</string>
|
||||
<string name="deleteConfirmation">Потвърдете премахване на карта\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Желаете ли картата да бъде премахната\?</item>
|
||||
<item quantity="other">Желаете ли <xliff:g>%d</xliff:g> картати да бъдат премахнати\?</item>
|
||||
<item quantity="one">Изтриване на тази <xliff:g>%d</xliff:g> карта завинаги\?</item>
|
||||
<item quantity="other">Изтриване на тези <xliff:g>%d</xliff:g> карти за постоянно\?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -1,10 +1,8 @@
|
||||
<resources
|
||||
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="action_add">Přidat</string>
|
||||
|
||||
<string name="noGiftCards">ZAtím némáte žádné věrnostní karty. Klikněte na tlačítko "+" (plus) nahoře a začněte.\n\nLoyalty Card Locker umožňuje nosit své věrnostní karty v telefonu, takže jsou vždy na dosah.</string>
|
||||
<string name="storeName">Obchod</string>
|
||||
<string name="noGiftCards">Klepnutím na tlačítko + plus přidáte kartu nebo ji nejprve importujete z nabídky⋮.</string>
|
||||
<string name="storeName">Název</string>
|
||||
<string name="note">Poznámka</string>
|
||||
<string name="cardId">ID karty</string>
|
||||
<string name="cancel">Zrušit</string>
|
||||
@@ -14,42 +12,64 @@
|
||||
<string name="confirm">Potvrdit</string>
|
||||
<string name="ok">Ano</string>
|
||||
<string name="copy_to_clipboard">Kopírovat ID do schránky</string>
|
||||
<string name="sendLabel">Odeslat…</string>
|
||||
<string name="sendLabel">Odeslat…</string>
|
||||
<string name="editCardTitle">Editovat věrnostní kartu</string>
|
||||
<string name="addCardTitle">Přidat věrnostní kartu</string>
|
||||
<string name="scanCardBarcode">Oskenujte kód karty</string>
|
||||
<string name="barcodeImageDescription">Obrázek kódu karty</string>
|
||||
|
||||
<string name="noStoreError">Nebyl zadán Obchod</string>
|
||||
<string name="noCardIdError">Nebylo zadáno ID karty</string>
|
||||
<string name="scanCardBarcode">Skenování Čárový Kód Karty</string>
|
||||
<string name="barcodeImageDescription">Obrázek čárového kódu karty</string>
|
||||
<string name="noStoreError">Zadáno žádné jméno</string>
|
||||
<string name="noCardIdError">Žádné ID karty zadáno</string>
|
||||
<string name="importExport">Import/Export</string>
|
||||
<string name="exportName">Export</string>
|
||||
<string name="importExportHelp">Zálohování dat vám umožní přesunout vaše uložené karty na jiné zařízení.</string>
|
||||
<string name="importSuccessfulTitle">Import proběhl úspěšně</string>
|
||||
<string name="importExportHelp">Zálohování karet vám umožní přesunout je do jiného zařízení.</string>
|
||||
<string name="importSuccessfulTitle">Dovážit</string>
|
||||
<string name="importFailedTitle">Import selhal</string>
|
||||
<string name="importFailed">Import selhal</string>
|
||||
<string name="exportSuccessfulTitle">Export proběhl úspěšně</string>
|
||||
<string name="importFailed">Nelze importovat karty</string>
|
||||
<string name="exportSuccessfulTitle">Exportovat</string>
|
||||
<string name="exportFailedTitle">Export selhal</string>
|
||||
<string name="exportFailed">Export selhal</string>
|
||||
<string name="importing">Importuji…</string>
|
||||
<string name="exporting">Exportuji…</string>
|
||||
<string name="noExternalStoragePermissionError">Nelze importovat nebo exportovat karty bez přístupu k externímu uložišti</string>
|
||||
<string name="exportFailed">Nelze exportovat karty</string>
|
||||
<string name="importing">Importuji…</string>
|
||||
<string name="exporting">Exportuji…</string>
|
||||
<string name="noExternalStoragePermissionError">Udělit povolení externího úložiště pro import nebo export karet jako první</string>
|
||||
<string name="importOptionFilesystemTitle">Import ze souborového systému</string>
|
||||
<string name="importOptionFilesystemExplanation">Vyberte konkrétní soubor v uložišti.</string>
|
||||
<string name="importOptionFilesystemButton">Ze souborového systému</string>
|
||||
<string name="importOptionApplicationTitle">Použít externí aplikaci</string>
|
||||
<string name="importOptionApplicationExplanation">K otevření souboru použije externí aplikaci jako Dropbox, Google Drive, nebo vámi preferovaný prohlížeč souborů.</string>
|
||||
<string name="importOptionApplicationButton">Použít externí aplikaci</string>
|
||||
|
||||
<string name="importOptionApplicationTitle">Použijte jinou aplikaci</string>
|
||||
<string name="importOptionApplicationExplanation">K otevření souboru použijte libovolnou aplikaci nebo svého oblíbeného správce souborů.</string>
|
||||
<string name="importOptionApplicationButton">Použijte jinou aplikaci</string>
|
||||
<string name="about">O aplikaci</string>
|
||||
<string name="app_license">Licensed under the GPLv3.</string>
|
||||
<string name="app_license">Copylefted libre software, licencovaný GPLv3+.</string>
|
||||
<string name="about_title_fmt">O aplikaci <xliff:g id="app_name">%s</xliff:g></string>
|
||||
<string name="debug_version_fmt">Verze: <xliff:g id="version">%s</xliff:g></string>
|
||||
<string name="app_revision_fmt">Revizní informace: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="app_revision_fmt">Informace o revizi: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="selectBarcodeTitle">Vyberte čárový kód</string>
|
||||
<string name="copy_to_clipboard_toast">ID karty zkopírováno do schránky</string>
|
||||
|
||||
<string name="deleteTitle">Odstzranit věrnostní kartu</string>
|
||||
<string name="copy_to_clipboard_toast">ID karty zkopírované do schránky</string>
|
||||
<string name="deleteTitle">Smazat kartu</string>
|
||||
<string name="deleteConfirmation">Opravdu chcete smazat tuto věrnostní kartu?</string>
|
||||
|
||||
</resources>
|
||||
<string name="moveBarcodeToCenterOfScreen">Střed čárového kódu na obrazovce</string>
|
||||
<string name="moveBarcodeToTopOfScreen">Přesuňte čárový kód do horní části obrazovky</string>
|
||||
<string name="chooseExpiryDate">Zvolte datum vypršení platnosti</string>
|
||||
<string name="never">Nikdy</string>
|
||||
<string name="expiryDate">Platnost</string>
|
||||
<string name="editBarcode">Upravit čárový kód</string>
|
||||
<string name="barcode">Kód</string>
|
||||
<string name="app_resources">Zdroje třetích stran Libre: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Libre knihovny třetích stran: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="app_copyright_old">Na základě Loyalty Card Keychain
|
||||
\ncopyright © 2016–2020 Branden Archer.</string>
|
||||
<string name="exportOptionExplanation">Data budou zapsána na místo podle vašeho výběru.</string>
|
||||
<string name="failedParsingImportUriError">Nelze analyzovat import URI</string>
|
||||
<string name="noCardExistsError">Nelze najít kartu</string>
|
||||
<string name="noCardsMessage">Nejprve přidejte kartu</string>
|
||||
<string name="cardShortcut">Zástupce Karty</string>
|
||||
<string name="share">Podíl</string>
|
||||
<string name="unlockScreen">Odblokovat Rotaci</string>
|
||||
<string name="lockScreen">Otáčení Bloku</string>
|
||||
<string name="unstar">Odebrat z oblíbených</string>
|
||||
<string name="star">Přidat do oblíbených</string>
|
||||
<string name="noBarcode">Žádný čárový kód</string>
|
||||
<string name="barcodeNoBarcode">Tato karta nemá čárový kód</string>
|
||||
<string name="barcodeType">Typ čárového kódu</string>
|
||||
<string name="noMatchingGiftCards">Nic jsem nenašel. Zkuste změnit vyhledávání.</string>
|
||||
<string name="action_search">Vyhledávání</string>
|
||||
</resources>
|
||||
39
app/src/main/res/values-da/strings.xml
Normal file
39
app/src/main/res/values-da/strings.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string name="scanCardBarcode">Scanne kortets stregkode</string>
|
||||
<string name="addCardTitle">Tilføj kort</string>
|
||||
<string name="editCardTitle">Rediger kort</string>
|
||||
<string name="sendLabel">Afsend…</string>
|
||||
<string name="share">Aktie</string>
|
||||
<string name="copy_to_clipboard">Kopier ID til udklipsholder</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="deleteConfirmation">Slete dette kort permanent\?</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Streichen <xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other">Streichen <xliff:g>%d</xliff:g> korts</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Karte streichen</string>
|
||||
<string name="unlockScreen">Afbloker rotation</string>
|
||||
<string name="lockScreen">Blokrotation</string>
|
||||
<string name="confirm">Bekræft</string>
|
||||
<string name="delete">Slet</string>
|
||||
<string name="edit">Rediger</string>
|
||||
<string name="save">Gem</string>
|
||||
<string name="cancel">Annuller</string>
|
||||
<string name="unstar">Fjern fra favoritter</string>
|
||||
<string name="star">Føj til favoritter</string>
|
||||
<string name="noBarcode">Ingen stregkode</string>
|
||||
<string name="barcodeNoBarcode">Dette kort har ingen stregkode</string>
|
||||
<string name="barcodeType">Stregkode type</string>
|
||||
<string name="cardId">Kort ID</string>
|
||||
<string name="note">Bemærk</string>
|
||||
<string name="storeName">Navn</string>
|
||||
<string name="noMatchingGiftCards">Jeg fandt ikke noget. Prøv at ændre din søgning.</string>
|
||||
<string name="noGiftCards">Klik på + plus-knappen for at tilføje et kort, eller importer først nogle kort fra ⋮-menuen.</string>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> valgt kort</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> valgte kort</item>
|
||||
</plurals>
|
||||
<string name="action_add">Tilføj</string>
|
||||
<string name="action_search">Søg</string>
|
||||
</resources>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="frontImageDescription">Bild der Kartenvorderseite</string>
|
||||
<string name="backImageDescription">Bild der Kartenrückseite</string>
|
||||
<string name="passwordRequired">Bitte geben Sie das Passwort ein</string>
|
||||
<string name="importStocardMessage">Wählen Sie Ihren <i>***-sync.zip</i>-Export aus Stocard zum Importieren aus, und wählen Sie anschließend die Strichcodetypen manuell aus.
|
||||
<string name="importStocardMessage">Wählen Sie Ihren <i>***-sync.zip</i>-Export aus Stocard zum Importieren aus.
|
||||
\nOder Sie erhalten ihn, indem Sie eine E-Mail an support@stocardapp.com senden und um einen Export Ihrer Daten bitten.</string>
|
||||
<string name="importStocard">Von Stocard importieren</string>
|
||||
<string name="turn_flashlight_off">Taschenlampe ausschalten</string>
|
||||
@@ -172,7 +172,7 @@
|
||||
<item quantity="other">Diese <xliff:g>%d</xliff:g> Karten endgültig löschen\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Karte löschen</item>
|
||||
<item quantity="other">Karten löschen</item>
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> Karte löschen</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> Karten löschen</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -165,14 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> tarjeta seleccionada</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> tarjetas seleccionadas</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Eliminar tarjeta</string>
|
||||
<string name="deleteTitle">Eliminar la tarjeta</string>
|
||||
<string name="deleteConfirmation">¿Quiere eliminar esta tarjeta\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">¿Borrar esta tarjeta <xliff:g>%d</xliff:g> permanentemente\?</item>
|
||||
<item quantity="other">¿Borrar estas tarjetas <xliff:g>%d</xliff:g> permanentemente\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Borrar la tarjeta</item>
|
||||
<item quantity="other">Borrar las tarjetas</item>
|
||||
<item quantity="one">Borrar <xliff:g>%d</xliff:g> tarjeta</item>
|
||||
<item quantity="other">Borrar <xliff:g>%d</xliff:g> tarjetas</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -6,30 +6,30 @@
|
||||
<string name="updateBarcodeQuestionText">Vaihdoit kortin ID-tunnuksen. Haluatko päivittää myös viivakoodin käyttämään samaa arvoa\?</string>
|
||||
<string name="updateBarcodeQuestionTitle">Päivitä viivakoodin arvo\?</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Haluan jakaa joitain kortteja kanssasi</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Kopioitiin korttitunnukset leikepöydälle</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Kortin tunnukset kopioidaan leikepöydälle</string>
|
||||
<string name="wrongValueForBarcodeType">Arvo ei ole kelvollinen valitulle viivakoodityypille</string>
|
||||
<string name="unsupportedBarcodeType">Tätä viivakoodityyppiä ei voi vielä näyttää. Sitä saatetaan tukea sovelluksen uudemmassa versiossa.</string>
|
||||
<string name="unsupportedBarcodeType">Tätä viivakoodityyppiä ei voi vielä näyttää. Sitä saatetaan tukea sovelluksen myöhemmässä versiossa.</string>
|
||||
<string name="setBarcodeId">Aseta viivakoodin arvo</string>
|
||||
<string name="sameAsCardId">Sama kuin kortin ID-tunnus</string>
|
||||
<string name="barcodeId">Viivakoodin arvo</string>
|
||||
<string name="importVoucherVaultMessage">Etsi tiedostoa joka on todennäköisesti nimetty nimellä <i>vouchervault.json</i> tuotavaksi.
|
||||
\nTai luo se Vie toiminnolla Voucher Vault sovelluksessa.</string>
|
||||
<string name="importVoucherVaultMessage">Valitse tuotava <i>vouchervault.json</i>-vienti Voucher Vaultista.
|
||||
\nTai luo se painamalla ensin Vie Voucher Vaultissa.</string>
|
||||
<string name="importVoucherVault">Tuo Voucher Vault varmuuskopiotiedostosta</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Etsi tiedostoa joka on todennäköisesti nimetty nimellä <i>LoyaltyCardKeychain.csv</i> tuotavaksi.
|
||||
\nTai luo se Tuo/Vie toiminnolla Loyalty Card Keychain sovelluksessa, valitsemalla valikosta Vie.</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Valitse <i>LoyaltyCardKeychain.csv</i>-vientitietosi Loyalty Card Keychainista tuotavaksi.
|
||||
\nTai luo se Loyalty Card Keychainin Import/Export-valikosta painamalla ensin Export (Vie).</string>
|
||||
<string name="importLoyaltyCardKeychain">Tuo Loyalty Card Keychain varmuuskopiotiedostosta</string>
|
||||
<string name="importFidmeMessage">Etsi tiedostoa joka on todennäköisesti nimetty nimellä <i>fidme-export-request-xxxxxx.zip</i> tuotavaksi ja valitse viivakoodityypit manuaalisesti jälkeenpäin.
|
||||
\nTai luo se Tuo/Vie toiminnolla FidMe profiilistasi, valitsemalla Tietotosuoja ja sitten valitsemalla Vie tietoni.</string>
|
||||
<string name="importFidmeMessage">Valitse <i>fidme-export-request-xxxxxxxx.zip</i>-vienti FidMe:stä tuotavaksi ja valitse viivakoodityypit manuaalisesti sen jälkeen.
|
||||
\nTai luo se FidMe-profiilistasi valitsemalla Tietosuoja ja painamalla ensin Extract my data.</string>
|
||||
<string name="importFidme">Tuo FidMe varmuuskopiotiedostosta</string>
|
||||
<string name="importCatimaMessage">Etsi tiedostoa joka on todennäköisesti nimetty nimellä <i>Catima.csv</i> tuotavaksi.
|
||||
\nTai luo se Tuo/Vie toiminnolla Catima sovelluksessa, valitsemalla valikosta Vie.</string>
|
||||
<string name="importCatimaMessage">Valitse tuotava <i>catima.zip</i>-vienti Catimasta.
|
||||
\nTai luo se jonkin toisen Catima-sovelluksen Tuo/Vie-valikosta painamalla siellä ensin Vie.</string>
|
||||
<string name="importCatima">Tuo Catima varmuuskopiotiedostosta</string>
|
||||
<string name="accept">Hyväksy</string>
|
||||
<string name="privacy_policy_popup_text">Tietosuojaseloste (joidenkin sovelluskauppojen vaatimus):
|
||||
\n
|
||||
\nMITÄÄN TIETOJA EI KERÄTÄ LAINKAAN, minkä kuka tahansa voi vahvistaa, koska sovelluksemma on vapaa ohjelmisto.</string>
|
||||
<string name="privacy_policy">Tietosuojakäytäntö</string>
|
||||
<string name="app_loyalty_card_keychain">Loyalty Card Keychain</string>
|
||||
<string name="app_loyalty_card_keychain">Kanta-asiakaskortin avainnippu</string>
|
||||
<string name="chooseImportType">Tuo tietoja kohteesta\?</string>
|
||||
<string name="parsingBalanceFailed"><xliff:g>%s</xliff:g> ei vaikuta olevan kelvollinen saldo.</string>
|
||||
<string name="points">Pisteet</string>
|
||||
@@ -85,8 +85,8 @@
|
||||
<string name="copy_to_clipboard_toast">Kortin ID-tunnus kopioitu leikepöydälle</string>
|
||||
<string name="enterBarcodeInstructions">Syötä kortin ID-tunnus ja valitse sen viivakoodityyppi, tai valitse \"Tällä kortilla ei ole viivakoodia\".</string>
|
||||
<string name="selectBarcodeTitle">Valitse viivakoodi</string>
|
||||
<string name="app_resources">Kolmannen osapuolen vapaat resurssit: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Kolmannen osapuolen vapaat kirjastot: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="app_resources">Vapaat kolmannen osapuolen resurssit: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Kolmannen osapuolen Libre-kirjastot: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="app_revision_fmt">Muutostiedot: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="debug_version_fmt">Versio: <xliff:g id="version">%s</xliff:g></string>
|
||||
<string name="about_title_fmt">Tietoja <xliff:g id="app_name">%s</xliff:g></string>
|
||||
@@ -156,4 +156,23 @@
|
||||
<string name="frontImageDescription">Kortin etukuva</string>
|
||||
<string name="deleteConfirmation">Poista tämä kortti\?</string>
|
||||
<string name="deleteTitle">Poista kortti</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Poista tämä <xliff:g>%d</xliff:g> kortti pysyvästi\?</item>
|
||||
<item quantity="other">Poista tämä <xliff:g>%d</xliff:g> kortit pysyvästi\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Poista <xliff:g>%d</xliff:g>kortti</item>
|
||||
<item quantity="other">Poista <xliff:g>%d</xliff:g>kortit</item>
|
||||
</plurals>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> Kortti valittu</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> kortit valitut</item>
|
||||
</plurals>
|
||||
<string name="importStocard">Tuo Stocardista</string>
|
||||
<string name="importStocardMessage">Valitse tuotava <i>***-sync.zip</i>-vienti Stocardista.
|
||||
\nTai hanki se lähettämällä sähköpostia osoitteeseen support@stocardapp.com ja pyytämällä tietojesi vientiä.</string>
|
||||
<string name="passwordRequired">Ole hyvä ja syötä salasana</string>
|
||||
<string name="failedGeneratingShareURL">Ei pystynyt luomaan jaettavaa URL-osoitetta. Ilmoita tästä.</string>
|
||||
<string name="turn_flashlight_on">Sytytä taskulamppu</string>
|
||||
<string name="turn_flashlight_off">Sammuta salamavalo</string>
|
||||
</resources>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Image verso de la carte</string>
|
||||
<string name="frontImageDescription">Image recto de la carte</string>
|
||||
<string name="passwordRequired">Veuillez entrer le mot de passe</string>
|
||||
<string name="importStocardMessage">Sélectionnez votre exportation <i>***-sync.zip</i> de Stocard pour l’importer, et sélectionnez les types de codes-barres manuellement par la suite.
|
||||
<string name="importStocardMessage">Sélectionnez votre exportation <i>***-sync.zip</i> de Stocard pour l’importer.
|
||||
\nVous pouvez aussi l’obtenir en envoyant un courriel à support@stocardapp.com pour demander une exportation de vos données.</string>
|
||||
<string name="importStocard">Importer depuis Stocard</string>
|
||||
<string name="turn_flashlight_off">Éteindre la lampe de poche</string>
|
||||
@@ -165,10 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> carte sélectionnée</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> cartes sélectionnées</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Supprimer la carte de fidélité</string>
|
||||
<string name="deleteTitle">Supprimer la carte</string>
|
||||
<string name="deleteConfirmation">Supprimer cette carte \?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Supprimer cette <xliff:g>%d</xliff:g> carte définitivement \?</item>
|
||||
<item quantity="other">Supprimer ces <xliff:g>%d</xliff:g> cartes définitivement \?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Supprimer <xliff:g>%d</xliff:g> carte</item>
|
||||
<item quantity="other">Supprimer <xliff:g>%d</xliff:g> cartes</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -41,9 +41,9 @@
|
||||
<string name="importing">Importazione in corso…</string>
|
||||
<string name="exporting">Esportazione in corso…</string>
|
||||
<string name="noExternalStoragePermissionError">Concedi l\'autorizzazione all\'archiviazione esterna per importare o esportare prima le carte</string>
|
||||
<string name="importOptionFilesystemTitle">Importa dal file system</string>
|
||||
<string name="importOptionFilesystemExplanation">Scegli un file dal file system.</string>
|
||||
<string name="importOptionFilesystemButton">Dal file system</string>
|
||||
<string name="importOptionFilesystemTitle">Importa dall\'archivio</string>
|
||||
<string name="importOptionFilesystemExplanation">Scegli un file dall\'archivio.</string>
|
||||
<string name="importOptionFilesystemButton">Dall\'archivio</string>
|
||||
<string name="importOptionApplicationTitle">Usa un’altra app</string>
|
||||
<string name="importOptionApplicationExplanation">Usa qualsiasi app o il tuo gestore di file preferito per aprire un file.</string>
|
||||
<string name="importOptionApplicationButton">Usa un’altra app</string>
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Immagine posteriore della carta</string>
|
||||
<string name="frontImageDescription">Immagine frontale della carta</string>
|
||||
<string name="passwordRequired">Si prega di inserire la password</string>
|
||||
<string name="importStocardMessage">Seleziona la tua esportazione <i>***-sync.zip</i> da Stocard per importare, e seleziona i tipi di codice a barre manualmente dopo.
|
||||
<string name="importStocardMessage">Seleziona la tua esportazione <i>***-sync.zip</i> da Stocard per importare.
|
||||
\nOppure ottenerlo inviando un\'e-mail a support@stocardapp.com chiedendo un\'esportazione dei tuoi dati.</string>
|
||||
<string name="importStocard">Importa da Stocard</string>
|
||||
<string name="turn_flashlight_off">Spegni la torcia</string>
|
||||
@@ -165,14 +165,14 @@
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> carta selezionata</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> carte selezionate</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Rimuovi carta fedeltà</string>
|
||||
<string name="deleteTitle">Rimuovi la carta</string>
|
||||
<string name="deleteConfirmation">Eliminare questa carta\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Eliminare definitivamente questa scheda <xliff:g>%d</xliff:g>\?</item>
|
||||
<item quantity="other">Eliminare definitivamente queste schede <xliff:g>%d</xliff:g>\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Elimina la carta</item>
|
||||
<item quantity="other">Elimina le carte</item>
|
||||
<item quantity="one">Elimina <xliff:g>%d</xliff:g> carta</item>
|
||||
<item quantity="other">Elimina <xliff:g>%d</xliff:g> carte</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -59,7 +59,7 @@
|
||||
<string name="failedParsingImportUriError">Nepavyko iššifruoti importo URI</string>
|
||||
<string name="turn_flashlight_off">Išjunkti žibintuvėlį</string>
|
||||
<string name="turn_flashlight_on">Įjunkti žibintuvėlį</string>
|
||||
<string name="failedGeneratingShareURL">Nepavyko sugeneruoti bendrinamo URL. Praneškite apie šią klaidą!</string>
|
||||
<string name="failedGeneratingShareURL">Nepavyko sugeneruoti bendrinamo URL. Praneškite apie tai.</string>
|
||||
<string name="passwordRequired">Įveskite slaptažodį</string>
|
||||
<string name="no">Ne</string>
|
||||
<string name="yes">Taip</string>
|
||||
@@ -79,7 +79,7 @@
|
||||
<string name="setBarcodeId">Nustatyti brūkšninio kodo reikšmę</string>
|
||||
<string name="sameAsCardId">Tokia pat kaip kortelės ID</string>
|
||||
<string name="barcodeId">Brūkšninio kodo reikšmė</string>
|
||||
<string name="importStocardMessage">Pasirinkite <i>***-sync.zip</i> eksportą iš Stocard, kad galėtumėte importuoti, o vėliau brūkšninių kodų tipus pasirinkite rankiniu būdu.
|
||||
<string name="importStocardMessage">Pasirinkite <i>***-sync.zip</i> eksportą iš Stocard, kad galėtumėte importuoti.
|
||||
\nArba gaukite susisiekę el. paštu support@stocardapp.com, prašydami eksportuoti jūsų duomenis.</string>
|
||||
<string name="importStocard">Importuoti iš Stocard</string>
|
||||
<string name="importFidmeMessage">Pasirinkite <i>fidme-export-request-xxxxxx.zip</i> eksportą iš FidMe, kurį norite importuoti, ir po to brūkšninių kodų tipus pasirinkite rankiniu būdu.
|
||||
@@ -169,4 +169,14 @@
|
||||
</plurals>
|
||||
<string name="deleteTitle">Panaikinti lojalumo kortelę</string>
|
||||
<string name="deleteConfirmation">Ištrinti šią kortelę\?</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Ištrinti šią <xliff:g>%d</xliff:g> kortelę visam laikui\?</item>
|
||||
<item quantity="few">Ištrinti šias <xliff:g>%d</xliff:g> korteles visam laikui\?</item>
|
||||
<item quantity="other">Ištrinti šias <xliff:g>%d</xliff:g> kortelių visam laikui\?</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Ištrinti <xliff:g>%d</xliff:g> kortelę</item>
|
||||
<item quantity="few">Ištrinti <xliff:g>%d</xliff:g> korteles</item>
|
||||
<item quantity="other">Ištrinti <xliff:g>%d</xliff:g> kortelių</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="photos">Bilder</string>
|
||||
<string name="backImageDescription">Kortets bakside</string>
|
||||
<string name="frontImageDescription">Kortets forside</string>
|
||||
<string name="importStocardMessage">Velg din <i>***-sync.zip</i>-eksport fra Stocard å importere, og velg strekkodetypene manuelt etterpå.
|
||||
<string name="importStocardMessage">Velg din <i>***-sync.zip</i>-eksport fra Stocard å importere.
|
||||
\nEller få den ved å sende e-post til support@stocardapp.com der du etterspør eksport av dataen din.</string>
|
||||
<string name="passwordRequired">Skriv inn passordet</string>
|
||||
<string name="importStocard">Importer fra Stocard</string>
|
||||
@@ -172,7 +172,7 @@
|
||||
<string name="turn_flashlight_off">Skru av lommelykten</string>
|
||||
<string name="deleteTitle">Fjern kundekort</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Slett kort</item>
|
||||
<item quantity="other">Slett kort</item>
|
||||
<item quantity="one">Slett <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">%d</xliff:g> kort</item>
|
||||
<item quantity="other">Slett <xliff:g xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
<string name="backImageDescription">Achterzijde van de kaart</string>
|
||||
<string name="frontImageDescription">Voorzijde van de kaart</string>
|
||||
<string name="passwordRequired">Voer het wachtwoord in</string>
|
||||
<string name="importStocardMessage">Kies het te importeren Stocard-exportbestand genaamd <i>***-sync.zip</i> en kies nadien de juiste barcodes.
|
||||
<string name="importStocardMessage">Kies het te importeren Stocard-exportbestand genaamd <i>***-sync.zip</i>.
|
||||
\nOf stuur een e-mail naar support@stocardapp.com waarin je vraagt om een exportbestand.</string>
|
||||
<string name="importStocard">Importeren uit Stocard</string>
|
||||
<string name="failedGeneratingShareURL">De te delen link kan niet worden gegenereerd. Meld deze fout.</string>
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<string name="backImageDescription">Задняя сторона карты</string>
|
||||
<string name="frontImageDescription">Лицевая сторона карты</string>
|
||||
<string name="photos">Фотографии</string>
|
||||
<string name="importStocardMessage">Выберите файл <i>***-sync.zip</i> для импортирования, а затем вручную укажите типы штрих-кодов.
|
||||
<string name="importStocardMessage">Выберите файл <i>***-sync.zip</i> для импортирования.
|
||||
\nЭтот файл можно получить по электронной почте от support@stocardapp.com, предварительно запросив экспорт ваших данных.</string>
|
||||
<string name="passwordRequired">Введите пароль</string>
|
||||
<string name="importStocard">Импорт из Stocard</string>
|
||||
@@ -177,4 +177,10 @@
|
||||
<item quantity="many">Удалить эти <xliff:g>%d</xliff:g> карт безвозвратно\?</item>
|
||||
<item quantity="other">Удалить эти <xliff:g>%d</xliff:g> карт безвозвратно\?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Удаление <xliff:g>%d</xliff:g> карты</item>
|
||||
<item quantity="few">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
<item quantity="many">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
<item quantity="other">Удаление <xliff:g>%d</xliff:g> карт</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
177
app/src/main/res/values-sv/strings.xml
Normal file
177
app/src/main/res/values-sv/strings.xml
Normal file
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="settings_lock_barcode_orientation">Lås streckkodens riktning</string>
|
||||
<string name="settings_display_barcode_max_brightness">Gör streckkodsvyn ljusare</string>
|
||||
<string name="settings_max_font_size_scale">Max. teckenstorlek</string>
|
||||
<string name="settings_keep_screen_on">Håll skärmen påslagen</string>
|
||||
<string name="enterBarcodeInstructions">Ange kortets ID och välj antingen streckkodstyp nedan, eller \"Detta kort har ingen streckkod\".</string>
|
||||
<string name="importFidmeMessage">Välj den exporterade <i>fidme-export-request-xxxxxx.zip</i> från FidMe som du vill importera och välj streckkodstyper manuellt efteråt,
|
||||
\neller skapa en från din FidMe-profil först genom att välja \"Data Protection\" och sen trycka på \"Extract my data\".</string>
|
||||
<string name="importOptionApplicationExplanation">Använd vilken app som helst eller den filhanterare du föredrar för att öppna en fil.</string>
|
||||
<string name="importOptionApplicationButton">Använd en annan app</string>
|
||||
<string name="intent_import_card_from_url_share_text">Jag vill dela ett kort med dig</string>
|
||||
<string name="noGroups">Klicka på plus(+)-knappen för att lägga till kategorigrupper först.</string>
|
||||
<string name="groupsList">Grupper: <xliff:g>%s</xliff:g></string>
|
||||
<string name="errorReadingImage">Kunde inte läsa bilden</string>
|
||||
<string name="currency">Valuta</string>
|
||||
<string name="failedGeneratingShareURL">Kunde inte skapa en delningsbar URL. Var snäll och rapportera detta.</string>
|
||||
<string name="barcodeImageDescription">Bild av kortets streckkod</string>
|
||||
<string name="card_ids_copied">Kopierade kort ID:n</string>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> kort valt</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> kort valda</item>
|
||||
</plurals>
|
||||
<string name="app_loyalty_card_keychain">Loyalty Card Keychain</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Välj den exporterade <i>LoyaltyCardKeychain.csv</i> från Loyalty Card Keychain som du vill importera,
|
||||
\neller skapa en från Import/Export-menyn i Loyalty Card Keychain först genom att trycka på Exportera.</string>
|
||||
<string name="importVoucherVaultMessage">Välj den exporterade <i>vouchervault.json</i> från Voucher Vault som du vill importera,
|
||||
\neller skapa en först genom att trycka på Exportera i Voucher Vault.</string>
|
||||
<string name="importStocardMessage">Välj den exporterade <i>***-sync.zip</i> från Stocard som du vill importera,
|
||||
\neller skaffa en först genom att skicka e-post till support@stocardapp.com och be om att få dina data exporterade.</string>
|
||||
<string name="enter_group_name">Ange gruppnamn</string>
|
||||
<string name="groups">Grupper</string>
|
||||
<plurals name="groupCardCount">
|
||||
<item quantity="one"><xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other"><xliff:g>%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
<string name="all">Alla</string>
|
||||
<string name="deleteConfirmationGroup">Ta bort grupp\?</string>
|
||||
<string name="failedOpeningFileManager">Installera en filhanterare först.</string>
|
||||
<string name="moveUp">Flytta uppåt</string>
|
||||
<string name="moveDown">Flytta nedåt</string>
|
||||
<string name="leaveWithoutSaveTitle">Avsluta</string>
|
||||
<string name="leaveWithoutSaveConfirmation">Avsluta utan att spara\?</string>
|
||||
<string name="addManually">Ange kort-ID manuellt</string>
|
||||
<string name="addFromImage">Välj bild från galleriet</string>
|
||||
<string name="balancePoints"><xliff:g>%s</xliff:g> poäng</string>
|
||||
<string name="card">Kort</string>
|
||||
<string name="barcode">Streckkod</string>
|
||||
<string name="editBarcode">Redigera streckkod</string>
|
||||
<string name="never">Aldrig</string>
|
||||
<string name="moveBarcodeToTopOfScreen">Flytta streckkoden högst upp på skärmen</string>
|
||||
<string name="moveBarcodeToCenterOfScreen">Centrera streckkoden på skärmen</string>
|
||||
<string name="noBarcodeFound">Hittade ingen streckkod</string>
|
||||
<string name="points">Poäng</string>
|
||||
<string name="chooseImportType">Importera data från...\?</string>
|
||||
<string name="accept">Acceptera</string>
|
||||
<string name="importCatima">Importera från Catima</string>
|
||||
<string name="importFidme">Importera från FidMe</string>
|
||||
<string name="importLoyaltyCardKeychain">Importera från Loyalty Card Keychain</string>
|
||||
<string name="importStocard">Importera from Stocard</string>
|
||||
<string name="importVoucherVault">Importera från Voucher Vault</string>
|
||||
<string name="barcodeId">Streckkodsvärde</string>
|
||||
<string name="passwordRequired">Var snäll och ange lösenordet</string>
|
||||
<string name="no">Nej</string>
|
||||
<string name="yes">Ja</string>
|
||||
<string name="updateBarcodeQuestionText">Du ändrade kortets ID. Vill du uppdatera så att streckkoden också använder samma värde\?</string>
|
||||
<string name="updateBarcodeQuestionTitle">Uppdatera streckkodsvärde\?</string>
|
||||
<string name="takePhoto">Ta ett foto</string>
|
||||
<string name="removeImage">Ta bort bild</string>
|
||||
<string name="setBackImage">Ange baksidesbild</string>
|
||||
<string name="setFrontImage">Ange framsidesbild</string>
|
||||
<string name="photos">Foton</string>
|
||||
<string name="backImageDescription">Bild av kortets baksida</string>
|
||||
<string name="frontImageDescription">Bild av kortets framsida</string>
|
||||
<string name="intent_import_card_from_url_share_multiple_text">Jag vill dela några kort med dig</string>
|
||||
<string name="copy_to_clipboard_multiple_toast">Kort-ID:n kopierades till Urklipp</string>
|
||||
<string name="wrongValueForBarcodeType">Värdet är inte giltigt för den valda streckkodstypen</string>
|
||||
<string name="unsupportedBarcodeType">Denna streckkodstyp kan ännu inte visas. Den kan komma att stödjas i en senare version av appen.</string>
|
||||
<string name="setBarcodeId">Ange streckkodsvärde</string>
|
||||
<string name="sameAsCardId">Samma som kort-ID</string>
|
||||
<string name="turn_flashlight_on">Sätt på ficklampa</string>
|
||||
<string name="turn_flashlight_off">Stäng av ficklampa</string>
|
||||
<string name="settings_dark_theme">Mörkt</string>
|
||||
<string name="settings_light_theme">Ljust</string>
|
||||
<string name="settings_theme">Tema</string>
|
||||
<string name="settings_category_title_ui">Användargränssnitt</string>
|
||||
<string name="settings">Inställningar</string>
|
||||
<string name="thumbnailDescription">Miniatyrbild av kort</string>
|
||||
<string name="copy_to_clipboard_toast">Kort-ID kopierat till Urklipp</string>
|
||||
<string name="selectBarcodeTitle">Välj streckkod</string>
|
||||
<string name="debug_version_fmt">Version: <xliff:g id="version">%s</xliff:g></string>
|
||||
<string name="about_title_fmt">Om <xliff:g id="app_name">%s</xliff:g></string>
|
||||
<string name="app_copyright_old">Baserad på Loyalty Card Keychain
|
||||
\ncopyright © 2016–2020 Branden Archer.</string>
|
||||
<string name="app_copyright_fmt" tools:ignore="PluralsCandidate">Copyright © 2019–<xliff:g>%d</xliff:g> Sylvia van Os.</string>
|
||||
<string name="about">Om</string>
|
||||
<string name="importOptionApplicationTitle">Använd en annan app</string>
|
||||
<string name="importOptionFilesystemButton">Från filsystemet</string>
|
||||
<string name="importOptionFilesystemExplanation">Välj en specifik fil från filsystemet.</string>
|
||||
<string name="importOptionFilesystemTitle">Importera från filsystem</string>
|
||||
<string name="exporting">Exporterar…</string>
|
||||
<string name="importing">Importerar…</string>
|
||||
<string name="exportFailed">Kunde inte exportera kort</string>
|
||||
<string name="importFailed">Kunde inte importera kort</string>
|
||||
<string name="importSuccessfulTitle">Importen lyckades</string>
|
||||
<string name="importFailedTitle">Importen misslyckades</string>
|
||||
<string name="importExportHelp">Säkerhetskopiering av dina kort låter dig flytta dem till en annan enhet.</string>
|
||||
<string name="importExport">Importera/Exportera</string>
|
||||
<string name="noCardExistsError">Kunde inte hitta kort</string>
|
||||
<string name="noCardIdError">Inget kort-ID har angivits</string>
|
||||
<string name="noStoreError">Inget namn har angivits</string>
|
||||
<string name="noCardsMessage">Lägg till ett kort först</string>
|
||||
<string name="cardShortcut">Kort-genväg</string>
|
||||
<string name="addCardTitle">Lägg till kort</string>
|
||||
<string name="editCardTitle">Redigera kort</string>
|
||||
<string name="sendLabel">Skicka…</string>
|
||||
<string name="share">Dela</string>
|
||||
<string name="copy_to_clipboard">Kopiera ID till Urklipp</string>
|
||||
<string name="ok">OK</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Ta bort detta <xliff:g>%d</xliff:g> kort permanent\?</item>
|
||||
<item quantity="other">Ta bort dessa <xliff:g>%d</xliff:g> kort permanent\?</item>
|
||||
</plurals>
|
||||
<string name="deleteConfirmation">Ta bort detta kort permanent\?</string>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Ta bort <xliff:g>%d</xliff:g> kort</item>
|
||||
<item quantity="other">Ta bort <xliff:g>%d</xliff:g> kort</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Ta bort kort</string>
|
||||
<string name="confirm">Bekräfta</string>
|
||||
<string name="delete">Ta bort</string>
|
||||
<string name="edit">Redigera</string>
|
||||
<string name="save">Spara</string>
|
||||
<string name="cancel">Avbryt</string>
|
||||
<string name="unstar">Ta bort från favoriter</string>
|
||||
<string name="star">Lägg till i favoriter</string>
|
||||
<string name="noBarcode">Ingen streckkod</string>
|
||||
<string name="barcodeNoBarcode">Detta kort har ingen streckkod</string>
|
||||
<string name="barcodeType">Streckkodstyp</string>
|
||||
<string name="cardId">Kort-ID</string>
|
||||
<string name="storeName">Namn</string>
|
||||
<string name="noMatchingGiftCards">Hittade ingenting. Försök justera din sökning.</string>
|
||||
<string name="noGiftCards">Klicka på plus(+)-knappen för att lägga till ett kort, eller importera några från ⋮-menyn först.</string>
|
||||
<string name="action_add">Lägg till</string>
|
||||
<string name="action_search">Sök</string>
|
||||
<string name="exportOptionExplanation">Datan kommer att sparas till en plats som du väljer.</string>
|
||||
<string name="exportName">Exportera</string>
|
||||
<string name="exportFailedTitle">Exporten misslyckades</string>
|
||||
<string name="exportSuccessfulTitle">Exporten lyckades</string>
|
||||
<string name="scanCardBarcode">Skanna streckkod på kort</string>
|
||||
<string name="settings_system_theme">Systemtemat</string>
|
||||
<string name="app_revision_fmt">Ändringsinfo: <xliff:g id="app_revision_url">%s</xliff:g></string>
|
||||
<string name="privacy_policy_popup_text">Notis rörande integritetspolicy (krävs av vissa appbutiker):
|
||||
\n
|
||||
\nINGEN DATA ALLS SAMLAS IN, vilket vem som helst kan bekräfta eftersom vår app är fri programvara.</string>
|
||||
<string name="unlockScreen">Tillåt rotation</string>
|
||||
<string name="privacy_policy">Integritetspolicy</string>
|
||||
<string name="expiryStateSentenceExpired">Förföll: <xliff:g>%s</xliff:g></string>
|
||||
<string name="chooseExpiryDate">Välj förfallodatum</string>
|
||||
<string name="expiryDate">Förfallodatum</string>
|
||||
<string name="starImage">Favoritstjärna</string>
|
||||
<string name="app_license">Copyleftad fri programvara, under GPLv3+-licens.</string>
|
||||
<string name="app_resources">Fria tredjepartsresurser: <xliff:g id="app_resources_list">%s</xliff:g></string>
|
||||
<string name="app_libraries">Fria tredjepartsbibliotek: <xliff:g id="app_libraries_list">%s</xliff:g></string>
|
||||
<string name="parsingBalanceFailed"><xliff:g>%s</xliff:g> verkar inte vara ett giltigt saldo.</string>
|
||||
<string name="balance">Saldo</string>
|
||||
<string name="balanceSentence">Saldo: <xliff:g>%s</xliff:g></string>
|
||||
<string name="settings_disable_lockscreen_while_viewing_card">Förhindra skärmlåsning</string>
|
||||
<string name="lockScreen">Förhindra rotation</string>
|
||||
<string name="importCatimaMessage">Välj den exporterade <i>catima.zip</i> från Catima som du vill importera,
|
||||
\neller skapa en från Import/Export-menyn i en annan Catima-app genom att trycka på Exportera där först.</string>
|
||||
<string name="expiryStateSentence">Giltigt till: <xliff:g>%s</xliff:g></string>
|
||||
<string name="exportSuccessful">Kortdata exporterad</string>
|
||||
<string name="importSuccessful">Kortdata importerad</string>
|
||||
<string name="failedParsingImportUriError">Kunde inte tolka import-URI:n</string>
|
||||
<string name="note">Anteckning</string>
|
||||
</resources>
|
||||
@@ -41,7 +41,7 @@
|
||||
<string name="importCatima">Імпорт з Catima</string>
|
||||
<string name="accept">Прийняти</string>
|
||||
<string name="privacy_policy">Політика конфіденційності</string>
|
||||
<string name="app_loyalty_card_keychain">Loyalty Card Keychain</string>
|
||||
<string name="app_loyalty_card_keychain">Брелок картки лояльності</string>
|
||||
<string name="chooseImportType">Імпортувати дані з\?</string>
|
||||
<string name="parsingBalanceFailed"><xliff:g>%s</xliff:g> здається, не є дійсним залишком.</string>
|
||||
<string name="points">Бали</string>
|
||||
@@ -160,8 +160,8 @@
|
||||
<string name="photos">Фотографії</string>
|
||||
<string name="backImageDescription">Тильна сторона карти</string>
|
||||
<string name="frontImageDescription">Лицьова сторона карти</string>
|
||||
<string name="importStocardMessage">Оберіть Stocard експорт-файл, названий <i>***-sync.zip</i> для імпортування і оберіть типи штрих-кодів вручну пізніше.
|
||||
\nЧи отримайте його надіславши електронного листа із запитом на експортування ваших даних до support@stocardapp.com.</string>
|
||||
<string name="importStocardMessage">Виберіть експорт <i> ***-sync.zip </i> зі Stocard для імпорту.
|
||||
\nАбо отримайте його, надіславши електронною поштою support@stocardapp.com з проханням експортувати ваші дані.</string>
|
||||
<string name="importStocard">Імпорт із Stocard</string>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="one">Обрано: <xliff:g>%d</xliff:g> карта</item>
|
||||
@@ -169,6 +169,18 @@
|
||||
<item quantity="many">Обрано: <xliff:g>%d</xliff:g> карт</item>
|
||||
<item quantity="other">Обрано: <xliff:g>%d</xliff:g> карт</item>
|
||||
</plurals>
|
||||
<string name="deleteTitle">Видалити карту</string>
|
||||
<string name="deleteTitle">Видалити картку</string>
|
||||
<string name="deleteConfirmation">Бажаєте видалити карту\?</string>
|
||||
</resources>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="one">Видалити <xliff:g>%d</xliff:g> картку</item>
|
||||
<item quantity="few">Видалити <xliff:g>%d</xliff:g> картки</item>
|
||||
<item quantity="many">Видалити <xliff:g>%d</xliff:g> картки</item>
|
||||
<item quantity="other">Видалити <xliff:g>%d</xliff:g> картки</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="one">Видаліть цю <xliff:g>%d</xliff:g> карту назавжди\?</item>
|
||||
<item quantity="few">Видаліть ці <xliff:g>%d</xliff:g> карти назавжди\?</item>
|
||||
<item quantity="many">Видаліть ці <xliff:g>%d</xliff:g> карти назавжди\?</item>
|
||||
<item quantity="other">Видаліть ці <xliff:g>%d</xliff:g> карти назавжди\?</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
@@ -24,16 +24,16 @@
|
||||
<string name="setBarcodeId">设置条形码值</string>
|
||||
<string name="sameAsCardId">与卡号相同</string>
|
||||
<string name="barcodeId">条形码值</string>
|
||||
<string name="importVoucherVaultMessage">找到一个可能名为<i>vouchervault.json</i>的文件进行导入。
|
||||
<string name="importVoucherVaultMessage">选择从Voucher Vault导出的文件:<i>vouchervault.json</i>进行导入。
|
||||
\n或者先在Voucher Vault中按下导出键来创建导出。</string>
|
||||
<string name="importVoucherVault">从 Voucher Vault 导入</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">找到一个很可能名为<i>LoyaltyCardKeychain.csv</i>的文件来导入。
|
||||
<string name="importLoyaltyCardKeychainMessage">选择从Loyalty Card Keychain导出的文件:<i>LoyaltyCardKeychain.csv</i>来导入。
|
||||
\n或者先从Loyalty Card Keychain的Import/Export菜单中选择Export来导出。</string>
|
||||
<string name="importLoyaltyCardKeychain">从 Loyalty Card Keychain 导入</string>
|
||||
<string name="importFidmeMessage">找到一个可能名为<i>fidme-export-request-xxxxxx.zip</i>的文件进行导入,之后再手动选择条码类型。
|
||||
<string name="importFidmeMessage">选择从Fidme导出的文件:<i>fidme-export-request-xxxxxx.zip</i>进行导入,之后再手动选择条码类型。
|
||||
\n或者从你的FidMe配置文件中选择数据保护,然后按提取我的数据来创建导出。</string>
|
||||
<string name="importFidme">从 FidMe 导入</string>
|
||||
<string name="importCatimaMessage">找到一个可能名为<i>Catima.csv</i>的文件来导入。
|
||||
<string name="importCatimaMessage">选择从Catima导出的文件:<i>Catima.zip</i>来导入。
|
||||
\n或者先从另一个Catima应用程序的导入/导出菜单中,来创建导出。</string>
|
||||
<string name="importCatima">从 Catima 导入</string>
|
||||
<string name="accept">接受</string>
|
||||
@@ -143,4 +143,32 @@
|
||||
<string name="action_search">搜索</string>
|
||||
<string name="deleteConfirmation">删除此卡?</string>
|
||||
<string name="deleteTitle">移除卡片</string>
|
||||
<string name="starImage">最喜欢的星星</string>
|
||||
<string name="importStocardMessage">选择你从Stocard导出的<i>****-sync.zip</i>来导入。
|
||||
\n或者发电子邮件给support@stocardapp.com,要求导出你的数据,从而获得此文件。</string>
|
||||
<plurals name="deleteCardsConfirmation">
|
||||
<item quantity="other">确定永久删除 <xliff:g>%d</xliff:g> 这些卡片?</item>
|
||||
</plurals>
|
||||
<plurals name="selectedCardCount">
|
||||
<item quantity="other">已选择 <xliff:g>%d</xliff:g> 张卡片</item>
|
||||
</plurals>
|
||||
<plurals name="deleteCardsTitle">
|
||||
<item quantity="other">删除 <xliff:g>%d</xliff:g> 张卡片</item>
|
||||
</plurals>
|
||||
<string name="turn_flashlight_off">关上手电筒</string>
|
||||
<string name="turn_flashlight_on">开启手电筒</string>
|
||||
<string name="failedGeneratingShareURL">无法生成可分享的URL。请向开发者报告。</string>
|
||||
<string name="passwordRequired">请输入密码</string>
|
||||
<string name="no">否</string>
|
||||
<string name="yes">是</string>
|
||||
<string name="updateBarcodeQuestionText">您改变了卡片的ID。是否需要同时更新条形码,以使用相同的值?</string>
|
||||
<string name="updateBarcodeQuestionTitle">是否要更新条形码的值?</string>
|
||||
<string name="takePhoto">拍照</string>
|
||||
<string name="removeImage">移除图像</string>
|
||||
<string name="setBackImage">设置背面图像</string>
|
||||
<string name="setFrontImage">设置正面图像</string>
|
||||
<string name="photos">照片</string>
|
||||
<string name="backImageDescription">卡片的背面图像</string>
|
||||
<string name="frontImageDescription">卡片的正面图像</string>
|
||||
<string name="importStocard">从Stocard导入</string>
|
||||
</resources>
|
||||
@@ -188,7 +188,7 @@
|
||||
<string name="importLoyaltyCardKeychain">Import from Loyalty Card Keychain</string>
|
||||
<string name="importLoyaltyCardKeychainMessage">Select your <i>LoyaltyCardKeychain.csv</i> export from Loyalty Card Keychain to import.\nOr create it from the "Import/Export" menu in Loyalty Card Keychain by pressing "Export" there first.</string>
|
||||
<string name="importStocard">Import from Stocard</string>
|
||||
<string name="importStocardMessage">Select your <i>***-sync.zip</i> export from Stocard to import, and select the barcode types manually afterwards.\nOr get it by e-mailing support@stocardapp.com asking for an export of your data.</string>
|
||||
<string name="importStocardMessage">Select your <i>***-sync.zip</i> export from Stocard to import.\nOr get it by e-mailing support@stocardapp.com asking for an export of your data.</string>
|
||||
<string name="importVoucherVault">Import from Voucher Vault</string>
|
||||
<string name="importVoucherVaultMessage">Select your <i>vouchervault.json</i> export from Voucher Vault to import.\nOr create it by pressing "Export" in Voucher Vault first.</string>
|
||||
<string name="barcodeId">Barcode value</string>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
@@ -17,6 +16,10 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="@style/AppTheme">
|
||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar"/>
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light"/>
|
||||
|
||||
@@ -980,7 +980,9 @@ public class ImportExportTest
|
||||
"1,Card 1,Note 1,1618053234,100,USD,1234,5432,1,QR_CODE,0,\r\n" +
|
||||
"8,Clothes Store,Note about store,,0,,a,,-5317,,0,\n" +
|
||||
"2,Department Store,,1618041729,0,,A,,-9977996,,0,\n" +
|
||||
"3,Grocery Store,,,150,,dhd,,-9977996,,0,\n" +
|
||||
"3,Grocery Store,\"Multiline note about grocery store\n" +
|
||||
"\n" +
|
||||
"with blank line\",,150,,dhd,,-9977996,,0,\n" +
|
||||
"4,Pharmacy,,,0,,dhshsvshs,,-10902850,,1,\n" +
|
||||
"5,Restaurant,Note about restaurant here,,0,,98765432,23456,-10902850,CODE_128,0,\n" +
|
||||
"6,Shoe Store,,,12.50,EUR,a,-5317,,AZTEC,0,\n" +
|
||||
@@ -1065,7 +1067,7 @@ public class ImportExportTest
|
||||
LoyaltyCard card3 = db.getLoyaltyCard(3);
|
||||
|
||||
assertEquals("Grocery Store", card3.store);
|
||||
assertEquals("", card3.note);
|
||||
assertEquals("Multiline note about grocery store\n\nwith blank line", card3.note);
|
||||
assertEquals(null, card3.expiry);
|
||||
assertEquals(new BigDecimal("150"), card3.balance);
|
||||
assertEquals(null, card3.balanceType);
|
||||
@@ -1197,7 +1199,7 @@ public class ImportExportTest
|
||||
assertEquals(null, card.balanceType);
|
||||
assertEquals("55555", card.cardId);
|
||||
assertEquals(null, card.barcodeId);
|
||||
assertEquals(null, card.barcodeType);
|
||||
assertEquals(BarcodeFormat.EAN_13, card.barcodeType);
|
||||
assertEquals(0, card.starStatus);
|
||||
|
||||
assertNull(Utils.retrieveCardImage(activity.getApplicationContext(), 1, true));
|
||||
@@ -1212,7 +1214,7 @@ public class ImportExportTest
|
||||
assertEquals(null, card.balanceType);
|
||||
assertEquals("7649484", card.cardId);
|
||||
assertEquals(null, card.barcodeId);
|
||||
assertEquals(null, card.barcodeType);
|
||||
assertEquals(BarcodeFormat.EAN_13, card.barcodeType);
|
||||
assertEquals(0, card.starStatus);
|
||||
|
||||
assertTrue(BitmapFactory.decodeStream(getClass().getResourceAsStream("stocard-front.jpg")).sameAs(Utils.retrieveCardImage(activity.getApplicationContext(), 2, true)));
|
||||
@@ -1220,7 +1222,8 @@ public class ImportExportTest
|
||||
|
||||
card = db.getLoyaltyCard(3);
|
||||
|
||||
assertEquals("jö", card.store);
|
||||
// I don't think we can know this one, but falling back to an unique store name is at least something
|
||||
assertEquals("63536738-d64b-48ae-aeb8-82761523fa67", card.store);
|
||||
assertEquals("", card.note);
|
||||
assertEquals(null, card.expiry);
|
||||
assertEquals(new BigDecimal("0"), card.balance);
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.Currency;
|
||||
import java.util.Date;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import protect.card_locker.preferences.Settings;
|
||||
|
||||
@@ -61,8 +63,8 @@ public class LoyaltyCardCursorAdapterTest
|
||||
{
|
||||
LoyaltyCardCursorAdapter adapter = new LoyaltyCardCursorAdapter(activity.getApplicationContext(), cursor, (MainActivity) activity);
|
||||
|
||||
RecyclerView.ViewHolder viewHolder = adapter.createViewHolder(activity.findViewById(R.id.list), 0);
|
||||
adapter.bindViewHolder((LoyaltyCardCursorAdapter.LoyaltyCardListItemViewHolder) viewHolder, cursor.getPosition());
|
||||
LoyaltyCardCursorAdapter.LoyaltyCardListItemViewHolder viewHolder = adapter.createViewHolder(activity.findViewById(R.id.list), 0);
|
||||
adapter.bindViewHolder(viewHolder, cursor.getPosition());
|
||||
|
||||
return viewHolder.itemView;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ public class LoyaltyCardViewActivityTest
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noDataLossOnResume()
|
||||
public void noDataLossOnResumeOrRotate()
|
||||
{
|
||||
registerMediaStoreIntentHandler();
|
||||
|
||||
@@ -421,6 +421,22 @@ public class LoyaltyCardViewActivityTest
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
|
||||
// Rotate to landscape
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
activity.recreate();
|
||||
shadowOf(getMainLooper()).idle();
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
|
||||
// Rotate to portrait
|
||||
shadowOf(getMainLooper()).idle();
|
||||
activity.recreate();
|
||||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
|
||||
// Check if no changes lost
|
||||
checkAllFields(activity, newCard ? ViewMode.ADD_CARD : ViewMode.UPDATE_CARD, "correct store", "correct note", DateFormat.getDateInstance(DateFormat.LONG).format(expiryDate), "100.00", currency.getSymbol(), "12345678", "87654321", BarcodeFormat.QR_CODE.name(), frontBitmap, backBitmap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1157,7 +1173,6 @@ public class LoyaltyCardViewActivityTest
|
||||
|
||||
TextViewCompat.getAutoSizeMaxTextSize(storeName);
|
||||
TextViewCompat.getAutoSizeMaxTextSize(storeName);
|
||||
assertEquals(LARGE_FONT_SIZE, (int)storeName.getTextSize());
|
||||
assertEquals(LARGE_FONT_SIZE, TextViewCompat.getAutoSizeMaxTextSize(cardIdFieldView));
|
||||
|
||||
shadowOf(activity).clickMenuItem(android.R.id.home);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
@@ -20,6 +20,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
23
fastlane/metadata/android/bg/full_description.txt
Normal file
23
fastlane/metadata/android/bg/full_description.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
Спрете да търсите пластмасови карти за възнаграждение по време на плащане в магазин или в интернет магазин.
|
||||
<b>Сканирайте баркодовете на устройството си с помощта на неговата камера и забравете за картите.</b>
|
||||
😺
|
||||
Забравете за портфейла си или го запазете ултралек за ценни вещи.
|
||||
😺
|
||||
С този основен инструмент за ежедневно носене (EDC) можете да замените безполезната пластмаса с пари в брой.
|
||||
😺
|
||||
- Избягвайте шпионирането с много малко разрешения. Без достъп до интернет и без реклами.
|
||||
- Добавете карти или кодове с имена и цветове, които можете да персонализирате.
|
||||
- Ръчно въвеждане на код, ако няма баркод за съхранение или той не може да се използва.
|
||||
- Импортиране на карти и кодове от файлове, Catima, FidMe, Loyalty Card Keychain, Stocard и Voucher Vault.
|
||||
- Направете резервно копие на всичките си карти и ги прехвърлете на ново устройство, ако искате.
|
||||
- Споделяйте купони, ексклузивни оферти, промоционални кодове или карти и кодове, като използвате всяко приложение.
|
||||
- Тъмна тема и опции за достъпност за потребители с увредено зрение.
|
||||
- Направено за всички от общността на свободния софтуер.
|
||||
- Локализирани ръчно направени преводи за над 20 езика.
|
||||
- Безвъзмездно, подкрепено от приноса на общността.
|
||||
- Използвайте, изучавайте, променяйте и споделяйте, както желаете; <i>с всички</i>.
|
||||
- Не само свободен софтуер / отворен код. <i>Copylefted</i> либре софтуер (GPLv3+) за управление на карти.
|
||||
😺
|
||||
Опростете живота и пазаруването си и никога повече не губете хартиена касова бележка, карта за подарък за плащане в магазина или самолетен билет.
|
||||
Вземете всичките си награди и бонуси със себе си и спестявайте, докато пътувате.
|
||||
😺
|
||||
1
fastlane/metadata/android/bg/short_description.txt
Normal file
1
fastlane/metadata/android/bg/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
За вашите баркодове, членства, програми за лоялност, талони и билети.
|
||||
1
fastlane/metadata/android/bg/title.txt
Normal file
1
fastlane/metadata/android/bg/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - Портфейлът за карти Libre
|
||||
1
fastlane/metadata/android/cs_CZ/short_description.txt
Normal file
1
fastlane/metadata/android/cs_CZ/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Pro čárové kódy, členství, věrnostní programy, kupony a vstupenky.
|
||||
1
fastlane/metadata/android/cs_CZ/title.txt
Normal file
1
fastlane/metadata/android/cs_CZ/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - Peněženka Libre Card
|
||||
1
fastlane/metadata/android/da-DK/short_description.txt
Normal file
1
fastlane/metadata/android/da-DK/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Til dine stregkoder, medlemskaber, loyalitetsprogrammer, kuponer og billetter.
|
||||
1
fastlane/metadata/android/da-DK/title.txt
Normal file
1
fastlane/metadata/android/da-DK/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - Den frie kortpung
|
||||
@@ -1,23 +1,23 @@
|
||||
Lopeta muovisten etukorttien etsiminen kaupan tai verkkokaupan kassalla.
|
||||
Lopeta muovisten palkintokorttien etsiminen kaupan tai verkkokaupan kassalla.
|
||||
<b>Skannaa viivakoodit laitteeseesi sen kameran avulla, unohda kortit.</b>
|
||||
😺
|
||||
Unohda lompakko tai pidä se ultrakevyenä sinulle arvokkaita asioita varten.
|
||||
Unohda lompakko tai pidä se ultrakevyesti arvoesineitä varten.
|
||||
😺
|
||||
Tämän jokapäiväisen (EDC) työkalun avulla, voit korvata turhan muovin käteisellä.
|
||||
Tämän välttämättömän jokapäiväisen kantamisen (EDC) välineen avulla voit korvata turhan muovin käteisellä.
|
||||
😺
|
||||
- Vältä vakoilua hyvin vähäisillä käyttöoikeuksilla. Ei Internet-yhteyttä eikä mainoksia.
|
||||
- Lisää kortteja tai koodeja nimettynä ja muokattavilla väreillä.
|
||||
- Koodin syöttäminen manuaalisesti, jos tallennettavaa viivakoodia ei ole tai sitä ei voida käyttää.
|
||||
- Tuo kortteja ja koodeja varmuuskopiotiedostoista, Catima, Loyalty Card Keychain, Voucher Vault, ja FidMe.
|
||||
- Vältä vakoilu hyvin vähillä luvilla. Ei Internet-yhteyttä eikä mainoksia.
|
||||
- Lisää kortteja tai koodeja nimillä ja muokattavilla väreillä.
|
||||
- Koodin syöttäminen manuaalisesti, jos viivakoodia ei voi tallentaa tai sitä ei voi käyttää.
|
||||
- Tuo kortteja ja koodeja tiedostoista, Catimasta, FidMe:stä, kanta-asiakaskorttiavaimenperästä, Stocardista ja Voucher Holvista.
|
||||
- Tee varmuuskopio kaikista korteistasi ja siirrä ne halutessasi uuteen laitteeseen.
|
||||
- Jaa kuponkeja, erikoistarjouksia, tarjouskoodeja tai kortteja ja koodeja millä tahansa sovelluksella.
|
||||
- Tumma teema ja esteettömän käytön mahdollisuus näkövammaisille käyttäjille.
|
||||
- Vapaan ohjelmistoyhteisön kaikkia varten tekemä.
|
||||
- Jaa kuponkeja, yksinoikeustarjouksia, tarjouskoodeja tai kortteja ja koodeja millä tahansa sovelluksella.
|
||||
- Tumma teema ja saavutettavuusvaihtoehdot näkövammaisille käyttäjille.
|
||||
- Libre-ohjelmistoyhteisön kaikille tekemä.
|
||||
- Lokalisoidut käsintehdyt käännökset yli 20 kielelle.
|
||||
- Vapaa, yhteisön tukema.
|
||||
- Käytä, opiskele, muuta ja jaa sitä toiveidesi mukaan; <i>kaikille</i>.
|
||||
- Ei vain vapaa ohjelma / Avoin lähdekoodi. <i>Copyleft</i> vapaa ohjelma (GPLv3+) korttien hallinta.
|
||||
- Gratis, yhteisön panoksilla tuettu.
|
||||
- Käytä, tutki, muuta ja jaa sitä haluamallasi tavalla; <i>kaikkien</i> kanssa.
|
||||
- Ei vain vapaat ohjelmistot / avoin lähdekoodi. <i>Copylefted</i> libre-ohjelmisto (GPLv3+) kortinhallinta.
|
||||
😺
|
||||
Yksinkertaista elämääsi ja ostosten tekemistä, äläkä enää koskaan hukkaa paperikuittia, kaupassa maksettavaa lahjakorttia tai lentolippua.
|
||||
Ota kaikki edut ja bonukset mukaasi ja säästä missä menetkin.
|
||||
Yksinkertaista elämääsi ja shoppailuasi, äläkä enää koskaan hukkaa paperikuittia, kaupassa maksettavaa lahjakorttia tai lentolippua.
|
||||
Ota kaikki palkintosi ja bonuksesi mukaasi ja säästä matkan aikana.
|
||||
😺
|
||||
|
||||
@@ -8,7 +8,7 @@ Med dette essensielle verktøyet kan du erstatte unyttig plast med kontanter.
|
||||
- Unngå spionasje med veldig få tilganger. Ingen tilgang til Internett, og ingen reklame.
|
||||
- Legg til kort eller koder med navn og egne farger.
|
||||
- Manuell kodeinnskriving hvis det ikke er noen strekkode å lagre, eller den ikke kan brukes.
|
||||
- Importer kort og koder fra filer, Catima, Loyalty Card Keychain, Voucher Vault, og FidMe.
|
||||
- Importer kort og koder fra filer ,Catima, FidMe, Kundekortknippe, Stocard og Voucher Vault.
|
||||
- Lag en sikkerhetskopi av alle kortene dine og overfør dem til en ny enhet hvis du ønsker det.
|
||||
- Del kupponger, eksklusive tilbud, promokoder eller kort og koder ved bruk av ethvert program.
|
||||
- Mørk drakt og tilgjengelighetsvalg for synshemmede brukere.
|
||||
|
||||
1
fastlane/metadata/android/sv-SE/short_description.txt
Normal file
1
fastlane/metadata/android/sv-SE/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
För dina streckkoder, medlemskap, kundklubbar, kuponger och biljetter.
|
||||
1
fastlane/metadata/android/sv-SE/title.txt
Normal file
1
fastlane/metadata/android/sv-SE/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima — Den fria kortplånboken
|
||||
23
fastlane/metadata/android/zh-CN/full_description.txt
Normal file
23
fastlane/metadata/android/zh-CN/full_description.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
在实体店或网店结账时,再也不用翻找塑料积分卡了。
|
||||
<b>用摄像头扫描条形码存储到您的设备,就不需要卡片了。</b>
|
||||
😺
|
||||
抛开钱包,或者只携带贵重物品给钱包减负。
|
||||
😺
|
||||
有了这个必不可少的日常携带(EDC)工具,你可以用现金取代无用的塑料。
|
||||
😺
|
||||
- 要求权限极少,避免隐私泄露。无需互联网接入,没有广告。
|
||||
- 添加卡片或号码,并为其设置名称和颜色。
|
||||
- 如果没有条码可存储,或条码无法使用,可手动输入号码。
|
||||
- 可以从本地文件、Catima、FidMe、Loyalty Card Keychain、Stocard和Voucher Vault导入卡片和号码。
|
||||
- 对所有的卡进行备份。可以把备份转移到新设备上。
|
||||
- 把优惠券、促销码、卡片和号码等等分享到任何应用程序。
|
||||
- 为视力受损的用户提供暗色主题和无障碍选项。
|
||||
- 自由软件社区为大家制作。
|
||||
- 提供20多种语言的本地化人工翻译。
|
||||
- 免费的,由社区贡献支持。
|
||||
- 欢迎<i>与所有人</i>随意使用、研究、改变和分享本软件。
|
||||
- 不仅是自由软件/开放源码。<i>Copylefted</i>自由软件(GPLv3+)卡片管理。
|
||||
😺
|
||||
简化你的生活和购物,再也不会丢失纸质收据、店内支付礼品卡或飞机票。
|
||||
带上你所有的优惠和积分卡,随时随地省钱。
|
||||
😺
|
||||
1
fastlane/metadata/android/zh-CN/short_description.txt
Normal file
1
fastlane/metadata/android/zh-CN/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
适用于您的条形码、会员卡、积分卡、优惠券和门票等。
|
||||
1
fastlane/metadata/android/zh-CN/title.txt
Normal file
1
fastlane/metadata/android/zh-CN/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
Catima - 自由卡片钱包
|
||||
Reference in New Issue
Block a user