mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-12-22 05:00:24 +00:00
0.5.1: Accessibility fixes for sending transactions
This commit is contained in:
parent
36ab440bf5
commit
c407b4f69d
4 changed files with 20 additions and 6 deletions
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId "net.mynero.wallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 34
|
||||
versionCode 50000
|
||||
versionName "0.5.0 'Fluorine Fermi'"
|
||||
versionCode 50100
|
||||
versionName "0.5.1 'Fluorine Fermi'"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.widget.TextView
|
|||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.google.zxing.client.android.Intents
|
||||
|
@ -142,12 +143,23 @@ class SendFragment : Fragment() {
|
|||
sendTxSlider?.onSlideCompleteListener =
|
||||
object : OnSlideCompleteListener {
|
||||
override fun onSlideComplete(view: SlideToActView) {
|
||||
val pendingTx = mViewModel?.pendingTransaction?.value ?: return
|
||||
Toast.makeText(activity, getString(R.string.sending_tx), Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
sendTx(pendingTx)
|
||||
confirmSlider()
|
||||
}
|
||||
}
|
||||
|
||||
sendTxSlider?.let { slideToActView ->
|
||||
ViewCompat.addAccessibilityAction(slideToActView, getString(R.string.approve_the_transaction)) { _, _ ->
|
||||
confirmSlider()
|
||||
return@addAccessibilityAction true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun confirmSlider() {
|
||||
val pendingTx = mViewModel?.pendingTransaction?.value ?: return
|
||||
Toast.makeText(activity, getString(R.string.sending_tx), Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
sendTx(pendingTx)
|
||||
}
|
||||
|
||||
private fun checkDestsValidity(sendAll: Boolean): Boolean {
|
||||
|
|
|
@ -213,6 +213,7 @@
|
|||
android:layout_marginBottom="24dp"
|
||||
android:elevation="6dp"
|
||||
android:visibility="gone"
|
||||
android:importantForAccessibility="yes"
|
||||
app:area_margin="10dp"
|
||||
app:border_radius="20dp"
|
||||
app:inner_color="@android:color/white"
|
||||
|
|
|
@ -155,5 +155,6 @@
|
|||
<string name="copy_transaction_addr">Copy transaction address</string>
|
||||
<string name="seed_desc_polyseed">16 words instead of 25; just as secure, but not supported in as many wallets right now. In Mysu, seed passphrase is enforced for these wallets.</string>
|
||||
<string name="seed_desc_legacy">Older, 25 word seed; supported in all Monero wallets. In Mysu, seed passphrase is not enforced for these wallets.</string>
|
||||
<string name="approve_the_transaction">Send transaction</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue