From 4f0cb3f42f96aac03aeac7835c30073b41b284ba Mon Sep 17 00:00:00 2001 From: chyngyz Date: Wed, 15 Nov 2023 09:28:31 +0600 Subject: [PATCH 1/4] Update API url --- .../bitcoincore/managers/ApiManagerTest.kt | 2 +- .../kotlin/io/horizontalsystems/bitcoinkit/BitcoinKit.kt | 2 +- .../kotlin/io/horizontalsystems/bitcoinkit/RegTest.kt | 8 ++++---- .../io/horizontalsystems/litecoinkit/LitecoinKit.kt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/managers/ApiManagerTest.kt b/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/managers/ApiManagerTest.kt index c30adbd97..29e2177bd 100644 --- a/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/managers/ApiManagerTest.kt +++ b/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/managers/ApiManagerTest.kt @@ -36,7 +36,7 @@ class ApiManagerTest { whenever(url.openConnection()).thenReturn(urlConnection) - apiManager = ApiManager("https://ipfs.horizontalsystems.xyz") + apiManager = ApiManager("https://ipfs.blocksdecoded.com") } @Test diff --git a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/BitcoinKit.kt b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/BitcoinKit.kt index ce5bb1432..46bdb4ab1 100644 --- a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/BitcoinKit.kt +++ b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/BitcoinKit.kt @@ -128,7 +128,7 @@ class BitcoinKit : AbstractKit { MainNet() } NetworkType.TestNet -> { - initialSyncApi = BCoinApi("https://btc-testnet.horizontalsystems.xyz/api") + initialSyncApi = BCoinApi("https://btc-testnet.blocksdecoded.com/api") TestNet() } NetworkType.RegTest -> { diff --git a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/RegTest.kt b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/RegTest.kt index af012ef46..ad064e61c 100644 --- a/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/RegTest.kt +++ b/bitcoinkit/src/main/kotlin/io/horizontalsystems/bitcoinkit/RegTest.kt @@ -22,10 +22,10 @@ class RegTest : Network() { override val syncableFromApi = false override var dnsSeeds = listOf( - "btc-regtest.horizontalsystems.xyz", - "btc01-regtest.horizontalsystems.xyz", - "btc02-regtest.horizontalsystems.xyz", - "btc03-regtest.horizontalsystems.xyz" + "btc-regtest.blocksdecoded.com", + "btc01-regtest.blocksdecoded.com", + "btc02-regtest.blocksdecoded.com", + "btc03-regtest.blocksdecoded.com" ) } diff --git a/litecoinkit/src/main/kotlin/io/horizontalsystems/litecoinkit/LitecoinKit.kt b/litecoinkit/src/main/kotlin/io/horizontalsystems/litecoinkit/LitecoinKit.kt index 25a680a6d..fae1dfef7 100644 --- a/litecoinkit/src/main/kotlin/io/horizontalsystems/litecoinkit/LitecoinKit.kt +++ b/litecoinkit/src/main/kotlin/io/horizontalsystems/litecoinkit/LitecoinKit.kt @@ -90,7 +90,7 @@ class LitecoinKit : AbstractKit { network = when (networkType) { NetworkType.MainNet -> { - initialSyncUrl = "https://ltc.horizontalsystems.xyz/api" + initialSyncUrl = "https://ltc.blocksdecoded.com/api" MainNetLitecoin() } NetworkType.TestNet -> { From e904582a09a4400667434dc6b402114724ffbdb5 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Fri, 27 Oct 2023 15:59:31 +0600 Subject: [PATCH 2/4] Update Gradle and Android Gradle Plugin --- app/build.gradle | 5 ++++- app/src/main/AndroidManifest.xml | 3 +-- bitcoincashkit/build.gradle | 3 +-- bitcoincashkit/src/main/AndroidManifest.xml | 3 +-- bitcoincore/build.gradle | 3 +-- bitcoincore/src/main/AndroidManifest.xml | 3 +-- bitcoinkit/build.gradle | 3 +-- bitcoinkit/src/main/AndroidManifest.xml | 3 +-- build.gradle | 4 ++-- dashkit/build.gradle | 3 +-- dashkit/src/main/AndroidManifest.xml | 3 +-- ecashkit/build.gradle | 3 +-- ecashkit/src/main/AndroidManifest.xml | 2 +- gradle.properties | 3 +++ gradle/wrapper/gradle-wrapper.properties | 4 ++-- hodler/build.gradle | 3 +-- hodler/src/main/AndroidManifest.xml | 3 +-- litecoinkit/build.gradle | 3 +-- litecoinkit/src/main/AndroidManifest.xml | 3 +-- tools/build.gradle | 3 +-- tools/src/main/AndroidManifest.xml | 3 +-- 21 files changed, 28 insertions(+), 38 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fdb2b6fdc..5e702bbf7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,11 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } packagingOptions { - pickFirst("META-INF/atomicfu.kotlin_module") + resources { + pickFirsts += ['META-INF/atomicfu.kotlin_module'] + } } + namespace 'io.horizontalsystems.bitcoinkit.demo' } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ddd7232f1..1d163e801 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/bitcoincashkit/build.gradle b/bitcoincashkit/build.gradle index 45766df64..24012d9e1 100644 --- a/bitcoincashkit/build.gradle +++ b/bitcoincashkit/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "0.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -31,6 +29,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.bitcoincashkit' } dependencies { diff --git a/bitcoincashkit/src/main/AndroidManifest.xml b/bitcoincashkit/src/main/AndroidManifest.xml index 1549bffd7..94cbbcfc3 100644 --- a/bitcoincashkit/src/main/AndroidManifest.xml +++ b/bitcoincashkit/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/bitcoincore/build.gradle b/bitcoincore/build.gradle index 9fd75782e..26e74e9f4 100644 --- a/bitcoincore/build.gradle +++ b/bitcoincore/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "0.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -38,6 +36,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.bitcoincore' } dependencies { diff --git a/bitcoincore/src/main/AndroidManifest.xml b/bitcoincore/src/main/AndroidManifest.xml index e6a4ca8ae..361052066 100644 --- a/bitcoincore/src/main/AndroidManifest.xml +++ b/bitcoincore/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/bitcoinkit/build.gradle b/bitcoinkit/build.gradle index 730d6bb90..712ca5c77 100644 --- a/bitcoinkit/build.gradle +++ b/bitcoinkit/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "0.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -31,6 +29,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.bitcoinkit' } dependencies { diff --git a/bitcoinkit/src/main/AndroidManifest.xml b/bitcoinkit/src/main/AndroidManifest.xml index e549d5325..cf3a4b0bd 100644 --- a/bitcoinkit/src/main/AndroidManifest.xml +++ b/bitcoinkit/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/build.gradle b/build.gradle index b618a906f..9376e49bb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.72' + ext.kotlin_version = '1.6.21' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:8.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/dashkit/build.gradle b/dashkit/build.gradle index f4109d123..d854d4d34 100644 --- a/dashkit/build.gradle +++ b/dashkit/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "0.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -44,6 +42,7 @@ android { path 'cpp/CMakeLists.txt' } } + namespace 'io.horizontalsystems.dashkit' } dependencies { diff --git a/dashkit/src/main/AndroidManifest.xml b/dashkit/src/main/AndroidManifest.xml index 86fb394b6..c4e6c98d7 100644 --- a/dashkit/src/main/AndroidManifest.xml +++ b/dashkit/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/ecashkit/build.gradle b/ecashkit/build.gradle index 9ed4ba0cf..2ba58d15d 100644 --- a/ecashkit/build.gradle +++ b/ecashkit/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "0.4.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -31,6 +29,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.ecashkit' } dependencies { diff --git a/ecashkit/src/main/AndroidManifest.xml b/ecashkit/src/main/AndroidManifest.xml index a4f8edf1c..44008a433 100644 --- a/ecashkit/src/main/AndroidManifest.xml +++ b/ecashkit/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8de505811..a8c570082 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,10 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1b4ca508b..199d187d3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat May 01 16:29:47 EDT 2021 +#Fri Oct 27 15:32:24 KGT 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/hodler/build.gradle b/hodler/build.gradle index 3601b03dd..a96cf96d9 100644 --- a/hodler/build.gradle +++ b/hodler/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' @@ -32,6 +30,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.hodler' } dependencies { diff --git a/hodler/src/main/AndroidManifest.xml b/hodler/src/main/AndroidManifest.xml index e212ac57a..94cbbcfc3 100644 --- a/hodler/src/main/AndroidManifest.xml +++ b/hodler/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/litecoinkit/build.gradle b/litecoinkit/build.gradle index 073a3a8f1..8b0dcb0b0 100644 --- a/litecoinkit/build.gradle +++ b/litecoinkit/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' @@ -32,6 +30,7 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + namespace 'io.horizontalsystems.litecoinkit' } diff --git a/litecoinkit/src/main/AndroidManifest.xml b/litecoinkit/src/main/AndroidManifest.xml index b227848d8..94cbbcfc3 100644 --- a/litecoinkit/src/main/AndroidManifest.xml +++ b/litecoinkit/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + diff --git a/tools/build.gradle b/tools/build.gradle index a83229a36..1d6e4b1fb 100644 --- a/tools/build.gradle +++ b/tools/build.gradle @@ -8,8 +8,6 @@ android { defaultConfig { minSdkVersion 23 targetSdkVersion 29 - versionCode 1 - versionName "1.0" consumerProguardFiles 'consumer-rules.pro' } @@ -20,6 +18,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + namespace 'io.horizontalsystems.tools' } dependencies { diff --git a/tools/src/main/AndroidManifest.xml b/tools/src/main/AndroidManifest.xml index 90813ed82..94cbbcfc3 100644 --- a/tools/src/main/AndroidManifest.xml +++ b/tools/src/main/AndroidManifest.xml @@ -1,2 +1 @@ - + From 57d9bb66f640480010856dabafc021e7a0438652 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Fri, 27 Oct 2023 17:36:48 +0600 Subject: [PATCH 3/4] Update project configs - update kotlin version - update java version - remove kotlin synthetics and Stetho - raise targetSdkVersion, compileSdkVersion --- app/build.gradle | 27 ++++---- app/src/main/AndroidManifest.xml | 4 +- .../horizontalsystems/bitcoinkit/demo/App.kt | 4 -- .../bitcoinkit/demo/BalanceFragment.kt | 3 +- .../bitcoinkit/demo/SendReceiveFragment.kt | 35 ++++++++--- .../bitcoinkit/demo/TransactionsFragment.kt | 5 +- app/src/main/res/layout/fragment_balance.xml | 7 +-- .../main/res/layout/fragment_send_receive.xml | 61 +++++++------------ .../main/res/layout/fragment_transactions.xml | 1 + bitcoincashkit/build.gradle | 10 +-- bitcoincore/build.gradle | 10 +-- .../managers/AccountPublicKeyManager.kt | 4 +- .../bitcoincore/managers/PublicKeyManager.kt | 6 +- .../bitcoincore/managers/SyncManager.kt | 1 + bitcoinkit/build.gradle | 10 +-- build.gradle | 2 +- dashkit/build.gradle | 10 +-- ecashkit/build.gradle | 10 +-- hodler/build.gradle | 11 ++-- litecoinkit/build.gradle | 10 +-- tools/build.gradle | 8 ++- 21 files changed, 122 insertions(+), 117 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5e702bbf7..0bb2da70c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,12 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 29 + compileSdk 34 defaultConfig { applicationId "io.horizontalsystems.bitcoinkit.demo" minSdkVersion 23 - targetSdkVersion 29 + targetSdkVersion 34 versionCode 1 versionName "0.3.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -18,9 +17,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + kotlinOptions { jvmTarget = '17' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } packagingOptions { resources { @@ -34,9 +34,9 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.android.material:material:1.10.0' implementation 'io.reactivex.rxjava2:rxjava:2.2.19' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' @@ -44,15 +44,12 @@ dependencies { // ViewModel and LiveData implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - // For debug - implementation 'com.facebook.stetho:stetho:1.5.1' - //LeakCanary - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' implementation project(':bitcoinkit') implementation project(':dashkit') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1d163e801..68e75920d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,7 +11,9 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/App.kt b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/App.kt index ed70614ad..38ad9349e 100644 --- a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/App.kt +++ b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/App.kt @@ -1,16 +1,12 @@ package io.horizontalsystems.bitcoinkit.demo import android.app.Application -import com.facebook.stetho.Stetho class App : Application() { override fun onCreate() { super.onCreate() - // Enable debug bridge - Stetho.initializeWithDefaults(this) - instance = this } diff --git a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/BalanceFragment.kt b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/BalanceFragment.kt index bfe85c52b..3fac4efde 100644 --- a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/BalanceFragment.kt +++ b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/BalanceFragment.kt @@ -11,7 +11,6 @@ import android.widget.TextView import androidx.appcompat.app.AlertDialog import androidx.lifecycle.ViewModelProvider import io.horizontalsystems.bitcoincore.BitcoinCore -import kotlinx.android.synthetic.main.fragment_balance.* import java.text.SimpleDateFormat import java.util.* @@ -27,6 +26,7 @@ class BalanceFragment : Fragment() { lateinit var startButton: Button lateinit var clearButton: Button lateinit var buttonDebug: Button + lateinit var buttonStatus: Button override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -113,6 +113,7 @@ class BalanceFragment : Fragment() { startButton = view.findViewById(R.id.buttonStart) clearButton = view.findViewById(R.id.buttonClear) buttonDebug = view.findViewById(R.id.buttonDebug) + buttonStatus = view.findViewById(R.id.buttonStatus) startButton.setOnClickListener { viewModel.start() diff --git a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/SendReceiveFragment.kt b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/SendReceiveFragment.kt index 387648eab..c9acd08e2 100644 --- a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/SendReceiveFragment.kt +++ b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/SendReceiveFragment.kt @@ -1,10 +1,7 @@ package io.horizontalsystems.bitcoinkit.demo -import androidx.lifecycle.Observer import android.os.Bundle -import androidx.fragment.app.Fragment import android.text.Editable -import android.text.SpannableStringBuilder import android.text.TextWatcher import android.view.Gravity import android.view.LayoutInflater @@ -12,16 +9,30 @@ import android.view.View import android.view.ViewGroup import android.widget.AdapterView import android.widget.ArrayAdapter +import android.widget.Button +import android.widget.EditText +import android.widget.RadioGroup +import android.widget.Spinner +import android.widget.TextView import android.widget.Toast +import androidx.fragment.app.Fragment +import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider -import io.horizontalsystems.bitcoincore.exceptions.AddressFormatException -import io.horizontalsystems.bitcoincore.managers.SendValueErrors import io.horizontalsystems.hodler.LockTimeInterval -import kotlinx.android.synthetic.main.fragment_send_receive.* class SendReceiveFragment : Fragment() { private lateinit var viewModel: MainViewModel + lateinit var receiveAddressText: TextView + lateinit var receiveAddressButton: Button + lateinit var sendAmount: EditText + lateinit var sendAddress: EditText + lateinit var txFeeValue: TextView + lateinit var sendButton: Button + lateinit var maxButton: Button + lateinit var radioGroup: RadioGroup + lateinit var lockTimePeriodValue: Spinner + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { return inflater.inflate(R.layout.fragment_send_receive, container, false) } @@ -60,6 +71,16 @@ class SendReceiveFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + receiveAddressText = view.findViewById(R.id.receiveAddressText) + receiveAddressButton = view.findViewById(R.id.receiveAddressButton) + sendAmount = view.findViewById(R.id.sendAmount) + sendAddress = view.findViewById(R.id.sendAddress) + txFeeValue = view.findViewById(R.id.txFeeValue) + sendButton = view.findViewById(R.id.sendButton) + maxButton = view.findViewById(R.id.maxButton) + radioGroup = view.findViewById(R.id.radioGroup) + lockTimePeriodValue = view.findViewById(R.id.lockTimePeriodValue) + receiveAddressButton.setOnClickListener { viewModel.onReceiveClick() } @@ -71,7 +92,7 @@ class SendReceiveFragment : Fragment() { maxButton.setOnClickListener { - viewModel.onMaxClick() + viewModel.onMaxClick() } diff --git a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/TransactionsFragment.kt b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/TransactionsFragment.kt index 615b3c1c6..87a0eaa26 100644 --- a/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/TransactionsFragment.kt +++ b/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/TransactionsFragment.kt @@ -21,7 +21,6 @@ import io.horizontalsystems.bitcoincore.models.TransactionOutputInfo import io.horizontalsystems.dashkit.models.DashTransactionInfo import io.horizontalsystems.hodler.HodlerOutputData import io.horizontalsystems.hodler.HodlerPlugin -import kotlinx.android.synthetic.main.fragment_transactions.* import java.text.DateFormat import java.util.* @@ -31,6 +30,8 @@ class TransactionsFragment : Fragment(), ViewHolderTransaction.Listener { private lateinit var transactionsRecyclerView: RecyclerView private val transactionsAdapter = TransactionsAdapter(this) + lateinit var tabs: TabLayout + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -62,6 +63,8 @@ class TransactionsFragment : Fragment(), ViewHolderTransaction.Listener { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + tabs = view.findViewById(R.id.tabs) + transactionsRecyclerView = view.findViewById(R.id.transactions) transactionsRecyclerView.adapter = transactionsAdapter transactionsRecyclerView.layoutManager = LinearLayoutManager(context) diff --git a/app/src/main/res/layout/fragment_balance.xml b/app/src/main/res/layout/fragment_balance.xml index 435741ab4..cc717cbb9 100644 --- a/app/src/main/res/layout/fragment_balance.xml +++ b/app/src/main/res/layout/fragment_balance.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@android:color/white" android:padding="8dp"> + app:layout_constraintTop_toBottomOf="@+id/balanceTitle" /> + tools:text="100.0" /> + android:background="@android:color/white" + android:scrollbars="vertical"> + android:padding="8dp"> + app:layout_constraintTop_toTopOf="parent" />