- Add the required libraries to fetch the merchants data from the web service.

- Create methods to redraw the Balances and NetWorth fragments each time they appear to the user, to temporarily avoid them not displaying correctly after returing from another screen or when changing the theme.
master
Severiano Jaramillo 2018-12-14 14:20:16 -06:00
parent 5ddce2a33f
commit 47e122e46c
4 changed files with 24 additions and 22 deletions

View File

@ -42,30 +42,33 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':graphenejlib:graphenej')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// AndroidX
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
// Google
implementation 'com.google.zxing:core:3.3.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
// AAC Lifecycle
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
// AAC Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version" // RxJava support for Room
// AAC Navigation
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
// Others
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
implementation 'org.bitcoinj:bitcoinj-core:0.14.3'
implementation 'com.moldedbits.r2d2:r2d2:1.0.1'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'com.afollestad.material-dialogs:core:2.0.0-rc3'
// Android Debug Database
debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

View File

@ -45,11 +45,11 @@ class BalancesFragment: Fragment() {
})
}
// override fun setUserVisibleHint(isVisibleToUser: Boolean) {
// super.setUserVisibleHint(isVisibleToUser)
// if (isVisibleToUser) {
// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed
// fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
// }
// }
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser) {
// TODO find a better way to recreate the fragment, that does it only when the theme has been changed
fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
}
}
}

View File

@ -13,7 +13,6 @@ import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.MarkerOptions
import cy.agorise.bitsybitshareswallet.R
import kotlinx.android.synthetic.main.fragment_merchants.*
class MerchantsFragment : Fragment(), OnMapReadyCallback {

View File

@ -18,11 +18,11 @@ class NetWorthFragment: Fragment() {
return inflater.inflate(R.layout.fragment_net_worth, container, false)
}
// override fun setUserVisibleHint(isVisibleToUser: Boolean) {
// super.setUserVisibleHint(isVisibleToUser)
// if (isVisibleToUser) {
// // TODO find a better way to recreate the fragment, that does it only when the theme has been changed
// fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
// }
// }
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser) {
// TODO find a better way to recreate the fragment, that does it only when the theme has been changed
fragmentManager!!.beginTransaction().detach(this).attach(this).commit()
}
}
}