Updated on 2026-08-14

This commit is contained in:
Tangem 2019-02-04 22:40:47 +03:00
parent aad9d9479b
commit 3c8806f9c7
4 changed files with 17 additions and 9 deletions

View file

@ -45,20 +45,20 @@ android {
dependencies {
def lifecycle_version = "2.0.0"
def spongycastle_version = "1.56.0.0"
implementation project(':tangemcard-common')
implementation project(':tangemcard-android')
implementation project(':tangemserver-android')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.dagger:dagger:2.16'
implementation 'com.google.zxing:core:3.3.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.madgag.spongycastle:core:1.56.0.0'
implementation 'com.madgag.spongycastle:prov:1.56.0.0'
implementation "com.madgag.spongycastle:core:$spongycastle_version"
implementation "com.madgag.spongycastle:prov:$spongycastle_version"
implementation 'com.scottyab:rootbeer-lib:0.0.7'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
@ -75,5 +75,4 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
}

View file

@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Intent
import android.nfc.NfcAdapter
import android.nfc.Tag
import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import android.text.Editable
@ -50,7 +51,10 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
val engine = CoinEngineFactory.create(ctx)
val html = Html.fromHtml(engine!!.balanceHTML)
@Suppress("DEPRECATION") val html = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
Html.fromHtml(engine!!.balanceHTML, Html.FROM_HTML_MODE_LEGACY)
else
Html.fromHtml(engine!!.balanceHTML)
tvBalance.text = html
isIncludeFee = intent.getBooleanExtra(Constant.EXTRA_FEE_INCLUDED, true)
@ -75,7 +79,7 @@ class ConfirmTransactionActivity : AppCompatActivity(), NfcAdapter.ReaderCallbac
btnSend.visibility = View.INVISIBLE
val allowFeeLevelSelection = engine!!.allowSelectFeeLevel()
val allowFeeLevelSelection = engine.allowSelectFeeLevel()
for (lol in rgFee.touchables) {
lol.isEnabled = allowFeeLevelSelection
}

View file

@ -65,10 +65,10 @@ class PrepareCryptonitWithdrawalActivity : AppCompatActivity(), NfcAdapter.Reade
val imm = lv.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(lv.windowToken, 0)
true
} else {
} else
false
}
}
when (ctx.blockchain) {
Blockchain.Bitcoin -> {
etAmount.filters = arrayOf<InputFilter>(DecimalDigitsInputFilter(5))

View file

@ -4,6 +4,7 @@ import android.app.Activity
import android.content.Intent
import android.nfc.NfcAdapter
import android.nfc.Tag
import android.os.Build
import android.os.Bundle
import androidx.core.content.ContextCompat
import android.text.Html
@ -257,7 +258,11 @@ class VerifyCard : androidx.fragment.app.Fragment(), NfcAdapter.ReaderCallback {
tvIssuer.text = ctx.card!!.issuerDescription
tvCardRegistredDate.text = DateUtils.formatDateTime(null, ctx.card!!.personalizationDateTime.time, DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_NUMERIC_DATE or DateUtils.FORMAT_SHOW_YEAR)
val html = Html.fromHtml(ctx.blockchainName)
@Suppress("DEPRECATION") val html = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
Html.fromHtml(ctx.blockchainName, Html.FROM_HTML_MODE_LEGACY)
else
Html.fromHtml(ctx.blockchainName)
tvBlockchain.text = html
tvValidationNode.text = ctx.coinData!!.validationNodeDescription