mirror of
https://codeberg.org/r4v3r23/mysu.git
synced 2024-11-22 22:02:25 +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"
|
applicationId "net.mynero.wallet"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 34
|
targetSdkVersion 34
|
||||||
versionCode 50000
|
versionCode 50100
|
||||||
versionName "0.5.0 'Fluorine Fermi'"
|
versionName "0.5.1 'Fluorine Fermi'"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import com.google.zxing.client.android.Intents
|
import com.google.zxing.client.android.Intents
|
||||||
|
@ -142,13 +143,24 @@ class SendFragment : Fragment() {
|
||||||
sendTxSlider?.onSlideCompleteListener =
|
sendTxSlider?.onSlideCompleteListener =
|
||||||
object : OnSlideCompleteListener {
|
object : OnSlideCompleteListener {
|
||||||
override fun onSlideComplete(view: SlideToActView) {
|
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
|
val pendingTx = mViewModel?.pendingTransaction?.value ?: return
|
||||||
Toast.makeText(activity, getString(R.string.sending_tx), Toast.LENGTH_SHORT)
|
Toast.makeText(activity, getString(R.string.sending_tx), Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
sendTx(pendingTx)
|
sendTx(pendingTx)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkDestsValidity(sendAll: Boolean): Boolean {
|
private fun checkDestsValidity(sendAll: Boolean): Boolean {
|
||||||
val dests = rawDests
|
val dests = rawDests
|
||||||
|
|
|
@ -213,6 +213,7 @@
|
||||||
android:layout_marginBottom="24dp"
|
android:layout_marginBottom="24dp"
|
||||||
android:elevation="6dp"
|
android:elevation="6dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:importantForAccessibility="yes"
|
||||||
app:area_margin="10dp"
|
app:area_margin="10dp"
|
||||||
app:border_radius="20dp"
|
app:border_radius="20dp"
|
||||||
app:inner_color="@android:color/white"
|
app:inner_color="@android:color/white"
|
||||||
|
|
|
@ -155,5 +155,6 @@
|
||||||
<string name="copy_transaction_addr">Copy transaction address</string>
|
<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_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="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>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue