Subaddresses as first class citizens (#733)

This commit is contained in:
m2049r 2021-03-22 00:31:01 +01:00 committed by GitHub
parent b01de1ad6e
commit cf4ff856d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 1399 additions and 433 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "com.m2049r.xmrwallet"
minSdkVersion 21
targetSdkVersion 29
versionCode 713
versionName "1.17.13 'Druk'"
versionCode 800
versionName "1.18.0 'ChAdOx1'"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {

View File

@ -31,10 +31,11 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import android.widget.Toast;
import androidx.annotation.CallSuper;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.widget.Toast;
import com.m2049r.xmrwallet.data.BarcodeData;
import com.m2049r.xmrwallet.dialog.ProgressDialog;
@ -46,7 +47,8 @@ import java.io.IOException;
import timber.log.Timber;
public class BaseActivity extends SecureActivity implements GenerateReviewFragment.ProgressListener {
public class BaseActivity extends SecureActivity
implements GenerateReviewFragment.ProgressListener, SubaddressFragment.ProgressListener {
ProgressDialog progressDialog = null;

View File

@ -307,7 +307,6 @@ public class GenerateReviewFragment extends Fragment {
void dismissProgressDialog();
}
public interface AcceptListener {
void onAccept(String name, String password);
}

View File

@ -59,13 +59,13 @@ import com.m2049r.xmrwallet.model.NetworkType;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.WalletService;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.util.DayNightMode;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.KeyStoreHelper;
import com.m2049r.xmrwallet.util.LocaleHelper;
import com.m2049r.xmrwallet.util.MoneroThreadPoolExecutor;
import com.m2049r.xmrwallet.util.NightmodeHelper;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.widget.Toolbar;
import java.io.File;
@ -86,8 +86,7 @@ import timber.log.Timber;
public class LoginActivity extends BaseActivity
implements LoginFragment.Listener, GenerateFragment.Listener,
GenerateReviewFragment.Listener, GenerateReviewFragment.AcceptListener,
ReceiveFragment.Listener, NodeFragment.Listener {
GenerateReviewFragment.Listener, GenerateReviewFragment.AcceptListener, NodeFragment.Listener {
private static final String GENERATE_STACK = "gen";
private static final String NODES_PREFS_NAME = "nodes";
@ -397,28 +396,6 @@ public class LoginActivity extends BaseActivity
.show();
}
@Override
public void onWalletReceive(String walletName) {
Timber.d("receive for wallet .%s.", walletName);
if (checkServiceRunning()) return;
final File walletFile = Helper.getWalletFile(this, walletName);
if (WalletManager.getInstance().walletExists(walletFile)) {
Helper.promptPassword(LoginActivity.this, walletName, false, new Helper.PasswordAction() {
@Override
public void act(String walletName, String password, boolean fingerprintUsed) {
if (checkDevice(walletName, password))
startReceive(walletFile, password);
}
@Override
public void fail(String walletName) {
}
});
} else { // this cannot really happen as we prefilter choices
Toast.makeText(this, getString(R.string.bad_wallet), Toast.LENGTH_SHORT).show();
}
}
private class AsyncRename extends AsyncTask<String, Void, Boolean> {
@Override
protected void onPreExecute() {
@ -797,14 +774,6 @@ public class LoginActivity extends BaseActivity
startReviewFragment(b);
}
void startReceive(File walletFile, String password) {
Timber.d("startReceive()");
Bundle b = new Bundle();
b.putString("path", walletFile.getAbsolutePath());
b.putString("password", password);
startReceiveFragment(b);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[],
@NonNull int[] grantResults) {
@ -863,11 +832,6 @@ public class LoginActivity extends BaseActivity
Timber.d("NodeFragment placed");
}
void startReceiveFragment(Bundle extras) {
replaceFragment(new ReceiveFragment(), null, extras);
Timber.d("ReceiveFragment placed");
}
void replaceFragment(Fragment newFragment, String stackName, Bundle extras) {
if (extras != null) {
newFragment.setArguments(extras);

View File

@ -82,8 +82,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
void onWalletDetails(String wallet);
void onWalletReceive(String wallet);
void onWalletRename(String name);
void onWalletBackup(String name);
@ -223,9 +221,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
case R.id.action_info:
showInfo(listItem.name);
break;
case R.id.action_receive:
showReceive(listItem.name);
break;
case R.id.action_rename:
activityCallback.onWalletRename(listItem.name);
break;
@ -290,10 +285,6 @@ public class LoginFragment extends Fragment implements WalletInfoAdapter.OnInter
activityCallback.onWalletDetails(name);
}
private void showReceive(@NonNull String name) {
activityCallback.onWalletReceive(name);
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

View File

@ -228,24 +228,23 @@ public class NodeFragment extends Fragment
// open up edit dialog
@Override
public void onLongInteraction(final View view, final NodeInfo nodeItem) {
public boolean onLongInteraction(final View view, final NodeInfo nodeItem) {
Timber.d("onLongInteraction");
EditDialog diag = createEditDialog(nodeItem);
if (diag != null) {
diag.show();
}
return true;
}
@Override
public void onClick(View v) {
int id = v.getId();
switch (id) {
case R.id.fab:
if (id == R.id.fab) {
EditDialog diag = createEditDialog(null);
if (diag != null) {
diag.show();
}
break;
}
}

View File

@ -16,7 +16,6 @@
package com.m2049r.xmrwallet;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
@ -24,10 +23,11 @@ import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.nfc.NfcManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.Editable;
import android.text.Html;
import android.text.InputType;
import android.text.Spanned;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@ -47,6 +47,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.ShareActionProvider;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.core.view.MenuItemCompat;
import androidx.fragment.app.Fragment;
@ -61,11 +62,9 @@ import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.m2049r.xmrwallet.data.BarcodeData;
import com.m2049r.xmrwallet.data.Crypto;
import com.m2049r.xmrwallet.ledger.LedgerProgressDialog;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.MoneroThreadPoolExecutor;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.widget.ExchangeView;
import com.m2049r.xmrwallet.widget.Toolbar;
@ -82,7 +81,6 @@ import timber.log.Timber;
public class ReceiveFragment extends Fragment {
private ProgressBar pbProgress;
private TextView tvAddressLabel;
private TextView tvAddress;
private TextInputLayout etNotes;
private ExchangeView evAmount;
@ -91,7 +89,6 @@ public class ReceiveFragment extends Fragment {
private ImageView ivQrCodeFull;
private EditText etDummy;
private ImageButton bCopyAddress;
private ImageButton bSubaddress;
private Wallet wallet = null;
private boolean isMyWallet = false;
@ -102,6 +99,10 @@ public class ReceiveFragment extends Fragment {
void setTitle(String title);
void setSubtitle(String subtitle);
void showSubaddresses(boolean managerMode);
Subaddress getSelectedSubaddress();
}
@Override
@ -111,7 +112,6 @@ public class ReceiveFragment extends Fragment {
View view = inflater.inflate(R.layout.fragment_receive, container, false);
pbProgress = view.findViewById(R.id.pbProgress);
tvAddressLabel = view.findViewById(R.id.tvAddressLabel);
tvAddress = view.findViewById(R.id.tvAddress);
etNotes = view.findViewById(R.id.etNotes);
evAmount = view.findViewById(R.id.evAmount);
@ -120,13 +120,10 @@ public class ReceiveFragment extends Fragment {
ivQrCodeFull = view.findViewById(R.id.qrCodeFull);
etDummy = view.findViewById(R.id.etDummy);
bCopyAddress = view.findViewById(R.id.bCopyAddress);
bSubaddress = view.findViewById(R.id.bSubaddress);
etDummy.setRawInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
bCopyAddress.setOnClickListener(v -> copyAddress());
enableCopyAddress(false);
enableSubaddressButton(false);
evAmount.setOnNewAmountListener(xmr -> {
Timber.d("new amount = %s", xmr);
@ -165,14 +162,8 @@ public class ReceiveFragment extends Fragment {
}
});
bSubaddress.setOnClickListener(v -> {
enableSubaddressButton(false);
enableCopyAddress(false);
final Runnable newAddress = this::getNewSubaddress;
tvAddress.animate().alpha(0).setDuration(250)
.withEndAction(newAddress).start();
tvAddress.setOnClickListener(v -> {
listenerCallback.showSubaddresses(false);
});
view.findViewById(R.id.cvQrCode).setOnClickListener(v -> {
@ -194,22 +185,12 @@ public class ReceiveFragment extends Fragment {
showProgress();
clearQR();
Bundle b = getArguments();
String address = b.getString("address");
String walletName = b.getString("name");
Timber.d("%s/%s", address, walletName);
if (address == null) {
String path = b.getString("path");
String password = b.getString("password");
loadAndShow(path, password);
} else {
if (getActivity() instanceof GenerateReviewFragment.ListenerWithWallet) {
wallet = ((GenerateReviewFragment.ListenerWithWallet) getActivity()).getWallet();
show();
} else {
throw new IllegalStateException("no wallet info");
}
}
View tvNfc = view.findViewById(R.id.tvNfc);
NfcManager manager = (NfcManager) getContext().getSystemService(Context.NFC_SERVICE);
@ -226,7 +207,7 @@ public class ReceiveFragment extends Fragment {
final MaterialContainerTransform transform = new MaterialContainerTransform();
transform.setDrawingViewId(R.id.fragment_container);
transform.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
transform.setAllContainerColors(ThemeHelper.getThemedColor(Objects.requireNonNull(getContext()), R.attr.colorSurface));
transform.setAllContainerColors(ThemeHelper.getThemedColor(getContext(), android.R.attr.colorBackground));
setSharedElementEnterTransition(transform);
}
@ -299,12 +280,8 @@ public class ReceiveFragment extends Fragment {
return null;
}
private void enableSubaddressButton(boolean enable) {
bSubaddress.setEnabled(enable);
}
void copyAddress() {
Helper.clipBoardCopy(Objects.requireNonNull(getActivity()), getString(R.string.label_copy_address), tvAddress.getText().toString());
Helper.clipBoardCopy(Objects.requireNonNull(getActivity()), getString(R.string.label_copy_address), subaddress.getAddress());
Toast.makeText(getActivity(), getString(R.string.message_copy_address), Toast.LENGTH_SHORT).show();
}
@ -333,8 +310,9 @@ public class ReceiveFragment extends Fragment {
Timber.d("onResume()");
listenerCallback.setToolbarButton(Toolbar.BUTTON_BACK);
if (wallet != null) {
listenerCallback.setTitle(wallet.getName());
listenerCallback.setSubtitle(wallet.getAccountLabel());
generateQr();
setNewSubaddress();
} else {
listenerCallback.setSubtitle(getString(R.string.status_wallet_loading));
clearQR();
@ -346,93 +324,7 @@ public class ReceiveFragment extends Fragment {
private void show() {
Timber.d("name=%s", wallet.getName());
isLoaded = true;
listenerCallback.setTitle(wallet.getName());
listenerCallback.setSubtitle(wallet.getAccountLabel());
tvAddress.setText(wallet.getAddress());
enableCopyAddress(true);
enableSubaddressButton(true);
hideProgress();
generateQr();
}
private void enableCopyAddress(boolean enable) {
bCopyAddress.setEnabled(enable);
}
private void loadAndShow(String walletPath, String password) {
new AsyncShow(walletPath, password).executeOnExecutor(MoneroThreadPoolExecutor.MONERO_THREAD_POOL_EXECUTOR);
}
GenerateReviewFragment.ProgressListener progressCallback = null;
@SuppressLint("StaticFieldLeak")
private class AsyncShow extends AsyncTask<Void, Void, Boolean> {
final private String walletPath;
final private String password;
AsyncShow(String walletPath, String passsword) {
super();
this.walletPath = walletPath;
this.password = passsword;
}
boolean dialogOpened = false;
@Override
protected void onPreExecute() {
super.onPreExecute();
showProgress();
if ((walletPath != null)
&& (WalletManager.getInstance().queryWalletDevice(walletPath + ".keys", password)
== Wallet.Device.Device_Ledger)
&& (progressCallback != null)) {
progressCallback.showLedgerProgressDialog(LedgerProgressDialog.TYPE_RESTORE);
dialogOpened = true;
}
}
@Override
protected Boolean doInBackground(Void... params) {
if (params.length != 0) return false;
wallet = WalletManager.getInstance().openWallet(walletPath, password);
isMyWallet = true;
return true;
}
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
if (dialogOpened)
progressCallback.dismissProgressDialog();
if (!isAdded()) return; // never mind
if (result) {
show();
} else {
Toast.makeText(getActivity(), getString(R.string.receive_cannot_open), Toast.LENGTH_LONG).show();
hideProgress();
}
}
}
private void storeWallet() {
new AsyncStore().executeOnExecutor(MoneroThreadPoolExecutor.MONERO_THREAD_POOL_EXECUTOR);
}
@SuppressLint("StaticFieldLeak")
private class AsyncStore extends AsyncTask<String, Void, Boolean> {
@Override
protected Boolean doInBackground(String... params) {
if (params.length != 0) return false;
if (wallet != null) wallet.store();
return true;
}
@Override
protected void onPostExecute(Boolean result) {
enableSubaddressButton(true);
super.onPostExecute(result);
}
}
public BarcodeData getBarcodeData() {
@ -446,7 +338,7 @@ public class ReceiveFragment extends Fragment {
private void generateQr() {
Timber.d("GENQR");
String address = tvAddress.getText().toString();
String address = subaddress.getAddress();
String notes = etNotes.getEditText().getText().toString();
String xmrAmount = evAmount.getAmount();
Timber.d("%s/%s/%s", xmrAmount, notes, address);
@ -543,9 +435,6 @@ public class ReceiveFragment extends Fragment {
throw new ClassCastException(context.toString()
+ " must implement Listener");
}
if (context instanceof GenerateReviewFragment.ProgressListener) {
this.progressCallback = (GenerateReviewFragment.ProgressListener) context;
}
}
@Override
@ -566,49 +455,23 @@ public class ReceiveFragment extends Fragment {
super.onDetach();
}
private void getNewSubaddress() {
new AsyncSubaddress().executeOnExecutor(MoneroThreadPoolExecutor.MONERO_THREAD_POOL_EXECUTOR);
}
private Subaddress subaddress = null;
@SuppressLint("StaticFieldLeak")
private class AsyncSubaddress extends AsyncTask<Void, Void, Boolean> {
private String newSubaddress;
boolean dialogOpened = false;
@Override
protected void onPreExecute() {
super.onPreExecute();
if ((wallet.getDeviceType() == Wallet.Device.Device_Ledger) && (progressCallback != null)) {
progressCallback.showLedgerProgressDialog(LedgerProgressDialog.TYPE_SUBADDRESS);
dialogOpened = true;
}
}
@Override
protected Boolean doInBackground(Void... params) {
if (params.length != 0) return false;
newSubaddress = wallet.getNewSubaddress();
storeWallet();
return true;
}
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
if (dialogOpened)
progressCallback.dismissProgressDialog();
if (!isAdded()) // never mind then
return;
tvAddress.setText(newSubaddress);
tvAddressLabel.setText(getString(R.string.generate_address_label_sub,
wallet.getNumSubaddresses() - 1));
generateQr();
enableCopyAddress(true);
void setNewSubaddress() {
final Subaddress newSubaddress = listenerCallback.getSelectedSubaddress();
if (!Objects.equals(subaddress, newSubaddress)) {
final Runnable resetSize = () -> tvAddress.animate().setDuration(125).scaleX(1).scaleY(1).start();
tvAddress.animate().alpha(1).setDuration(125)
.scaleX(1.2f).scaleY(1.2f)
.withEndAction(resetSize).start();
}
subaddress = newSubaddress;
final Context context = getContext();
Spanned label = Html.fromHtml(context.getString(R.string.receive_subaddress,
Integer.toHexString(ContextCompat.getColor(context, R.color.monerujoGreen) & 0xFFFFFF),
Integer.toHexString(ContextCompat.getColor(context, R.color.monerujoBackground) & 0xFFFFFF),
subaddress.getDisplayLabel(), subaddress.getAddress()));
tvAddress.setText(label);
generateQr();
}
}

View File

@ -0,0 +1,246 @@
/*
* Copyright (c) 2017 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.m2049r.xmrwallet;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.transition.MaterialElevationScale;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.layout.SubaddressInfoAdapter;
import com.m2049r.xmrwallet.ledger.LedgerProgressDialog;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.MoneroThreadPoolExecutor;
import com.m2049r.xmrwallet.widget.Toolbar;
import java.util.ArrayList;
import java.util.List;
import lombok.RequiredArgsConstructor;
import timber.log.Timber;
public class SubaddressFragment extends Fragment implements SubaddressInfoAdapter.OnInteractionListener,
View.OnClickListener {
static public final String KEY_MODE = "mode";
static public final String MODE_MANAGER = "manager";
private SubaddressInfoAdapter adapter;
private Listener activityCallback;
private Wallet wallet;
// Container Activity must implement this interface
public interface Listener {
void onSubaddressSelected(Subaddress subaddress);
void setSubtitle(String title);
void setToolbarButton(int type);
void showSubaddress(View view, final int subaddressIndex);
}
public interface ProgressListener {
void showProgressDialog(int msgId);
void showLedgerProgressDialog(int mode);
void dismissProgressDialog();
}
private ProgressListener progressCallback = null;
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof ProgressListener) {
progressCallback = (ProgressListener) context;
}
if (context instanceof Listener) {
activityCallback = (Listener) context;
} else {
throw new ClassCastException(context.toString()
+ " must implement Listener");
}
}
@Override
public void onPause() {
Timber.d("onPause()");
super.onPause();
}
@Override
public void onResume() {
super.onResume();
activityCallback.setSubtitle(getString(R.string.subbaddress_title));
activityCallback.setToolbarButton(Toolbar.BUTTON_BACK);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Timber.d("onCreateView");
final Bundle b = getArguments();
managerMode = ((b != null) && (MODE_MANAGER.equals(b.getString(KEY_MODE))));
View view = inflater.inflate(R.layout.fragment_subaddress, container, false);
final MaterialElevationScale exitTransition = new MaterialElevationScale(false);
exitTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setExitTransition(exitTransition);
final MaterialElevationScale reenterTransition = new MaterialElevationScale(true);
reenterTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setReenterTransition(reenterTransition);
view.findViewById(R.id.fab).setOnClickListener(this);
if (managerMode) {
view.findViewById(R.id.tvInstruction).setVisibility(View.GONE);
view.findViewById(R.id.tvHint).setVisibility(View.GONE);
}
final RecyclerView list = view.findViewById(R.id.list);
adapter = new SubaddressInfoAdapter(getActivity(), this);
list.setAdapter(adapter);
adapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
@Override
public void onItemRangeInserted(int positionStart, int itemCount) {
list.scrollToPosition(positionStart);
}
});
Helper.hideKeyboard(getActivity());
wallet = WalletManager.getInstance().getWallet();
loadList();
return view;
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
postponeEnterTransition();
view.getViewTreeObserver().addOnPreDrawListener(() -> {
startPostponedEnterTransition();
return true;
});
}
public void loadList() {
Timber.d("loadList()");
final int numSubaddresses = wallet.getNumSubaddresses();
final List<Subaddress> list = new ArrayList<>();
for (int i = 0; i < numSubaddresses; i++) {
list.add(wallet.getSubaddressObject(i));
}
adapter.setInfos(list);
}
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.fab) {
getNewSubaddress();
}
}
private int lastUsedSubaddress() {
int lastUsedSubaddress = 0;
for (TransactionInfo info : wallet.getHistory().getAll()) {
if (info.addressIndex > lastUsedSubaddress)
lastUsedSubaddress = info.addressIndex;
}
return lastUsedSubaddress;
}
private void getNewSubaddress() {
final int maxSubaddresses = lastUsedSubaddress() + wallet.getDeviceType().getSubaddressLookahead();
if (wallet.getNumSubaddresses() < maxSubaddresses)
new AsyncSubaddress().executeOnExecutor(MoneroThreadPoolExecutor.MONERO_THREAD_POOL_EXECUTOR);
else
Toast.makeText(getActivity(), getString(R.string.max_subaddress_warning), Toast.LENGTH_LONG).show();
}
@SuppressLint("StaticFieldLeak")
@RequiredArgsConstructor
private class AsyncSubaddress extends AsyncTask<Void, Void, Boolean> {
boolean dialogOpened = false;
@Override
protected void onPreExecute() {
super.onPreExecute();
if ((wallet.getDeviceType() == Wallet.Device.Device_Ledger) && (progressCallback != null)) {
progressCallback.showLedgerProgressDialog(LedgerProgressDialog.TYPE_SUBADDRESS);
dialogOpened = true;
}
}
@Override
protected Boolean doInBackground(Void... params) {
if (params.length != 0) return false;
wallet.getNewSubaddress();
wallet.store();
return true;
}
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
if (dialogOpened)
progressCallback.dismissProgressDialog();
if (!isAdded()) // never mind then
return;
loadList();
}
}
boolean managerMode = false;
// Callbacks from SubaddressInfoAdapter
@Override
public void onInteraction(final View view, final Subaddress subaddress) {
if (managerMode)
activityCallback.showSubaddress(view, subaddress.getAddressIndex());
else
activityCallback.onSubaddressSelected(subaddress); // also closes the fragment with onBackpressed()
}
@Override
public boolean onLongInteraction(View view, Subaddress subaddress) {
activityCallback.showSubaddress(view, subaddress.getAddressIndex());
return false;
}
}

View File

@ -0,0 +1,170 @@
/*
* Copyright (c) 2017 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.m2049r.xmrwallet;
import android.content.Context;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.textfield.TextInputLayout;
import com.google.android.material.transition.MaterialContainerTransform;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.layout.TransactionInfoAdapter;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.widget.Toolbar;
import java.util.ArrayList;
import java.util.List;
import timber.log.Timber;
// TODO: live update - i.e. use onRefreshed() somehow
public class SubaddressInfoFragment extends Fragment implements TransactionInfoAdapter.OnInteractionListener {
private TransactionInfoAdapter adapter;
private Subaddress subaddress;
private TextInputLayout etName;
private TextView tvAddress;
private TextView tvTxLabel;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_subaddressinfo, container, false);
etName = view.findViewById(R.id.etName);
tvAddress = view.findViewById(R.id.tvAddress);
tvTxLabel = view.findViewById(R.id.tvTxLabel);
final RecyclerView list = view.findViewById(R.id.list);
adapter = new TransactionInfoAdapter(getActivity(), this);
list.setAdapter(adapter);
final Wallet wallet = activityCallback.getWallet();
Bundle b = getArguments();
final int subaddressIndex = b.getInt("subaddressIndex");
subaddress = wallet.getSubaddressObject(subaddressIndex);
etName.getEditText().setText(subaddress.getDisplayLabel());
tvAddress.setText(getContext().getString(R.string.subbaddress_info_subtitle,
subaddress.getAddressIndex(), subaddress.getSquashedAddress()));
etName.getEditText().setOnFocusChangeListener((v, hasFocus) -> {
if (!hasFocus) {
wallet.setSubaddressLabel(subaddressIndex, etName.getEditText().getText().toString());
}
});
etName.getEditText().setOnEditorActionListener((v, actionId, event) -> {
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN))
|| (actionId == EditorInfo.IME_ACTION_DONE)) {
Helper.hideKeyboard(getActivity());
wallet.setSubaddressLabel(subaddressIndex, etName.getEditText().getText().toString());
onRefreshed(wallet);
return true;
}
return false;
});
onRefreshed(wallet);
return view;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final MaterialContainerTransform transform = new MaterialContainerTransform();
transform.setDrawingViewId(R.id.fragment_container);
transform.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
transform.setAllContainerColors(ThemeHelper.getThemedColor(getContext(), android.R.attr.colorBackground));
setSharedElementEnterTransition(transform);
}
public void onRefreshed(final Wallet wallet) {
Timber.d("onRefreshed");
List<TransactionInfo> list = new ArrayList<>();
for (TransactionInfo info : wallet.getHistory().getAll()) {
if (info.addressIndex == subaddress.getAddressIndex())
list.add(info);
}
adapter.setInfos(list);
if (list.isEmpty())
tvTxLabel.setText(R.string.subaddress_notx_label);
else
tvTxLabel.setText(R.string.subaddress_tx_label);
}
// Callbacks from TransactionInfoAdapter
@Override
public void onInteraction(final View view, final TransactionInfo infoItem) {
activityCallback.onTxDetailsRequest(view, infoItem);
}
Listener activityCallback;
// Container Activity must implement this interface
public interface Listener {
void onTxDetailsRequest(View view, TransactionInfo info);
Wallet getWallet();
void setToolbarButton(int type);
void setTitle(String title, String subtitle);
void setSubtitle(String subtitle);
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
if (context instanceof Listener) {
this.activityCallback = (Listener) context;
} else {
throw new ClassCastException(context.toString()
+ " must implement Listener");
}
}
@Override
public void onResume() {
super.onResume();
Timber.d("onResume()");
activityCallback.setSubtitle(getString(R.string.subbaddress_title));
activityCallback.setToolbarButton(Toolbar.BUTTON_BACK);
}
@Override
public void onPause() {
super.onPause();
}
}

View File

@ -22,7 +22,9 @@ import android.content.Intent;
import android.graphics.Paint;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.InputType;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@ -37,12 +39,14 @@ import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.google.android.material.transition.MaterialContainerTransform;
import com.google.android.material.transition.MaterialElevationScale;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Transfer;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.widget.Toolbar;
import java.text.SimpleDateFormat;
@ -52,6 +56,8 @@ import java.util.HashSet;
import java.util.Set;
import java.util.TimeZone;
import timber.log.Timber;
public class TxFragment extends Fragment {
static public final String ARG_INFO = "info";
@ -88,11 +94,16 @@ public class TxFragment extends Fragment {
private ImageView tvXmrToLogo;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_tx_info, container, false);
final MaterialElevationScale exitTransition = new MaterialElevationScale(false);
exitTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setExitTransition(exitTransition);
final MaterialElevationScale reenterTransition = new MaterialElevationScale(true);
reenterTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setReenterTransition(reenterTransition);
cvXmrTo = view.findViewById(R.id.cvXmrTo);
tvTxXmrToKey = view.findViewById(R.id.tvTxXmrToKey);
tvDestinationBtc = view.findViewById(R.id.tvDestinationBtc);
@ -121,9 +132,8 @@ public class TxFragment extends Fragment {
Toast.makeText(getActivity(), getString(R.string.message_copy_xmrtokey), Toast.LENGTH_SHORT).show();
});
Bundle args = getArguments();
TransactionInfo info = args.getParcelable(ARG_INFO);
show(info);
info = getArguments().getParcelable(ARG_INFO);
show();
return view;
}
@ -192,7 +202,7 @@ public class TxFragment extends Fragment {
TransactionInfo info = null;
UserNotes userNotes = null;
void loadNotes(TransactionInfo info) {
void loadNotes() {
if ((userNotes == null) || (info.notes == null)) {
info.notes = activityCallback.getTxNotes(info.hash);
}
@ -205,19 +215,28 @@ public class TxFragment extends Fragment {
tvTxFee.setTextColor(clr);
}
private void show(TransactionInfo info) {
private void showSubaddressLabel() {
final Subaddress subaddress = activityCallback.getWalletSubaddress(info.accountIndex, info.addressIndex);
final Context ctx = getContext();
Spanned label = Html.fromHtml(ctx.getString(R.string.tx_account_formatted,
info.accountIndex, info.addressIndex,
Integer.toHexString(ContextCompat.getColor(ctx, R.color.monerujoGreen) & 0xFFFFFF),
Integer.toHexString(ContextCompat.getColor(ctx, R.color.monerujoBackground) & 0xFFFFFF),
subaddress.getDisplayLabel()));
tvAccount.setText(label);
tvAccount.setOnClickListener(v -> activityCallback.showSubaddress(v, info.addressIndex));
}
private void show() {
if (info.txKey == null) {
info.txKey = activityCallback.getTxKey(info.hash);
}
if (info.address == null) {
info.address = activityCallback.getTxAddress(info.account, info.subaddress);
info.address = activityCallback.getTxAddress(info.accountIndex, info.addressIndex);
}
loadNotes(info);
loadNotes();
activityCallback.setSubtitle(getString(R.string.tx_title));
activityCallback.setToolbarButton(Toolbar.BUTTON_BACK);
tvAccount.setText(getString(R.string.tx_account_formatted, info.account, info.subaddress));
showSubaddressLabel();
tvAddress.setText(info.address);
tvTxTimestamp.setText(TS_FORMATTER.format(new Date(info.timestamp * 1000)));
@ -256,8 +275,8 @@ public class TxFragment extends Fragment {
setTxColour(ContextCompat.getColor(getContext(), R.color.tx_minus));
}
Set<String> destinations = new HashSet<>();
StringBuffer sb = new StringBuffer();
StringBuffer dstSb = new StringBuffer();
StringBuilder sb = new StringBuilder();
StringBuilder dstSb = new StringBuilder();
if (info.transfers != null) {
boolean newline = false;
for (Transfer transfer : info.transfers) {
@ -281,14 +300,12 @@ public class TxFragment extends Fragment {
}
} else {
sb.append("-");
dstSb.append(info.direction ==
TransactionInfo.Direction.Direction_In ?
activityCallback.getWalletSubaddress(info.account, info.subaddress) :
dstSb.append(info.direction == TransactionInfo.Direction.Direction_In ?
activityCallback.getWalletSubaddress(info.accountIndex, info.addressIndex).getAddress() :
"-");
}
tvTxTransfers.setText(sb.toString());
tvDestination.setText(dstSb.toString());
this.info = info;
showBtcInfo();
}
@ -334,7 +351,7 @@ public class TxFragment extends Fragment {
final MaterialContainerTransform transform = new MaterialContainerTransform();
transform.setDrawingViewId(R.id.fragment_container);
transform.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
transform.setAllContainerColors(ThemeHelper.getThemedColor(getContext(), R.attr.colorSurface));
transform.setAllContainerColors(ThemeHelper.getThemedColor(getContext(), android.R.attr.colorBackground));
setSharedElementEnterTransition(transform);
}
@ -347,7 +364,7 @@ public class TxFragment extends Fragment {
Listener activityCallback;
public interface Listener {
String getWalletSubaddress(int accountIndex, int subaddressIndex);
Subaddress getWalletSubaddress(int accountIndex, int subaddressIndex);
String getTxKey(String hash);
@ -361,6 +378,8 @@ public class TxFragment extends Fragment {
void setSubtitle(String subtitle);
void showSubaddress(View view, final int subaddressIndex);
}
@Override
@ -385,4 +404,13 @@ public class TxFragment extends Fragment {
Helper.hideKeyboard(getActivity());
super.onPause();
}
@Override
public void onResume() {
super.onResume();
Timber.d("onResume()");
activityCallback.setSubtitle(getString(R.string.tx_title));
activityCallback.setToolbarButton(Toolbar.BUTTON_BACK);
showSubaddressLabel();
}
}

View File

@ -38,6 +38,7 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AlertDialog;
import androidx.core.view.GravityCompat;
@ -48,6 +49,7 @@ import androidx.fragment.app.FragmentManager;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.navigation.NavigationView;
import com.m2049r.xmrwallet.data.BarcodeData;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.data.TxData;
import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.dialog.CreditsFragment;
@ -78,7 +80,9 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
ScannerFragment.OnScannedListener, ReceiveFragment.Listener,
SendAddressWizardFragment.OnScanListener,
WalletFragment.DrawerLocker,
NavigationView.OnNavigationItemSelectedListener {
NavigationView.OnNavigationItemSelectedListener,
SubaddressFragment.Listener,
SubaddressInfoFragment.Listener {
public static final String REQUEST_ID = "id";
public static final String REQUEST_PW = "pw";
@ -291,6 +295,8 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
HelpFragment.display(getSupportFragmentManager(), R.string.help_send);
} else if (itemId == R.id.action_rename) {
onAccountRename();
} else if (itemId == R.id.action_subaddresses) {
showSubaddresses(true);
} else if (itemId == R.id.action_streetmode) {
if (isStreetMode()) { // disable streetmode
onDisableStreetMode();
@ -764,8 +770,8 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
}
@Override
public String getWalletSubaddress(int accountIndex, int subaddressIndex) {
return getWallet().getSubaddress(accountIndex, subaddressIndex);
public Subaddress getWalletSubaddress(int accountIndex, int subaddressIndex) {
return getWallet().getSubaddressObject(accountIndex, subaddressIndex);
}
public String getWalletName() {
@ -791,6 +797,8 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
transition = R.string.receive_transition_name;
else if (newFragment instanceof SendFragment)
transition = R.string.send_transition_name;
else if (newFragment instanceof SubaddressInfoFragment)
transition = R.string.subaddress_info_transition_name;
else
throw new IllegalStateException("expecting known transition");
@ -889,7 +897,6 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
} else {
Timber.i("Waiting for permissions");
}
}
@Override
@ -934,7 +941,6 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
startScanFragment = true;
} else {
String msg = getString(R.string.message_camera_not_permitted);
Timber.e(msg);
Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
}
}
@ -970,6 +976,7 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
} else {
super.onBackPressed();
}
Helper.hideKeyboard(this);
}
@Override
@ -1095,6 +1102,11 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
dialog.show();
}
public void setAccountIndex(int accountIndex) {
getWallet().setAccountIndex(accountIndex);
selectedSubaddressIndex = 0;
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
final int id = item.getItemId();
@ -1105,7 +1117,7 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
int accountIdx = accountIds.indexOf(id);
if (accountIdx >= 0) {
Timber.d("found @%d", accountIdx);
getWallet().setAccountIndex(accountIdx);
setAccountIndex(accountIdx);
}
forceUpdate();
drawer.closeDrawer(GravityCompat.START);
@ -1113,8 +1125,22 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
return true;
}
private int lastUsedAccount() {
int lastUsedAccount = 0;
for (TransactionInfo info : getWallet().getHistory().getAll()) {
if (info.accountIndex > lastUsedAccount)
lastUsedAccount = info.accountIndex;
}
return lastUsedAccount;
}
private void addAccount() {
final Wallet wallet = getWallet();
final int maxAccounts = lastUsedAccount() + wallet.getDeviceType().getAccountLookahead();
if (wallet.getNumAccounts() < maxAccounts)
new AsyncAddAccount().executeOnExecutor(MoneroThreadPoolExecutor.MONERO_THREAD_POOL_EXECUTOR);
else
Toast.makeText(this, getString(R.string.max_account_warning), Toast.LENGTH_LONG).show();
}
@SuppressLint("StaticFieldLeak")
@ -1142,7 +1168,7 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
protected Boolean doInBackground(Void... params) {
if (params.length != 0) return false;
getWallet().addAccount();
getWallet().setAccountIndex(getWallet().getNumAccounts() - 1);
setAccountIndex(getWallet().getNumAccounts() - 1);
return true;
}
@ -1158,4 +1184,34 @@ public class WalletActivity extends BaseActivity implements WalletFragment.Liste
Toast.LENGTH_SHORT).show();
}
}
// we store the index only and always retrieve a new Subaddress object
// to ensure we get the current label
private int selectedSubaddressIndex = 0;
@Override
public Subaddress getSelectedSubaddress() {
return getWallet().getSubaddressObject(selectedSubaddressIndex);
}
@Override
public void onSubaddressSelected(@Nullable final Subaddress subaddress) {
selectedSubaddressIndex = subaddress.getAddressIndex();
onBackPressed();
}
@Override
public void showSubaddresses(boolean managerMode) {
final Bundle b = new Bundle();
if (managerMode)
b.putString(SubaddressFragment.KEY_MODE, SubaddressFragment.MODE_MANAGER);
replaceFragment(new SubaddressFragment(), null, b);
}
@Override
public void showSubaddress(View view, final int subaddressIndex) {
final Bundle b = new Bundle();
b.putInt("subaddressIndex", subaddressIndex);
replaceFragmentWithTransition(view, new SubaddressInfoFragment(), null, b);
}
}

View File

@ -79,6 +79,7 @@ public class WalletFragment extends Fragment
private Button bSend;
private ImageView ivStreetGunther;
private Drawable streetGunther = null;
RecyclerView txlist;
private Spinner sCurrency;
@ -106,13 +107,6 @@ public class WalletFragment extends Fragment
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_wallet, container, false);
final MaterialElevationScale exitTransition = new MaterialElevationScale(false);
exitTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setExitTransition(exitTransition);
final MaterialElevationScale reenterTransition = new MaterialElevationScale(true);
reenterTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setReenterTransition(reenterTransition);
ivStreetGunther = view.findViewById(R.id.ivStreetGunther);
tvStreetView = view.findViewById(R.id.tvStreetView);
llBalance = view.findViewById(R.id.llBalance);
@ -140,13 +134,19 @@ public class WalletFragment extends Fragment
bSend = view.findViewById(R.id.bSend);
bReceive = view.findViewById(R.id.bReceive);
RecyclerView recyclerView = view.findViewById(R.id.list);
txlist = view.findViewById(R.id.list);
adapter = new TransactionInfoAdapter(getActivity(), this);
recyclerView.setAdapter(adapter);
txlist.setAdapter(adapter);
adapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
@Override
public void onItemRangeInserted(int positionStart, int itemCount) {
if ((positionStart == 0) && (txlist.computeVerticalScrollOffset() == 0))
txlist.scrollToPosition(positionStart);
}
});
SwipeableRecyclerViewTouchListener swipeTouchListener =
new SwipeableRecyclerViewTouchListener(recyclerView,
txlist.addOnItemTouchListener(
new SwipeableRecyclerViewTouchListener(txlist,
new SwipeableRecyclerViewTouchListener.SwipeListener() {
@Override
public boolean canSwipeLeft(int position) {
@ -173,10 +173,7 @@ public class WalletFragment extends Fragment
adapter.removeItem(position);
}
}
});
recyclerView.addOnItemTouchListener(swipeTouchListener);
}));
bSend.setOnClickListener(v -> activityCallback.onSendRequest(v));
bReceive.setOnClickListener(v -> activityCallback.onWalletReceive(v));
@ -338,24 +335,35 @@ public class WalletFragment extends Fragment
final MaterialElevationScale reenterTransition = new MaterialElevationScale(true);
reenterTransition.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
setReenterTransition(reenterTransition);
activityCallback.onTxDetailsRequest(view, infoItem);
}
// called from activity
// if account index has changed scroll to top?
private int accountIndex = 0;
public void onRefreshed(final Wallet wallet, final boolean full) {
Timber.d("onRefreshed(%b)", full);
if (full) {
List<TransactionInfo> list = new ArrayList<>();
final long streetHeight = activityCallback.getStreetModeHeight();
Timber.d("StreetHeight=%d", streetHeight);
for (TransactionInfo info : wallet.getHistory().getAll()) {
Timber.d("TxHeight=%d", info.blockheight);
Timber.d("TxHeight=%d, Label=%s", info.blockheight, info.subaddressLabel);
if ((info.isPending || (info.blockheight >= streetHeight))
&& !dismissedTransactions.contains(info.hash))
list.add(info);
}
adapter.setInfos(list);
if (accountIndex != wallet.getAccountIndex()) {
accountIndex = wallet.getAccountIndex();
txlist.scrollToPosition(0);
}
}
updateStatus(wallet);
}
@ -522,9 +530,10 @@ public class WalletFragment extends Fragment
@Override
public void onResume() {
super.onResume();
setExitTransition(null);
setReenterTransition(null);
Timber.d("onResume()");
activityCallback.setTitle(walletTitle, walletSubtitle);
//activityCallback.setToolbarButton(Toolbar.BUTTON_CLOSE); // TODO: Close button somewhere else
activityCallback.setToolbarButton(Toolbar.BUTTON_NONE);
setProgress(syncProgress);
setProgress(syncText);

View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2018 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
import java.util.regex.Pattern;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
@AllArgsConstructor
@ToString
@EqualsAndHashCode
public class Subaddress implements Comparable<Subaddress> {
@Getter
final private int accountIndex;
@Getter
final private int addressIndex;
@Getter
final private String address;
@Getter
private final String label;
@Override
public int compareTo(Subaddress another) { // newer is <
final int compareAccountIndex = another.accountIndex - accountIndex;
if (compareAccountIndex == 0)
return another.addressIndex - addressIndex;
return compareAccountIndex;
}
public String getSquashedAddress() {
return address.substring(0, 8) + "" + address.substring(address.length() - 8);
}
public static final Pattern DEFAULT_LABEL_FORMATTER = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}:[0-9]{2}:[0-9]{2}$");
public String getDisplayLabel() {
if (label.isEmpty() || (DEFAULT_LABEL_FORMATTER.matcher(label).matches()))
return ("#" + addressIndex);
else
return label;
}
}

View File

@ -547,7 +547,7 @@ public class SendFragment extends Fragment
final MaterialContainerTransform transform = new MaterialContainerTransform();
transform.setDrawingViewId(R.id.fragment_container);
transform.setDuration(getResources().getInteger(R.integer.tx_item_transition_duration));
transform.setAllContainerColors(ThemeHelper.getThemedColor(Objects.requireNonNull(getContext()), R.attr.colorSurface));
transform.setAllContainerColors(ThemeHelper.getThemedColor(getContext(), android.R.attr.colorBackground));
setSharedElementEnterTransition(transform);
}

View File

@ -48,7 +48,7 @@ public class NodeInfoAdapter extends RecyclerView.Adapter<NodeInfoAdapter.ViewHo
public interface OnInteractionListener {
void onInteraction(View view, NodeInfo item);
void onLongInteraction(View view, NodeInfo item);
boolean onLongInteraction(View view, NodeInfo item);
}
private final List<NodeInfo> nodeItems = new ArrayList<>();
@ -213,10 +213,10 @@ public class NodeInfoAdapter extends RecyclerView.Adapter<NodeInfoAdapter.ViewHo
if (listener != null) {
int position = getAdapterPosition(); // gets item position
if (position != RecyclerView.NO_POSITION) { // Check if an item was deleted, but the user clicked it before the UI removed it
listener.onLongInteraction(view, nodeItems.get(position));
return listener.onLongInteraction(view, nodeItems.get(position));
}
}
return true;
return false;
}
}

View File

@ -0,0 +1,155 @@
/*
* Copyright (c) 2017 m2049r
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.m2049r.xmrwallet.layout;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.Subaddress;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import timber.log.Timber;
public class SubaddressInfoAdapter extends RecyclerView.Adapter<SubaddressInfoAdapter.ViewHolder> {
public interface OnInteractionListener {
void onInteraction(View view, Subaddress item);
boolean onLongInteraction(View view, Subaddress item);
}
private final List<Subaddress> items;
private final OnInteractionListener listener;
Context context;
public SubaddressInfoAdapter(Context context, OnInteractionListener listener) {
this.context = context;
this.items = new ArrayList<>();
this.listener = listener;
}
private static class SubaddressInfoDiff extends DiffCallback<Subaddress> {
public SubaddressInfoDiff(List<Subaddress> oldList, List<Subaddress> newList) {
super(oldList, newList);
}
@Override
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
return mOldList.get(oldItemPosition).getAddress().equals(mNewList.get(newItemPosition).getAddress());
}
@Override
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
return mOldList.get(oldItemPosition).equals(mNewList.get(newItemPosition));
}
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_subaddress, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
holder.bind(position);
}
@Override
public int getItemCount() {
return items.size();
}
public Subaddress getItem(int position) {
return items.get(position);
}
public void setInfos(List<Subaddress> newItems) {
if (newItems == null) {
newItems = new ArrayList<>();
Timber.d("setInfos null");
} else {
Timber.d("setInfos %s", newItems.size());
}
Collections.sort(newItems);
final DiffCallback<Subaddress> diffCallback = new SubaddressInfoDiff(items, newItems);
final DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(diffCallback);
items.clear();
items.addAll(newItems);
diffResult.dispatchUpdatesTo(this);
}
class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
final TextView tvName;
final TextView tvAddress;
Subaddress item;
ViewHolder(View itemView) {
super(itemView);
tvName = itemView.findViewById(R.id.tvName);
tvAddress = itemView.findViewById(R.id.tvAddress);
itemView.setOnClickListener(this);
itemView.setOnLongClickListener(this);
}
void bind(int position) {
item = getItem(position);
itemView.setTransitionName(context.getString(R.string.subaddress_item_transition_name, item.getAddressIndex()));
final String label = item.getDisplayLabel();
final String address = context.getString(R.string.subbaddress_info_subtitle,
item.getAddressIndex(), item.getSquashedAddress());
tvName.setText(label.isEmpty() ? address : label);
tvAddress.setText(address);
}
@Override
public void onClick(View view) {
if (listener != null) {
int position = getAdapterPosition(); // gets item position
if (position != RecyclerView.NO_POSITION) { // Check if an item was deleted, but the user clicked it before the UI removed it
listener.onInteraction(view, getItem(position));
}
}
}
@Override
public boolean onLongClick(View view) {
if (listener != null) {
int position = getAdapterPosition(); // gets item position
if (position != RecyclerView.NO_POSITION) { // Check if an item was deleted, but the user clicked it before the UI removed it
return listener.onLongInteraction(view, getItem(position));
}
}
return true;
}
}
}

View File

@ -17,6 +17,8 @@
package com.m2049r.xmrwallet.layout;
import android.content.Context;
import android.text.Html;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -46,7 +48,6 @@ import java.util.TimeZone;
import timber.log.Timber;
public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfoAdapter.ViewHolder> {
private final SimpleDateFormat DATETIME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm");
private final int outboundColour;
@ -94,6 +95,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
return (oldItem.direction == newItem.direction)
&& (oldItem.isPending == newItem.isPending)
&& (oldItem.isFailed == newItem.isFailed)
&& (oldItem.subaddressLabel.equals(newItem.subaddressLabel))
&& (Objects.equals(oldItem.notes, newItem.notes));
}
}
@ -211,14 +213,25 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
setTxColour(outboundColour);
}
String tag = null;
String info = "";
if ((infoItem.addressIndex != 0) && (infoItem.direction == TransactionInfo.Direction.Direction_In))
tag = infoItem.getDisplayLabel();
if ((userNotes.note.isEmpty())) {
this.tvPaymentId.setText(infoItem.paymentId.equals("0000000000000000") ?
(infoItem.subaddress != 0 ?
(context.getString(R.string.tx_subaddress, infoItem.subaddress)) :
"") :
infoItem.paymentId);
if (!infoItem.paymentId.equals("0000000000000000")) {
info = infoItem.paymentId;
}
} else {
this.tvPaymentId.setText(userNotes.note);
info = userNotes.note;
}
if (tag == null) {
tvPaymentId.setText(info);
} else {
Spanned label = Html.fromHtml(context.getString(R.string.tx_details_notes,
Integer.toHexString(ContextCompat.getColor(context, R.color.monerujoGreen) & 0xFFFFFF),
Integer.toHexString(ContextCompat.getColor(context, R.color.monerujoBackground) & 0xFFFFFF),
tag, info.isEmpty() ? "" : ("&nbsp; " + info)));
tvPaymentId.setText(label);
}
this.tvDateTime.setText(getDateTime(infoItem.timestamp));

View File

@ -71,18 +71,18 @@ public class TransactionHistory {
// }
public void refresh() {
List<TransactionInfo> t = refreshJ();
Timber.d("refreshed %d", t.size());
for (Iterator<TransactionInfo> iterator = t.iterator(); iterator.hasNext(); ) {
List<TransactionInfo> transactionInfos = refreshJ();
Timber.d("refreshed %d", transactionInfos.size());
for (Iterator<TransactionInfo> iterator = transactionInfos.iterator(); iterator.hasNext(); ) {
TransactionInfo info = iterator.next();
if (info.account != accountIndex) {
if (info.accountIndex != accountIndex) {
iterator.remove();
Timber.d("removed %s", info.hash);
} else {
Timber.d("kept %s", info.hash);
}
}
transactions = t;
transactions = transactionInfos;
}
private native List<TransactionInfo> refreshJ();

View File

@ -19,13 +19,17 @@ package com.m2049r.xmrwallet.model;
import android.os.Parcel;
import android.os.Parcelable;
import com.m2049r.xmrwallet.data.Subaddress;
import java.util.List;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
// this is not the TransactionInfo from the API as that is owned by the TransactionHistory
// this is a POJO for the TransactionInfoAdapter
public class TransactionInfo implements Parcelable, Comparable<TransactionInfo> {
static final String TAG = "TransactionInfo";
@RequiredArgsConstructor
public enum Direction {
Direction_In(0),
Direction_Out(1);
@ -40,15 +44,8 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
return null;
}
public int getValue() {
return value;
}
private int value;
Direction(int value) {
this.value = value;
}
@Getter
private final int value;
}
public Direction direction;
@ -60,8 +57,8 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
public String hash;
public long timestamp;
public String paymentId;
public int account;
public int subaddress;
public int accountIndex;
public int addressIndex;
public long confirmations;
public String subaddressLabel;
public List<Transfer> transfers;
@ -80,8 +77,8 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
String hash,
long timestamp,
String paymentId,
int account,
int subaddress,
int accountIndex,
int addressIndex,
long confirmations,
String subaddressLabel,
List<Transfer> transfers) {
@ -94,13 +91,20 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
this.hash = hash;
this.timestamp = timestamp;
this.paymentId = paymentId;
this.account = account;
this.subaddress = subaddress;
this.accountIndex = accountIndex;
this.addressIndex = addressIndex;
this.confirmations = confirmations;
this.subaddressLabel = subaddressLabel;
this.transfers = transfers;
}
public String getDisplayLabel() {
if (subaddressLabel.isEmpty() || (Subaddress.DEFAULT_LABEL_FORMATTER.matcher(subaddressLabel).matches()))
return ("#" + addressIndex);
else
return subaddressLabel;
}
public String toString() {
return direction + "@" + blockheight + " " + amount;
}
@ -116,8 +120,8 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
out.writeString(hash);
out.writeLong(timestamp);
out.writeString(paymentId);
out.writeInt(account);
out.writeInt(subaddress);
out.writeInt(accountIndex);
out.writeInt(addressIndex);
out.writeLong(confirmations);
out.writeString(subaddressLabel);
out.writeList(transfers);
@ -146,8 +150,8 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
hash = in.readString();
timestamp = in.readLong();
paymentId = in.readString();
account = in.readInt();
subaddress = in.readInt();
accountIndex = in.readInt();
addressIndex = in.readInt();
confirmations = in.readLong();
subaddressLabel = in.readString();
transfers = in.readArrayList(Transfer.class.getClassLoader());

View File

@ -19,6 +19,7 @@ package com.m2049r.xmrwallet.model;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.data.TxData;
import java.io.File;
@ -26,6 +27,8 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import timber.log.Timber;
public class Wallet {
@ -104,10 +107,14 @@ public class Wallet {
this.accountIndex = accountIndex;
}
@RequiredArgsConstructor
@Getter
public enum Device {
Device_Undefined,
Device_Software,
Device_Ledger
Device_Undefined(0, 0),
Device_Software(50, 200),
Device_Ledger(5, 20);
private final int accountLookahead;
private final int subaddressLookahead;
}
public enum StatusEnum {
@ -160,6 +167,15 @@ public class Wallet {
private native String getAddressJ(int accountIndex, int addressIndex);
public Subaddress getSubaddressObject(int accountIndex, int subAddressIndex) {
return new Subaddress(accountIndex, subAddressIndex,
getSubaddress(subAddressIndex), getSubaddressLabel(subAddressIndex));
}
public Subaddress getSubaddressObject(int subAddressIndex) {
return getSubaddressObject(accountIndex, subAddressIndex);
}
public native String getPath();
public NetworkType getNetworkType() {
@ -428,6 +444,11 @@ public class Wallet {
setSubaddressLabel(accountIndex, 0, label);
}
public void setSubaddressLabel(int addressIndex, String label) {
setSubaddressLabel(accountIndex, addressIndex, label);
getHistory().refreshWithNotes(this);
}
public native void setSubaddressLabel(int accountIndex, int addressIndex, String label);
public native int getNumAccounts();

View File

@ -26,18 +26,27 @@
android:indeterminate="true"
android:visibility="gone" />
<TextView
style="@style/MoneroText.Label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:text="@string/tx_subaddress"
android:textAlignment="textStart" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
android:orientation="horizontal">
<TextView
android:id="@+id/tvAddressLabel"
style="@style/MoneroLabel.Heading"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="@string/generate_address_label" />
android:id="@+id/tvAddress"
style="@style/MoneroText.Medium"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="1"
tools:text="TAG 9wZnnNctRc7RaLya1rxykH21dUwfQpNGmVLjAvkvqe7nKT2Mw848AJNGMunW5xjoSZ5vCCU3uDnUoVqSSHxzRtQBE3f6crx" />
<ImageButton
android:id="@+id/bCopyAddress"
@ -45,33 +54,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:background="?android:selectableItemBackground"
android:padding="8dp"
android:src="@drawable/ic_content_copy_24dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:weightSum="10">
<TextView
android:id="@+id/tvAddress"
style="@style/MoneroText.Medium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="10"
android:textAlignment="center"
tools:text="9wZnnNctRc7RaLya1rxykH21dUwfQpNGmVLjAvkvqe7nKT2Mw848AJNGMunW5xjoSZ5vCCU3uDnUoVqSSHxzRtQBE3f6crx" />
<ImageButton
android:id="@+id/bSubaddress"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginStart="8dp"
android:background="?android:selectableItemBackground"
android:src="@drawable/ic_refresh_24dp" />
</LinearLayout>

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tvInstruction"
style="@style/MoneroText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/header_top"
android:layout_marginBottom="@dimen/data_top"
android:gravity="center"
android:text="@string/subaddress_select_label" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:paddingBottom="80dp"
android:transitionGroup="true"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_subaddress" />
<TextView
android:id="@+id/tvHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:drawablePadding="8dp"
android:paddingTop="8dp"
android:text="@string/subaddress_details_hint"
app:drawableStartCompat="@drawable/ic_info_outline_gray_24dp" />
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:background="@drawable/gradient_oval"
android:elevation="6dp">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:backgroundTint="@android:color/transparent"
android:backgroundTintMode="src_in"
android:src="@drawable/ic_add_white_24dp"
app:borderWidth="0dp"
app:elevation="0dp"
app:fabSize="normal"
app:pressedTranslationZ="0dp" />
</FrameLayout>
</FrameLayout>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp"
android:transitionName="@string/subaddress_info_transition_name">
<TextView
android:id="@+id/tvAddress"
style="@style/MoneroText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/header_top_first"
tools:text="#1: 8AioXCmK...aGivEa7C" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/etName"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/header_top_first"
android:layout_marginBottom="@dimen/header_top_first">
<com.google.android.material.textfield.TextInputEditText
style="@style/MoneroEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/subbaddress_name_hint"
android:imeOptions="actionDone"
android:inputType="text"
android:maxLines="1"
android:textAlignment="textStart" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:id="@+id/tvTxLabel"
style="@style/MoneroText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/section_top"
android:layout_marginBottom="@dimen/header_top"
android:text="@string/subaddress_tx_label" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="80dp"
android:transitionGroup="true"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_transaction" />
</LinearLayout>

View File

@ -206,9 +206,8 @@
android:paddingStart="8dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:selectAllOnFocus="true"
android:textIsSelectable="true"
tools:text="(0,1)" />
android:transitionName="@string/subaddress_txinfo_transition_name"
tools:text="(0,1) #17" />
<TextView
android:id="@+id/tvAddress"

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="8dp">
<LinearLayout
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="8dp"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvName"
style="@style/MoneroText.Label.Subaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
tools:text="My First Subaddress" />
<TextView
android:id="@+id/tvAddress"
style="@style/MoneroText.Small"
android:layout_width="match_parent"
android:layout_marginTop="4dp"
android:layout_height="wrap_content"
tools:text="#1: 8AioXCmK...aGivEa7C" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -6,11 +6,6 @@
android:orderInCategory="50"
android:title="@string/menu_streetmode" />
<item
android:id="@+id/action_receive"
android:orderInCategory="100"
android:title="@string/menu_receive" />
<item
android:id="@+id/action_rename"
android:orderInCategory="200"

View File

@ -16,6 +16,12 @@
android:title="@string/menu_rename"
app:showAsAction="never" />
<item
android:id="@+id/action_subaddresses"
android:orderInCategory="250"
android:title="@string/subbaddress_title"
app:showAsAction="never" />
<item
android:id="@+id/action_help_wallet"
android:orderInCategory="300"

View File

@ -8,7 +8,7 @@
<string name="menu_share">Compartir</string>
<string name="menu_help">Ajuda</string>
<string name="menu_receive">Rebre</string>
<string name="menu_rename">Canvi de nom &#8230;</string>
<string name="menu_rename">Canvi de nom</string>
<string name="menu_archive">Arxivar</string>
<string name="menu_backup">Còpia de seguretat</string>
<string name="menu_changepw">Canvi de contrasenya</string>
@ -287,8 +287,8 @@
<string name="tx_account">Compte #</string>
<string name="send_sweepall">Envia tots els fons confirmats cap aquest compte!</string>
<string name="tx_subaddress">Subadreces #%1$d</string>
<string name="generate_address_label_sub">Subadreces Públiques #%1$d</string>
<string name="tx_subaddress">Subadreces</string>
<string name="generate_address_label_sub">Subadreces Públiques #%1$d: %2$s</string>
<string name="menu_language">Idioma</string>
<string name="language_system_default">Utilitzar Idioma del Sistema</string>
@ -410,4 +410,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Teilen</string>
<string name="menu_help">Hilfe</string>
<string name="menu_receive">Empfangen</string>
<string name="menu_rename">Umbenennen &#8230;</string>
<string name="menu_rename">Umbenennen</string>
<string name="menu_archive">Archivieren</string>
<string name="menu_backup">Backup</string>
<string name="menu_changepw">Passwort ändern</string>
@ -280,8 +280,8 @@
<string name="tx_account">Konto #</string>
<string name="send_sweepall">Versende ALLE(!) verfügbaren Gelder aus diesem Konto</string>
<string name="tx_subaddress">Subadresse #%1$d</string>
<string name="generate_address_label_sub">Öffentliche Subadresse #%1$d</string>
<string name="tx_subaddress">Subadresse</string>
<string name="generate_address_label_sub">Öffentliche Subadresse #%1$d: %2$s</string>
<string name="menu_language">Sprache</string>
<string name="language_system_default">Benutze Systemsprache</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Μοιράσου</string>
<string name="menu_help">Βοήθεια</string>
<string name="menu_receive">Λήψη</string>
<string name="menu_rename">Μετονομασία &#8230;</string>
<string name="menu_rename">Μετονομασία</string>
<string name="menu_archive">Αρχειοθέτησε</string>
<string name="menu_backup">Δημιουργία αντίγραφου ασφαλείας</string>
@ -280,8 +280,8 @@
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
<string name="tx_subaddress">Subaddress #%1$d</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d</string>
<string name="tx_subaddress">Subaddress</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d: %2$s</string>
<string name="menu_language">Language</string>
<string name="language_system_default">Use System Language</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Kunhavigi</string>
<string name="menu_help">Helpo</string>
<string name="menu_receive">Ricevi</string>
<string name="menu_rename">Renomi &#8230;</string>
<string name="menu_rename">Renomi</string>
<string name="menu_archive">Arkivo</string>
<string name="menu_backup">Sekurkopio</string>
<string name="menu_changepw">Ŝanĝi pasfrazon</string>
@ -287,8 +287,8 @@
<string name="tx_account">Konto #</string>
<string name="send_sweepall">Sendi ĉiujn konfirmitajn monsumojn al tiu konto!</string>
<string name="tx_subaddress">Subadreso #%1$d</string>
<string name="generate_address_label_sub">Publika subadreso #%1$d</string>
<string name="tx_subaddress">Subadreso</string>
<string name="generate_address_label_sub">Publika subadreso #%1$d: %2$s</string>
<string name="menu_language">Lingvo</string>
<string name="language_system_default">Uzi la sistemlingvon</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Compartir</string>
<string name="menu_help">Ayuda</string>
<string name="menu_receive">Recibir</string>
<string name="menu_rename">Renombrar &#8230;</string>
<string name="menu_rename">Renombrar</string>
<string name="menu_archive">Archivar</string>
<string name="menu_backup">Copia de seguridad</string>
<string name="menu_changepw">Cambiar contraseña</string>
@ -269,8 +269,8 @@
<string name="tx_account"># de cuenta</string>
<string name="send_sweepall">¡Enviar todos los fondos confirmados en esta cuenta!</string>
<string name="tx_subaddress">Subdirecciones #%1$d</string>
<string name="generate_address_label_sub">Subdirecciones Públicas #%1$d</string>
<string name="tx_subaddress">Subdirección</string>
<string name="generate_address_label_sub">Subdirecciones Públicas #%1$d: %2$s</string>
<string name="menu_language">Lenguaje</string>
<string name="language_system_default">Usar Idioma del Sistema</string>
@ -334,7 +334,7 @@
<string name="node_testing">Probando el IP: %1$s &#8230;</string>
<string name="node_refresh_wait">Por favor espera a que termine el escaneo</string>
<string name="node_create_hint">Toca para seleccionar o agregar nodos</string>
<string name="node_pull_hint">Agregar nodos manualmente o presiona para escanear</string>
<string name="node_pull_hint">Agrega nodos manualmente o tira para buscar</string>
<string name="node_scanning">Escaneando la red&#8230;</string>
<string name="node_nobookmark">Mejores %1$d nodos marcados automáticamente</string>
<string name="label_test">Probar</string><!--note: as in "Test a network connection"-->
@ -403,4 +403,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Por favor ingresa o escanea una dirección de Monero.</b>
]]></string>
<string name="subbaddress_title">Subdirecciones</string>
<string name="subbaddress_name_hint">Nombre de la subdirección</string>
<string name="max_subaddress_warning">Demasiadas direcciones sin usar. ¡Usa alguna antes de crear más!</string>
<string name="max_account_warning">Demasiadas cuentas sin usar. ¡Usa alguna antes de crear más!</string>
<string name="subaddress_tx_label">Transacciones recibidas en esta subdirección:</string>
<string name="subaddress_notx_label">Aún no hay transacciones recibidas en esta subdirección.</string>
<string name="subaddress_select_label">Elige una subdirección</string>
<string name="subaddress_details_hint">Presiona largo para ver detalles</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Jaga</string>
<string name="menu_help">Abi</string>
<string name="menu_receive">Küsi raha</string>
<string name="menu_rename">Nimeta ümber &#8230;</string>
<string name="menu_rename">Nimeta ümber</string>
<string name="menu_archive">Arhiveeri</string>
<string name="menu_backup">Tagavarakoopia</string>
<string name="menu_changepw">Vaheta parooli</string>
@ -282,8 +282,8 @@
<string name="tx_account">Konto #</string>
<string name="send_sweepall">Saada kõik selle konto kinnitatud vahendid!</string>
<string name="tx_subaddress">Alamaadress #%1$d</string>
<string name="generate_address_label_sub">Avalik alamaadress #%1$d</string>
<string name="tx_subaddress">Alamaadress</string>
<string name="generate_address_label_sub">Avalik alamaadress #%1$d: %2$s</string>
<string name="menu_language">Keel</string>
<string name="language_system_default">Kasuta süsteemi keelt</string>
@ -410,4 +410,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Partage</string>
<string name="menu_help">Aide</string>
<string name="menu_receive">Recevoir</string>
<string name="menu_rename">Renommer &#8230;</string>
<string name="menu_rename">Renommer</string>
<string name="menu_archive">Archiver</string>
<string name="menu_backup">Sauvegarder</string>
<string name="menu_changepw">Modifier Phrase secrète</string>
@ -283,8 +283,8 @@
<string name="tx_account">Compte #</string>
<string name="send_sweepall">Envoyer tous les fonds confirmés sur ce compte !</string>
<string name="tx_subaddress">Sous-adresse #%1$d</string>
<string name="generate_address_label_sub">Sous-adresse publique #%1$d</string>
<string name="tx_subaddress">Sous-adresse</string>
<string name="generate_address_label_sub">Sous-adresse publique #%1$d: %2$s</string>
<string name="fab_restore_ledger">Restaurer depuis Ledger Nano S</string>
@ -416,4 +416,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Megosztás</string>
<string name="menu_help">Segítség</string>
<string name="menu_receive">Fogadás</string>
<string name="menu_rename">Átnevezés&#8230;</string>
<string name="menu_rename">Átnevezés</string>
<string name="menu_archive">Archiválás</string>
<string name="menu_backup">Biztonsági mentés</string>
<string name="menu_changepw">Jelszómódosítás</string>
@ -280,8 +280,8 @@
<string name="tx_account">Számla #</string>
<string name="send_sweepall">Teljes megerősített egyenleg küldése!</string>
<string name="tx_subaddress">Alcím #%1$d</string>
<string name="generate_address_label_sub">Nyilvános alcím #%1$d</string>
<string name="tx_subaddress">Alcím</string>
<string name="generate_address_label_sub">Nyilvános alcím #%1$d: %2$s</string>
<string name="menu_language">Nyelv</string>
<string name="language_system_default">Rendszernyelv használata</string>
@ -414,4 +414,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Condividi</string>
<string name="menu_help">Aiuto</string>
<string name="menu_receive">Ricevi</string>
<string name="menu_rename">Rinomina &#8230;</string>
<string name="menu_rename">Rinomina</string>
<string name="menu_archive">Archivia</string>
<string name="menu_backup">Backup</string>
<string name="menu_changepw">Cambia passphrase</string>
@ -282,8 +282,8 @@
<string name="tx_account">Account #</string>
<string name="send_sweepall">Manda tutti i fondi confermati in questo account!</string>
<string name="tx_subaddress">Sottoindirizzo #%1$d</string>
<string name="generate_address_label_sub">Sottoindirizzo pubblico #%1$d</string>
<string name="tx_subaddress">Sottoindirizzo</string>
<string name="generate_address_label_sub">Sottoindirizzo pubblico #%1$d: %2$s</string>
<string name="menu_language">Lingua</string>
<string name="language_system_default">Usa lingua di sistema</string>
@ -415,4 +415,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">共有</string>
<string name="menu_help">ヘルプ</string>
<string name="menu_receive">受取り</string>
<string name="menu_rename">名前の変更 &#8230;</string>
<string name="menu_rename">名前の変更</string>
<string name="menu_archive">アーカイブ</string>
<string name="menu_backup">バックアップ</string>
<string name="menu_changepw">パスフレーズの変更</string>
@ -287,8 +287,8 @@
<string name="tx_account">アカウント #</string>
<string name="send_sweepall">このアカウントの承認された資産をすべて送金する!</string>
<string name="tx_subaddress">サブアドレス#%1$d</string>
<string name="generate_address_label_sub">公開サブアドレス #%1$d</string>
<string name="tx_subaddress">サブアドレス</string>
<string name="generate_address_label_sub">公開サブアドレス #%1$d: %2$s</string>
<string name="menu_language">言語</string>
<string name="language_system_default">システムの言語を使う</string>
@ -415,4 +415,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Del</string>
<string name="menu_help">Hjelp</string>
<string name="menu_receive">Motta</string>
<string name="menu_rename">Gi nytt navn &#8230;</string>
<string name="menu_rename">Gi nytt navn</string>
<string name="menu_archive">Arkiver</string>
<string name="menu_backup">Backup</string>
<string name="menu_changepw">[Forandre passord]</string>
@ -280,8 +280,8 @@
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
<string name="tx_subaddress">Subaddress #%1$d</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d</string>
<string name="tx_subaddress">Subaddress</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d: %2$s</string>
<string name="menu_language">Language</string>
<string name="language_system_default">Use System Language</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Delen</string>
<string name="menu_help">Help</string>
<string name="menu_receive">Ontvangen</string>
<string name="menu_rename">Hernoemen</string>
<string name="menu_rename">Hernoemen</string>
<string name="menu_archive">Archiveren</string>
<string name="menu_backup">Back-up</string>
<string name="menu_changepw">Wachtzin wijzigen</string>
@ -277,8 +277,8 @@
<string name="tx_account">Accountnr.</string>
<string name="send_sweepall">Al het bevestigde geld in dit account verzenden!</string>
<string name="tx_subaddress">Subadres #%1$d</string>
<string name="generate_address_label_sub">Openbaar subadres #%1$d</string>
<string name="tx_subaddress">Subadres</string>
<string name="generate_address_label_sub">Openbaar subadres #%1$d: %2$s</string>
<string name="menu_language">Taal</string>
<string name="language_system_default">Systeemtaal gebruiken</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Compartilhar</string>
<string name="menu_help">Ajuda</string>
<string name="menu_receive">Receber</string>
<string name="menu_rename">Renomear &#8230;</string>
<string name="menu_rename">Renomear</string>
<string name="menu_archive">Arquivar</string>
<string name="menu_backup">Backup</string>
<string name="menu_changepw">Alterar Senha</string>
@ -279,8 +279,8 @@
<string name="tx_account">Conta #</string>
<string name="send_sweepall">Enviar todo o saldo disponível nesta conta!</string>
<string name="tx_subaddress">Subendereço #%1$d</string>
<string name="generate_address_label_sub">Subendereço público #%1$d</string>
<string name="tx_subaddress">Subendereço</string>
<string name="generate_address_label_sub">Subendereço público #%1$d: %2$s</string>
<string name="menu_language">Idioma</string>
<string name="language_system_default">Usar o idioma do sistema</string>
@ -404,4 +404,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Partilhar</string>
<string name="menu_help">Ajuda</string>
<string name="menu_receive">Receber</string>
<string name="menu_rename">Renomear &#8230;</string>
<string name="menu_rename">Renomear</string>
<string name="menu_archive">Arquivar</string>
<string name="menu_backup">Cópia de segurança</string>
<string name="menu_changepw">Alterar palavra passe</string>
@ -282,8 +282,8 @@
<string name="tx_account">Conta #</string>
<string name="send_sweepall">Enviar todos os fundos confirmados para esta conta!</string>
<string name="tx_subaddress">Subaddress #%1$d</string>
<string name="generate_address_label_sub">Subaddress Publico #%1$d</string>
<string name="tx_subaddress">Subaddress</string>
<string name="generate_address_label_sub">Subaddress Publico #%1$d: %2$s</string>
<string name="menu_language">Linguagem</string>
<string name="language_system_default">Usar linguagem de sistema</string>
@ -416,4 +416,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Împărtășește</string>
<string name="menu_help">Ajutor</string>
<string name="menu_receive">Primește</string>
<string name="menu_rename">Redenumește &#8230;</string>
<string name="menu_rename">Redenumește</string>
<string name="menu_archive">Arhivă</string>
<string name="menu_backup">Backup</string>
@ -280,8 +280,8 @@
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
<string name="tx_subaddress">Subaddress #%1$d</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d</string>
<string name="tx_subaddress">Subaddress</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d: %2$s</string>
<string name="menu_language">Language</string>
<string name="language_system_default">Use System Language</string>
@ -412,4 +412,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Поделиться</string>
<string name="menu_help">Помощь</string>
<string name="menu_receive">Получить</string>
<string name="menu_rename">Переименовать &#8230;</string>
<string name="menu_rename">Переименовать</string>
<string name="menu_archive">Архив</string>
<string name="menu_backup">Резервная копия</string>
<string name="menu_changepw">Изменить пароль</string>
@ -281,8 +281,8 @@
<string name="tx_account">Учетная запись #</string>
<string name="send_sweepall">Отправить все средства на этот счет!</string>
<string name="tx_subaddress">Субадрес #%1$d</string>
<string name="generate_address_label_sub">Публичный субадрес #%1$d</string>
<string name="tx_subaddress">Субадрес</string>
<string name="generate_address_label_sub">Публичный субадрес #%1$d: %2$s</string>
<string name="menu_language">Язык</string>
<string name="language_system_default">Использовать язык системы</string>
@ -416,4 +416,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Zdieľaj</string>
<string name="menu_help">Pomoc</string>
<string name="menu_receive">Prijať</string>
<string name="menu_rename">Premenovať &#8230;</string>
<string name="menu_rename">Premenovať</string>
<string name="menu_archive">Archivovať</string>
<string name="menu_backup">Záloha</string>
<string name="menu_changepw">Zmena Hesla</string>
@ -278,8 +278,8 @@
<string name="tx_account">Účet #</string>
<string name="send_sweepall">Pošli všetky potvrdené prostriedky na tomto účte!</string>
<string name="tx_subaddress">Subadresa #%1$d</string>
<string name="generate_address_label_sub">Verejná Subadresa #%1$d</string>
<string name="tx_subaddress">Subadresa</string>
<string name="generate_address_label_sub">Verejná Subadresa #%1$d: %2$s</string>
<string name="menu_language">Jazyk</string>
<string name="language_system_default">Použi jazyk systému</string>
@ -413,4 +413,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Podeli</string>
<string name="menu_help">Pomoć</string>
<string name="menu_receive">Primi</string>
<string name="menu_rename">Preimenuj &#8230;</string>
<string name="menu_rename">Preimenuj</string>
<string name="menu_archive">Arhiva</string>
<string name="menu_backup">Bekap</string>
<string name="menu_changepw">Promeni lozinku</string>
@ -288,8 +288,8 @@
<string name="tx_account">Račun #</string>
<string name="send_sweepall">Pošalji sva potvrđena sredstva na ovaj račun!</string>
<string name="tx_subaddress">Subadresa #%1$d</string>
<string name="generate_address_label_sub">Javna subadresa #%1$d</string>
<string name="tx_subaddress">Subadresa</string>
<string name="generate_address_label_sub">Javna subadresa #%1$d: %2$s</string>
<string name="menu_language">Jezik</string>
<string name="language_system_default">Koristi sistemski jezik</string>
@ -411,4 +411,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Dela</string>
<string name="menu_help">Hjälp</string>
<string name="menu_receive">Ta emot</string>
<string name="menu_rename">Byt namn</string>
<string name="menu_rename">Byt namn</string>
<string name="menu_archive">Arkivera</string>
<string name="menu_backup">Säkerhetskopiera</string>
<string name="menu_changepw">Ändra lösenfras</string>
@ -271,8 +271,8 @@
<string name="tx_account">Konto #</string>
<string name="send_sweepall">Skicka alla bekräftade pengar i detta konto!</string>
<string name="tx_subaddress">Underadress #%1$d</string>
<string name="generate_address_label_sub">Publik underadress #%1$d</string>
<string name="tx_subaddress">Underadress</string>
<string name="generate_address_label_sub">Publik underadress #%1$d: %2$s</string>
<string name="menu_language">Språk</string>
<string name="language_system_default">Använd systemets språk</string>
@ -404,4 +404,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">Поділитися</string>
<string name="menu_help">Допомога</string>
<string name="menu_receive">Отримати</string>
<string name="menu_rename">Перейменувати &#8230;</string>
<string name="menu_rename">Перейменувати</string>
<string name="menu_archive">Архів</string>
<string name="menu_backup">Резервна копія</string>
<string name="menu_changepw">Змінити пароль</string>
@ -281,8 +281,8 @@
<string name="tx_account">Обліковий запис #</string>
<string name="send_sweepall">Надіслати всі кошти на цей рахунок!</string>
<string name="tx_subaddress">Субадрес #%1$d</string>
<string name="generate_address_label_sub">Публічна субадреса #%1$d</string>
<string name="tx_subaddress">Субадрес</string>
<string name="generate_address_label_sub">Публічна субадреса #%1$d: %2$s</string>
<string name="menu_language">Мова</string>
<string name="language_system_default">Використовувати мову системи</string>
@ -416,4 +416,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -6,7 +6,7 @@
<string name="menu_share">分享</string>
<string name="menu_help">帮助</string>
<string name="menu_receive">收款</string>
<string name="menu_rename">重命名 &#8230;</string>
<string name="menu_rename">重命名</string>
<string name="menu_archive">存档</string>
<string name="menu_backup">备份</string>
<string name="menu_changepw">修改密码</string>
@ -224,8 +224,8 @@
<string name="accounts_new">添加新账户 #%1$d</string>
<string name="tx_account">账户 #</string>
<string name="send_sweepall">发送这个账户中所有已确认的资金!</string>
<string name="tx_subaddress">子地址 #%1$d</string>
<string name="generate_address_label_sub">公开子地址#%1$d</string>
<string name="tx_subaddress">子地址</string>
<string name="generate_address_label_sub">公开子地址#%1$d: %2$s</string>
<string name="menu_language">语言</string>
<string name="language_system_default">使用系统默认语言</string>
<string name="fab_restore_ledger">通过Ledger Nano S恢复</string>
@ -336,4 +336,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>Please enter or scan a Monero address.</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -8,7 +8,7 @@
<string name="menu_share">分享</string>
<string name="menu_help">幫助</string>
<string name="menu_receive">收款</string>
<string name="menu_rename">重新命名 &#8230;</string>
<string name="menu_rename">重新命名</string>
<string name="menu_archive">封存</string>
<string name="menu_backup">備份</string>
<string name="menu_changepw">更改密碼</string>
@ -279,8 +279,8 @@
<string name="tx_account">帳戶 #</string>
<string name="send_sweepall">發送這個帳戶的所有已確認款項!</string>
<string name="tx_subaddress">子地址 #%1$d</string>
<string name="generate_address_label_sub">公開子地址 #%1$d</string>
<string name="tx_subaddress">子地址</string>
<string name="generate_address_label_sub">公開子地址 #%1$d: %2$s</string>
<string name="menu_language">語言</string>
<string name="language_system_default">使用系統語言</string>
@ -411,4 +411,14 @@
<string name="info_xmrto_help_xmr"><![CDATA[
<b>請輸入或掃描一個 Monero 地址。</b>
]]></string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE resources [<!ENTITY nbsp "&#160;">]>
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">
<string name="app_name" translatable="false">monerujo</string>
<string name="wallet_activity_name">Wallet</string>
@ -9,7 +9,7 @@
<string name="menu_share">Share</string>
<string name="menu_help">Help</string>
<string name="menu_receive">Receive</string>
<string name="menu_rename">Rename &#8230;</string>
<string name="menu_rename">Rename</string>
<string name="menu_archive">Archive</string>
<string name="menu_backup">Backup</string>
<string name="menu_changepw">Change Passphrase</string>
@ -325,15 +325,15 @@
<string name="fab_restore_seed">Restore wallet 25 word seed</string>
<string name="accounts_balance" translatable="false">%1$s XMR</string>
<string name="tx_account_formatted" translatable="false">(%1$d, %2$d)</string>
<string name="tx_account_formatted" translatable="false">(%1$d, %2$d) &nbsp;&lt;span style=\"background-color: #%3$s; color: #%4$s;\"&gt;&nbsp;%5$s&nbsp;&lt;/span&gt;</string>
<string name="accounts_drawer_new">Create Account</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
<string name="tx_subaddress">Subaddress #%1$d</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d</string>
<string name="tx_subaddress">Subaddress</string>
<string name="generate_address_label_sub">Public Subaddress #%1$d: %2$s</string>
<string name="menu_language">Language</string>
<string name="language_system_default">Use System Language</string>
@ -474,9 +474,25 @@
<string name="tx_item_transition_name" translatable="false">tx_transition_%1$s</string>
<string name="tx_details_transition_name" translatable="false">tx_transition</string>
<string name="receive_transition_name" translatable="false">receive_transition</string>
<string name="receive_btn_transition_name" translatable="false">receive_btn_transition</string>
<string name="send_transition_name" translatable="false">send_transition</string>
<string name="receive_transition_name" translatable="false">receive_transition</string>
<string name="send_btn_transition_name" translatable="false">send_btn_transition</string>
<string name="send_transition_name" translatable="false">send_transition</string>
<string name="subaddress_item_transition_name" translatable="false">subaddress_transition_%1$d</string>
<string name="subaddress_info_transition_name" translatable="false">subaddress_transition</string>
<string name="subaddress_txinfo_transition_name" translatable="false">subaddress_txinfo_transition</string>
<string name="tx_details_notes" translatable="false">&lt;span style=\"background-color: #%1$s; color: #%2$s;\"&gt;&nbsp;%3$s&nbsp;&lt;/span&gt;%4$s</string>
<string name="receive_subaddress" translatable="false">&lt;span style=\"background-color: #%1$s; color: #%2$s;\"&gt;&nbsp;%3$s&nbsp;&lt;/span&gt;&nbsp;&nbsp;%4$s</string>
<string name="subbaddress_info_subtitle" translatable="false">#%1$d: %2$s</string>
<string name="subbaddress_title">Subaddresses</string>
<string name="subbaddress_name_hint">Subaddress Name</string>
<string name="max_subaddress_warning">Too many unused addresses - use some to enable creating more!</string>
<string name="max_account_warning">Too many unused accounts - use some to enable creating more!</string>
<string name="subaddress_tx_label">Transactions for this subaddress:</string>
<string name="subaddress_notx_label">No transactions for this subaddress yet</string>
<string name="subaddress_select_label">Select a subaddress</string>
<string name="subaddress_details_hint">Long-press for details</string>
</resources>

View File

@ -193,6 +193,11 @@
<item name="android:textSize">18sp</item>
</style>
<style name="MoneroText.Label.Subaddress">
<item name="android:background">@color/monerujoGreen</item>
<item name="android:textColor">@color/monerujoBackground</item>
</style>
<style name="MoneroText.Confirm">
<item name="android:textSize">16sp</item>
</style>

View File

@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.1.3'
}
}