mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-25 00:42:32 +00:00
More styling changes and fixes
This commit is contained in:
parent
28a6fbb02c
commit
0c5cd4c3f0
11 changed files with 31 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 -> {
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
|
@ -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 -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue