checkpoint: build
This commit is contained in:
parent
c7712f58eb
commit
bca3fcf804
|
@ -87,8 +87,8 @@ internal object SynchronizerModule {
|
|||
object Properties {
|
||||
val COMPACT_BLOCK_SERVER = Servers.ZCASH_TESTNET.host
|
||||
const val COMPACT_BLOCK_PORT = 9067
|
||||
const val CACHE_DB_NAME = "wallet_cache19.db"
|
||||
const val DATA_DB_NAME = "wallet_data19.db"
|
||||
const val CACHE_DB_NAME = "wallet_cache21.db"
|
||||
const val DATA_DB_NAME = "wallet_data21.db"
|
||||
val SEED_PROVIDER = SampleSeedProvider("dummyseed")
|
||||
}
|
||||
|
||||
|
|
|
@ -108,18 +108,19 @@ class HomeFragment : BaseFragment(), HomePresenter.HomeView {
|
|||
onCancelActiveTransaction()
|
||||
}
|
||||
|
||||
// refresh_layout.setOnRefreshListener {
|
||||
// val fauxRefresh = Random.nextLong(750L..3000L)
|
||||
// refresh_layout.postDelayed({
|
||||
// refresh_layout.isRefreshing = false
|
||||
// }, fauxRefresh)
|
||||
// }
|
||||
refresh_layout.setOnRefreshListener {
|
||||
val fauxRefresh = Random.nextLong(750L..3000L)
|
||||
refresh_layout.postDelayed({
|
||||
refresh_layout.isRefreshing = false
|
||||
}, fauxRefresh)
|
||||
}
|
||||
|
||||
launch {
|
||||
setFirstRunShown(mainActivity.synchronizer.isFirstRun())
|
||||
}
|
||||
|
||||
// refresh_layout.setProgressViewEndTarget(false, (86f * resources.displayMetrics.density).toInt())
|
||||
header_active_transaction.visibility = View.GONE
|
||||
refresh_layout.setProgressViewEndTarget(false, (86f * resources.displayMetrics.density).toInt())
|
||||
}
|
||||
|
||||
private fun setFirstRunShown(isShown: Boolean) {
|
||||
|
@ -228,9 +229,11 @@ class HomeFragment : BaseFragment(), HomePresenter.HomeView {
|
|||
var subtitle = "Processing..."
|
||||
when (transactionState) {
|
||||
TransactionState.Creating -> {
|
||||
title = "Preparing ${transaction.value.toZec(2)} ZEC"
|
||||
header_active_transaction.visibility = View.VISIBLE
|
||||
title = "Preparing ${transaction.value.toZec(3)} ZEC"
|
||||
subtitle = "to ${(transaction as ActiveSendTransaction).toAddress}"
|
||||
button_active_transaction_cancel.text = "cancel"
|
||||
setActiveTransactionRaised(true)
|
||||
}
|
||||
TransactionState.SendingToNetwork -> {
|
||||
title = "Sending Transaction"
|
||||
|
@ -353,10 +356,14 @@ class HomeFragment : BaseFragment(), HomePresenter.HomeView {
|
|||
}
|
||||
|
||||
private fun onCancelActiveTransaction() {
|
||||
button_active_transaction_cancel.isEnabled = false
|
||||
setActiveTransactionRaised(false)
|
||||
button_active_transaction_cancel.text = "cancel"
|
||||
}
|
||||
|
||||
private fun setActiveTransactionRaised(isRaised: Boolean) {
|
||||
button_active_transaction_cancel.isEnabled = isRaised
|
||||
header_active_transaction.animate().apply {
|
||||
translationZ(0f)
|
||||
translationZ(if (isRaised) 10f else 0f)
|
||||
duration = 200L
|
||||
interpolator = AccelerateInterpolator()
|
||||
setListener(object : Animator.AnimatorListener {
|
||||
|
@ -364,7 +371,9 @@ class HomeFragment : BaseFragment(), HomePresenter.HomeView {
|
|||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
header_active_transaction.setBackgroundResource(0)
|
||||
header_active_transaction.apply {
|
||||
if(translationZ == 0f) setBackgroundResource(0)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAnimationCancel(animation: Animator?) {
|
||||
|
@ -375,9 +384,9 @@ class HomeFragment : BaseFragment(), HomePresenter.HomeView {
|
|||
|
||||
} )
|
||||
}
|
||||
homePresenter.onCancelActiveTransaction()
|
||||
}
|
||||
|
||||
|
||||
inner class HomeTransitionListener : Transition.TransitionListener {
|
||||
override fun onTransitionStart(transition: Transition) {
|
||||
onActiveTransactionTransitionStart()
|
||||
|
|
|
@ -42,15 +42,15 @@ class SendFragment : BaseFragment(), SendPresenter.SendView {
|
|||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
val enterTransitionSet = TransitionInflater.from(mainActivity).inflateTransition(R.transition.transition_zec_sent).apply {
|
||||
duration = 3500L
|
||||
}
|
||||
|
||||
this.sharedElementReturnTransition = enterTransitionSet
|
||||
this.sharedElementEnterTransition = enterTransitionSet
|
||||
|
||||
this.allowReturnTransitionOverlap = false
|
||||
allowEnterTransitionOverlap = false
|
||||
// val enterTransitionSet = TransitionInflater.from(mainActivity).inflateTransition(R.transition.transition_zec_sent).apply {
|
||||
// duration = 3500L
|
||||
// }
|
||||
//
|
||||
// this.sharedElementReturnTransition = enterTransitionSet
|
||||
// this.sharedElementEnterTransition = enterTransitionSet
|
||||
//
|
||||
// this.allowReturnTransitionOverlap = false
|
||||
// allowEnterTransitionOverlap = false
|
||||
0
|
||||
return DataBindingUtil.inflate<FragmentSendBinding>(
|
||||
inflater, R.layout.fragment_send, container, false
|
||||
|
@ -126,7 +126,14 @@ class SendFragment : BaseFragment(), SendPresenter.SendView {
|
|||
sendPresenter.stop()
|
||||
}
|
||||
|
||||
override fun submit(){
|
||||
override fun submit() {
|
||||
mainActivity.navController.navigate(R.id.nav_home_fragment,
|
||||
null,
|
||||
null,
|
||||
FragmentNavigatorExtras(binding.dialogTextTitle to "transition_active_transaction_title"))
|
||||
}
|
||||
|
||||
fun submitOld() {
|
||||
var extras = with(binding) {
|
||||
listOf(dialogSendBackground, dialogSendContents, dialogTextTitle, dialogTextAddress)
|
||||
.map{ it to it.transitionName }
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
android:fillViewport="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<!--<androidx.swiperefreshlayout.widget.SwipeRefreshLayout-->
|
||||
<!--android:id="@+id/refresh_layout"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/refresh_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/content_home"
|
||||
|
@ -156,5 +156,5 @@
|
|||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="image_empty_wallet,text_wallet_message" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!--</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>-->
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
Loading…
Reference in New Issue