Updated on 2026-08-14
This commit is contained in:
commit
83aaebb422
6 changed files with 48 additions and 52 deletions
|
|
@ -3,8 +3,6 @@ package com.tangem.presentation.dialog;
|
|||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class LoadedWallet : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
val engine=CoinEngineFactory.create(ctx)
|
||||
val engine = CoinEngineFactory.create(ctx)
|
||||
|
||||
tvBalance.setSingleLine(!engine!!.needMultipleLinesForBalance())
|
||||
|
||||
|
|
@ -663,6 +663,8 @@ class LoadedWallet : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback
|
|||
requestCounter++
|
||||
coinEngine!!.requestBalanceAndUnspentTransactions(
|
||||
object : CoinEngine.BlockchainRequestsCallbacks {
|
||||
|
||||
|
||||
override fun onComplete(success: Boolean) {
|
||||
LOG.i(TAG, "requestBalanceAndUnspentTransactions onComplete: $success, request counter $requestCounter")
|
||||
if (activity == null) return
|
||||
|
|
@ -680,7 +682,12 @@ class LoadedWallet : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback
|
|||
}
|
||||
|
||||
override fun allowAdvance(): Boolean {
|
||||
return context?.let { UtilHelper.isOnline(it) }!!
|
||||
return try {
|
||||
context?.let { UtilHelper.isOnline(it) }!!
|
||||
} catch (e: KotlinNullPointerException) {
|
||||
e.printStackTrace()
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:background="#FFFFFF"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.tangem.presentation.activity.LogoActivity"
|
||||
tools:ignore="contentDescription">
|
||||
|
||||
|
|
@ -13,34 +11,39 @@
|
|||
android:id="@+id/ivLogo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:baselineAligned="false"
|
||||
android:src="@drawable/tangem_logo_full_new"/>
|
||||
android:src="@drawable/tangem_logo_full_new"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAppVersion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/beta"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="@android:color/holo_red_light"
|
||||
android:textSize="@dimen/text_size_small"/>
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivLogo" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:gravity="bottom"
|
||||
android:text="@string/smart_cash_ag"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textSize="@dimen/text_size_small"/>
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -88,9 +88,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/maaxmedium"
|
||||
android:text=" "
|
||||
android:textAlignment="center"
|
||||
android:visibility="visible" />
|
||||
android:visibility="visible"
|
||||
tools:text="Verified balance"
|
||||
tools:textColor="@color/confirmed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBalanceLine2"
|
||||
|
|
@ -100,7 +101,6 @@
|
|||
android:fontFamily="@font/maax"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text=" "
|
||||
android:textAlignment="center"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
|
@ -117,12 +117,12 @@
|
|||
android:id="@+id/loWallet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="top|center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_min="wrap"
|
||||
app:layout_constraintTop_toBottomOf="@+id/guideline"
|
||||
android:baselineAligned="false">
|
||||
app:layout_constraintTop_toBottomOf="@+id/guideline">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
|
@ -44,8 +44,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:fontFamily="@font/maaxmedium"
|
||||
android:text="@string/card_id"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -57,8 +57,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:fontFamily="@font/maax"
|
||||
android:text="@string/no_data_string_1"
|
||||
android:textAlignment="center"
|
||||
|
|
@ -71,8 +71,8 @@
|
|||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
|
|
@ -134,7 +134,9 @@
|
|||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/tangem_logo_small_new"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -293,8 +295,8 @@
|
|||
android:id="@+id/view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
|
|
@ -408,8 +410,8 @@
|
|||
android:id="@+id/view3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
|
|
@ -527,8 +529,6 @@
|
|||
android:shadowDx="2"
|
||||
android:shadowDy="2"
|
||||
android:shadowRadius="2"
|
||||
|
||||
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
|
|
@ -537,8 +537,6 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/msg_err"
|
||||
|
|
@ -569,9 +567,9 @@
|
|||
android:id="@+id/imgPIN"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="false"
|
||||
android:layout_alignParentStart="false"
|
||||
android:layout_alignParentEnd="false"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toStartOf="@+id/imgPIN2orSecurityDelay"
|
||||
android:src="@drawable/unlock_pin1" />
|
||||
|
||||
|
|
@ -590,8 +588,8 @@
|
|||
android:id="@+id/imgDeveloperVersion"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="4dp"
|
||||
android:src="@drawable/ic_developer_version" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
Loading…
Add table
Add a link
Reference in a new issue