Skip to content

Commit

Permalink
Remove copy card IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed Oct 15, 2023
1 parent 3bcccba commit 85fa0af
Show file tree
Hide file tree
Showing 46 changed files with 1 addition and 195 deletions.
32 changes: 1 addition & 31 deletions app/src/main/java/protect/card_locker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import android.app.Activity;
import android.app.SearchManager;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
Expand Down Expand Up @@ -90,35 +88,7 @@ public boolean onPrepareActionMode(ActionMode inputMode, Menu inputMenu) {

@Override
public boolean onActionItemClicked(ActionMode inputMode, MenuItem inputItem) {
if (inputItem.getItemId() == R.id.action_copy_to_clipboard) {
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);

String clipboardData;
int cardCount = mAdapter.getSelectedItemCount();

if (cardCount == 1) {
clipboardData = mAdapter.getSelectedItems().get(0).cardId;
} else {
StringBuilder cardIds = new StringBuilder();

for (int i = 0; i < cardCount; i++) {
LoyaltyCard loyaltyCard = mAdapter.getSelectedItems().get(i);

cardIds.append(loyaltyCard.store + ": " + loyaltyCard.cardId);
if (i < (cardCount - 1)) {
cardIds.append("\n");
}
}

clipboardData = cardIds.toString();
}

ClipData clip = ClipData.newPlainText(getString(R.string.card_ids_copied), clipboardData);
clipboard.setPrimaryClip(clip);
Toast.makeText(MainActivity.this, cardCount > 1 ? R.string.copy_to_clipboard_multiple_toast : R.string.copy_to_clipboard_toast, Toast.LENGTH_LONG).show();
inputMode.finish();
return true;
} else if (inputItem.getItemId() == R.id.action_share) {
if (inputItem.getItemId() == R.id.action_share) {
final ImportURIHelper importURIHelper = new ImportURIHelper(MainActivity.this);
try {
importURIHelper.startShareIntent(mAdapter.getSelectedItems());
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/res/drawable/ic_copy.xml

This file was deleted.

7 changes: 0 additions & 7 deletions app/src/main/res/menu/card_longclick_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
android:titleCondensed="@string/editCardTitle"
app:showAsAction="ifRoom"/>

<item
android:id="@+id/action_copy_to_clipboard"
android:icon="@drawable/ic_copy"
android:title="@string/copy_to_clipboard"
android:titleCondensed="@string/copy_to_clipboard"
app:showAsAction="ifRoom"/>

<item
android:id="@+id/action_share"
android:icon="@drawable/ic_share"
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
<string name="confirm">تأكيد</string>
<string name="deleteConfirmation">مسح هذة البطاقة نهائيا؟</string>
<string name="ok">حسنا</string>
<string name="copy_to_clipboard">نسخ البطاقة الشخصية الى الحافظة</string>
<string name="share">شارك</string>
<string name="sendLabel">ارسل…</string>
<string name="editCardTitle">عدل البطاقة</string>
<string name="addCardTitle">اضف بطاقة</string>
<string name="scanCardBarcode">مسح باركود</string>
<string name="cardShortcut">اختصار البطاقة</string>
<string name="noCardsMessage">اضف بطاقة أولا</string>
<string name="card_ids_copied">البطاقة(ات) الشخصية المنسوخة</string>
<string name="barcodeImageDescriptionWithType">صورة <xliff:g>%s</xliff:g> باركود</string>
<string name="noCardExistsError">لا يمكن العثور على هذه البطاقة</string>
<string name="failedParsingImportUriError">لا يمكن تحليل الرابط المستورد</string>
Expand All @@ -47,7 +45,6 @@
<string name="app_license">البرمجيات الحرة متروكة الحقوق, ترخيص +GPLv3</string>
<string name="app_libraries">مكتبات الطرف الثالث الحرة: <xliff:g id="app_libraries_list">%s</xliff:g></string>
<string name="selectBarcodeTitle">اختار الباركود</string>
<string name="copy_to_clipboard_toast">تم نسخ بطاقة الهوية إلى الحافظة</string>
<string name="thumbnailDescription">صورة مصغرة</string>
<string name="starImage">نجم مفضل</string>
<string name="settings">اعدادات</string>
Expand Down Expand Up @@ -95,7 +92,6 @@
<string name="setBarcodeId">قم بتعيين قيمة الباركود</string>
<string name="unsupportedBarcodeType">لا يمكن عرض نوع الباركود هذا. قد يكون مدعومًا في إصدار أحدث من التطبيق.</string>
<string name="wrongValueForBarcodeType">القيمة غير صالحة لنوع الباركود المحدد</string>
<string name="copy_to_clipboard_multiple_toast">تم نسخ بطاقات الهوية إلى الحافظة</string>
<string name="intent_import_card_from_url_share_multiple_text">أريد مشاركة بعض البطاقات معك</string>
<string name="frontImageDescription">الصورة الأمامية</string>
<string name="backImageDescription">الصورة الخلفية</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<string name="addCardTitle">Добавяне на карта</string>
<string name="removeImage">Премахване на изображение</string>
<string name="takePhoto">Снимане</string>
<string name="copy_to_clipboard_multiple_toast">Номерата са копирани</string>
<string name="intent_import_card_from_url_share_multiple_text">Искам да споделя тези карти с вас</string>
<string name="wrongValueForBarcodeType">Стойноста е неприемлива за избрания щрихкод</string>
<string name="setBarcodeId">Задаване на стойност</string>
Expand Down Expand Up @@ -89,7 +88,6 @@
<string name="settings">Настройки</string>
<string name="starImage">Звезда за любимо</string>
<string name="thumbnailDescription">Миниатюра</string>
<string name="copy_to_clipboard_toast">Номерът е копиран</string>
<string name="selectBarcodeTitle">Избиране на щрихкод</string>
<string name="importOptionApplicationButton">Избиране чрез приложение</string>
<string name="importing">Внасяне…</string>
Expand All @@ -107,7 +105,6 @@
<string name="scanCardBarcode">Снемане на щрихкод</string>
<string name="editCardTitle">Редактиране на карта</string>
<string name="share">Споделя</string>
<string name="copy_to_clipboard">Копира номера</string>
<string name="ok">Добре</string>
<string name="importSuccessful">Данните са внесени</string>
<string name="chooseImportType">Внасяне на данни на</string>
Expand Down Expand Up @@ -204,7 +201,6 @@
<string name="starred">Със звезда</string>
<string name="showMoreInfo">Показване на информация</string>
<string name="options">Настройки</string>
<string name="card_ids_copied">Номерата са копирани</string>
<plurals name="balancePoints">
<item quantity="one"><xliff:g>%s</xliff:g> точка</item>
<item quantity="other"><xliff:g>%s</xliff:g> точки</item>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-bn-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<string name="setBarcodeId">বারকোড আইডি সেট করুন</string>
<string name="unsupportedBarcodeType">এই বারকোডের টাইপটি এখন দেখানো যাচ্ছে না। অ্যাপের পরের সংস্করণে হয়ত এটি সমর্থন করা যেতে পারে।</string>
<string name="wrongValueForBarcodeType">বারকোড টাইপের জন্য ভুল মান</string>
<string name="copy_to_clipboard_multiple_toast">আইডিগুলি ক্লিপবোর্ডে কপি হল</string>
<string name="intent_import_card_from_url_share_multiple_text">url থেকে ইন্টেন্ট ইম্পোর্ট কার্ড একাধিক টেক্সট শেয়ার করে</string>
<string name="frontImageDescription">সামনের চিত্র</string>
<string name="backImageDescription">পিছনের চিত্র</string>
Expand Down Expand Up @@ -68,13 +67,11 @@
<string name="reverse">...উল্টো ক্রমে</string>
<string name="sort_by">ক্রমানুসার</string>
<string name="noCardExistsError">কার্ডটি খুঁজে পাওয়া গেল না</string>
<string name="card_ids_copied">আইডি কপি করা হয়েছে</string>
<string name="noCardsMessage">কোন কার্ড বার্তা নেই</string>
<string name="addCardTitle">কার্ডের শিরোনাম যোগ করুন</string>
<string name="editCardTitle">কার্ডের শিরোনাম সম্পাদনা করুন</string>
<string name="sendLabel">পাঠান…</string>
<string name="share">ভাগ</string>
<string name="copy_to_clipboard">নকল করুন ক্লিপবোর্ড এ</string>
<string name="deleteConfirmation">এই কার্ডটি চিরকালের জন্য মুছে দেবো\?</string>
<string name="confirm">নিশ্চিত করুন</string>
<string name="delete">মুছে ফেলুন</string>
Expand Down Expand Up @@ -125,7 +122,6 @@
<string name="importExport">আমদানি/রপ্তানি</string>
<string name="cardShortcut">কার্ড শর্টকাট</string>
<string name="exportFailed">রপ্তানি করা যাচ্ছে না</string>
<string name="copy_to_clipboard_toast">আইডি ক্লিপবোর্ডে নকল করা হল</string>
<string name="importExportHelp">নিজের ডেটা অন্য কোথাও সংরক্ষণ করে রাখলে পরে সেটা অন্য ডিভাইসে সরিয়ে নিতে পারবেন।</string>
<string name="importFailed">আমদানি করা গেল না</string>
<string name="noGiftCardsGroup">কিছু কার্ড বানান আর এই গ্রুপে স্থির করুন।</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<item quantity="one">এই <xliff:g>%d</xliff:g> কার্ডটি স্থায়ীভাবে মুছবেন\?</item>
<item quantity="other">এই <xliff:g>%d</xliff:g> কার্ডগুলিকে স্থায়ীভাবে মুছবেন\?</item>
</plurals>
<string name="copy_to_clipboard">ক্লিপবোর্ডে আইডি কপি করুন</string>
<string name="share">শেয়ার করুন</string>
<string name="editCardTitle">কার্ড সম্পাদনা করুন</string>
<string name="addCardTitle">কার্ড যোগ করুন</string>
Expand All @@ -53,5 +52,4 @@
<string name="noGiftCards">একটি কার্ড যোগ করতে + প্লাস বোতামে ক্লিক করুন বা ⋮ মেনু থেকে আমদানি করুন।</string>
<string name="cardShortcut">কার্ড শর্টকাট</string>
<string name="noCardsMessage">প্রথমে একটি কার্ড যোগ করুন</string>
<string name="card_ids_copied">আইডি কপি করা হয়েছে</string>
</resources>
3 changes: 0 additions & 3 deletions app/src/main/res/values-bs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<string name="setBarcodeId">Postavi vrijednost za bar kod</string>
<string name="unsupportedBarcodeType">Ovaj bar kod još nije prikazan. Ona može biti podržana u kasnijoj verziji app.</string>
<string name="wrongValueForBarcodeType">Izabrana vrijednost nije izvršna</string>
<string name="copy_to_clipboard_multiple_toast">IDs kartica kopiran u clipboard</string>
<string name="intent_import_card_from_url_share_multiple_text">Želim podijeliti karte s tobom</string>
<string name="frontImageDescription">Slika kartice</string>
<string name="backImageDescription">Slika pozadine kartice</string>
Expand Down Expand Up @@ -68,13 +67,11 @@
<string name="reverse">Rikverc</string>
<string name="sort_by">Sortiraj</string>
<string name="noCardExistsError">Nisam mogao pronaći tu karticu</string>
<string name="card_ids_copied">Kopiran ID/ovi</string>
<string name="noCardsMessage">Dodaj prvo kartu</string>
<string name="addCardTitle">Dodaj Kartu</string>
<string name="editCardTitle">Izmijeni Karticu</string>
<string name="sendLabel">Pošalji…</string>
<string name="share">Podijeli</string>
<string name="copy_to_clipboard">Kopiraj ID u clipboard</string>
<string name="deleteConfirmation">Izbriši trajno ovu karticu\?</string>
<string name="confirm">Potvrdi</string>
<string name="delete">Obriši</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<string name="delete">Smazat</string>
<string name="confirm">Potvrdit</string>
<string name="ok">OK</string>
<string name="copy_to_clipboard">Kopírovat ID do schránky</string>
<string name="sendLabel">Odeslat…</string>
<string name="editCardTitle">Editovat kartu</string>
<string name="addCardTitle">Přidat kartu</string>
Expand All @@ -38,7 +37,6 @@
<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="selectBarcodeTitle">Vyberte čárový kód</string>
<string name="copy_to_clipboard_toast">ID zkopírováno do schránky</string>
<string name="deleteTitle">Smazat kartu</string>
<string name="deleteConfirmation">Opravdu chcete smazat tuto kartu\?</string>
<string name="moveBarcodeToTopOfScreen">Přesunout čárový kód do horní části obrazovky</string>
Expand All @@ -63,7 +61,6 @@
<string name="noMatchingGiftCards">Nic nenalezeno. Zkuste zadat jiný výraz.</string>
<string name="action_search">Hledat</string>
<string name="thumbnailDescription">Miniatura</string>
<string name="card_ids_copied">ID zkopírováno</string>
<plurals name="deleteCardsConfirmation">
<item quantity="one">Opravdu chcete trvale odstranit <xliff:g>%d</xliff:g> kartu\?</item>
<item quantity="few">Opravdu chcete trvale odstranit <xliff:g>%d</xliff:g> karty\?</item>
Expand Down Expand Up @@ -117,7 +114,6 @@
<string name="backImageDescription">Obrázek zadní strany</string>
<string name="frontImageDescription">Obrázek přední strany</string>
<string name="intent_import_card_from_url_share_multiple_text">Chci s vámi sdílet karty</string>
<string name="copy_to_clipboard_multiple_toast">ID zkopírována do schránky</string>
<string name="wrongValueForBarcodeType">Hodnota není platná pro vybraný typ čárového kódu</string>
<string name="unsupportedBarcodeType">Tento typ čárového kódu zatím nelze zobrazit. Možná bude podporován v pozdější verzi aplikace.</string>
<string name="barcodeId">Hodnota čárového kódu</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<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">
Expand Down Expand Up @@ -50,7 +49,6 @@
<string name="settings">Indstillinger</string>
<string name="starImage">Favorit stjerne</string>
<string name="thumbnailDescription">Miniaturebillede til kort</string>
<string name="copy_to_clipboard_toast">Kort-ID kopieret til udklipsholderen</string>
<string name="selectBarcodeTitle">Vælg stregkode</string>
<string name="app_copyright_old">Baseret på Loyalty Card Keychain
\ncopyright © 2016-2020 Branden Archer.</string>
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<string name="star">Zu den Favoriten hinzufügen</string>
<string name="unstar">Aus den Favoriten entfernen</string>
<string name="ok">OK</string>
<string name="copy_to_clipboard">Kartennummer in die Zwischenablage kopieren</string>
<string name="sendLabel">Senden …</string>
<string name="editCardTitle">Karte bearbeiten</string>
<string name="addCardTitle">Neue Karte</string>
Expand Down Expand Up @@ -45,7 +44,6 @@
<string name="about_title_fmt">Über <xliff:g id="app_name">%s</xliff:g></string>
<string name="debug_version_fmt">Version: <xliff:g id="version">%s</xliff:g></string>
<string name="selectBarcodeTitle">Barcode auswählen</string>
<string name="copy_to_clipboard_toast">ID in die Zwischenablage kopiert</string>
<string name="thumbnailDescription">Vorschaubild</string>
<string name="settings">Einstellungen</string>
<string name="settings_display_barcode_max_brightness">Displayhelligkeit in der Barcodeansicht erhöhen</string>
Expand Down Expand Up @@ -125,8 +123,6 @@
<string name="app_resources">Freie Ressourcen von Drittanbietern: <xliff:g id="app_resources_list">%s</xliff:g></string>
<string name="app_libraries">Freie Bibliotheken von Drittanbietern: <xliff:g id="app_libraries_list">%s</xliff:g></string>
<string name="intent_import_card_from_url_share_multiple_text">Ich möchte diese Karten mit dir teilen</string>
<string name="copy_to_clipboard_multiple_toast">Kartennummern in die Zwischenablage kopiert</string>
<string name="card_ids_copied">ID(s) kopiert</string>
<string name="no">Nein</string>
<string name="yes">Ja</string>
<string name="updateBarcodeQuestionText">Kartennummer geändert. Möchtest du auch den Barcode auf den gleichen Wert ändern\?</string>
Expand Down
Loading

0 comments on commit 85fa0af

Please sign in to comment.