More styling changes and fixes

This commit is contained in:
pokkst 2022-11-10 23:20:08 -06:00
parent 28a6fbb02c
commit 0c5cd4c3f0
No known key found for this signature in database
GPG Key ID: 90C2ED85E67A50FF
11 changed files with 31 additions and 16 deletions

View File

@ -32,6 +32,7 @@ import net.mynero.wallet.util.DayNightMode;
import net.mynero.wallet.util.Helper;
import net.mynero.wallet.util.NightmodeHelper;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
@ -78,7 +79,7 @@ public class ReceiveBottomSheetDialog extends BottomSheetDialogFragment {
public Bitmap generate(String text, int width, int height) {
if ((width <= 0) || (height <= 0)) return null;
Map<EncodeHintType, Object> hints = new HashMap<>();
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
hints.put(EncodeHintType.CHARACTER_SET, StandardCharsets.UTF_8);
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
try {
BitMatrix bitMatrix = new QRCodeWriter().encode(text, BarcodeFormat.QR_CODE, width, height, hints);
@ -89,7 +90,7 @@ public class ReceiveBottomSheetDialog extends BottomSheetDialogFragment {
if (bitMatrix.get(j, i)) {
pixels[i * width + j] = night ? 0xffffffff : 0x00000000;
} else {
pixels[i * height + j] = getResources().getColor(R.color.oled_txBackgroundColor);
pixels[i * height + j] = getResources().getColor(R.color.oled_dialogBackgroundColor);
}
}
}

View File

@ -2,6 +2,7 @@ package net.mynero.wallet.fragment.transaction;
import static net.mynero.wallet.util.DateHelper.DATETIME_FORMATTER;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -11,6 +12,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
@ -87,7 +89,6 @@ public class TransactionFragment extends Fragment {
txHashTextView.setText(transactionInfo.hash);
txConfTextView.setText("" + transactionInfo.confirmations);
txDateTextView.setText(getDateTime(transactionInfo.timestamp));
txAmountTextView.setText(getResources().getString(R.string.tx_amount_no_prefix, Helper.getDisplayAmount(transactionInfo.amount)));
if(transactionInfo.confirmations > 0) {
blockHeightTextView.setText("" + transactionInfo.blockheight);
blockHeightTextView.setVisibility(View.VISIBLE);
@ -96,6 +97,17 @@ public class TransactionFragment extends Fragment {
blockHeightTextView.setVisibility(View.GONE);
blockHeightLabelTextView.setVisibility(View.GONE);
}
Context ctx = getContext();
if(ctx != null) {
if (transactionInfo.direction == TransactionInfo.Direction.Direction_In) {
txAmountTextView.setTextColor(ContextCompat.getColor(ctx, R.color.oled_positiveColor));
txAmountTextView.setText(getString(R.string.tx_list_amount_positive, Helper.getDisplayAmount(transactionInfo.amount)));
} else {
txAmountTextView.setTextColor(ContextCompat.getColor(ctx, R.color.oled_negativeColor));
txAmountTextView.setText(getString(R.string.tx_list_amount_negative, Helper.getDisplayAmount(transactionInfo.amount)));
}
}
});
mViewModel.destination.observe(getViewLifecycleOwner(), s -> {

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:padding="24dp">

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:padding="24dp">

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:padding="24dp">
<androidx.constraintlayout.widget.ConstraintLayout

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oled_txBackgroundColor">
android:background="@color/oled_dialogBackgroundColor">
<androidx.constraintlayout.widget.ConstraintLayout

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:padding="24dp">

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:fitsSystemWindows="true">

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:background="@color/oled_txBackgroundColor"
android:background="@color/oled_dialogBackgroundColor"
android:padding="24dp">

View File

@ -9,10 +9,10 @@
<color name="oled_streetColorA">@color/oled_gradientTopColor</color>
<color name="oled_streetColorB">@color/oled_gradientBottomColor</color>
<color name="oled_toolbarTextColor">#F4F4F4</color>
<color name="oled_favouriteColor">@color/oled_negativeColor</color>
<color name="oled_favouriteColor">#cb5a2e</color>
<color name="oled_softFavouriteColor">#FF104E</color>
<color name="oled_positiveColor">#3FF3A5</color>
<color name="oled_negativeColor">#cb5a2e</color>
<color name="oled_positiveColor">#19ED60</color>
<color name="oled_negativeColor">#CB2E2E</color>
<color name="oled_neutralColor">#838383</color>
<color name="oled_noticeColor">#7E37F1</color>
<color name="oled_navigationBarColor">@color/oled_colorBackground</color>
@ -30,7 +30,8 @@
<color name="oled_colorOnError">#ffffff</color>
<color name="edittext_bg_color">#202020</color>
<color name="oled_locked_utxo">#956E43</color>
<color name="oled_txBackgroundColor">#0E0E0E</color>
<color name="oled_txBackgroundColor">#060606</color>
<color name="oled_dialogBackgroundColor">#0E0E0E</color>
<!-- CLASSIC -->

View File

@ -11,7 +11,7 @@
<color name="oled_toolbarTextColor">@color/oled_colorOnBackground</color>
<color name="oled_favouriteColor">#FFDB72</color>
<color name="oled_softFavouriteColor">@color/oled_favouriteColor</color>
<color name="oled_positiveColor">#27C79C</color>
<color name="oled_positiveColor">#19ED60</color>
<color name="oled_negativeColor">#f38854</color>
<color name="oled_neutralColor">#171717</color>
<color name="oled_noticeColor">#3DC2FF</color>
@ -31,7 +31,8 @@
<color name="edittext_bg_color">#CCCCCC</color>
<color name="button_disabled_bg_color">#454545</color>
<color name="oled_locked_utxo">#B5895A</color>
<color name="oled_txBackgroundColor">#F1F1F1</color>
<color name="oled_txBackgroundColor">#FBFBFB</color>
<color name="oled_dialogBackgroundColor">#E8E8E8</color>
<!-- CLASSIC -->