0.5.1: Accessibility fixes for sending transactions

This commit is contained in:
pokkst 2023-12-06 20:19:27 -06:00
parent 36ab440bf5
commit c407b4f69d
No known key found for this signature in database
GPG key ID: EC4FAAA66859FAA4
4 changed files with 20 additions and 6 deletions

View file

@ -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 {

View file

@ -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,13 +143,24 @@ class SendFragment : Fragment() {
sendTxSlider?.onSlideCompleteListener =
object : OnSlideCompleteListener {
override fun onSlideComplete(view: SlideToActView) {
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 {
val dests = rawDests

View file

@ -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"

View file

@ -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>