mirror of
https://github.com/status-im/keycard-connect.git
synced 2025-01-09 18:45:58 +00:00
fix portrait orientation
This commit is contained in:
parent
0e79fb7b51
commit
c575779b58
@ -1,5 +1,6 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -16,6 +17,7 @@ class ChangePINActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_change_pin)
|
setContentView(R.layout.activity_change_pin)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val pinText = findViewById<EditText>(R.id.newPINText)
|
val pinText = findViewById<EditText>(R.id.newPINText)
|
||||||
val pinConfirmation = findViewById<EditText>(R.id.pinConfirmation)
|
val pinConfirmation = findViewById<EditText>(R.id.pinConfirmation)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -16,6 +17,7 @@ class ChangePUKActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_change_puk)
|
setContentView(R.layout.activity_change_puk)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val pukText = findViewById<EditText>(R.id.newPUKText)
|
val pukText = findViewById<EditText>(R.id.newPUKText)
|
||||||
val pukConfirmation = findViewById<EditText>(R.id.pukConfirmation)
|
val pukConfirmation = findViewById<EditText>(R.id.pukConfirmation)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -16,6 +17,7 @@ class ChangePairingPasswordActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_change_pairing_password)
|
setContentView(R.layout.activity_change_pairing_password)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val pairingPasswordText = findViewById<EditText>(R.id.newPairingPasswordText)
|
val pairingPasswordText = findViewById<EditText>(R.id.newPairingPasswordText)
|
||||||
val pairingPasswordConfirmation = findViewById<EditText>(R.id.pairingPasswordConfirmation)
|
val pairingPasswordConfirmation = findViewById<EditText>(R.id.pairingPasswordConfirmation)
|
||||||
|
@ -2,6 +2,7 @@ package im.status.keycard.connect.ui
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import android.util.Base64.NO_PADDING
|
import android.util.Base64.NO_PADDING
|
||||||
@ -23,6 +24,7 @@ class InitActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_init)
|
setContentView(R.layout.activity_init)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
pin = String.format("%06d", Crypto.randomLong(Crypto.PIN_BOUND))
|
pin = String.format("%06d", Crypto.randomLong(Crypto.PIN_BOUND))
|
||||||
puk = String.format("%012d", Crypto.randomLong(Crypto.PUK_BOUND))
|
puk = String.format("%012d", Crypto.randomLong(Crypto.PUK_BOUND))
|
||||||
|
@ -2,6 +2,7 @@ package im.status.keycard.connect.ui
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
@ -15,6 +16,7 @@ class LoadKeyActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_load_key)
|
setContentView(R.layout.activity_load_key)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
fun generateBIP39(@Suppress("UNUSED_PARAMETER") view: View) {
|
fun generateBIP39(@Suppress("UNUSED_PARAMETER") view: View) {
|
||||||
|
@ -2,6 +2,7 @@ package im.status.keycard.connect.ui
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.nfc.NfcAdapter
|
import android.nfc.NfcAdapter
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
@ -29,6 +30,7 @@ class MainActivity : AppCompatActivity(), ScriptListener, WalletConnectListener
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
viewSwitcher = ViewSwitcher(this)
|
viewSwitcher = ViewSwitcher(this)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val inflater = LayoutInflater.from(this)
|
val inflater = LayoutInflater.from(this)
|
||||||
inflater.inflate(R.layout.activity_main, viewSwitcher)
|
inflater.inflate(R.layout.activity_main, viewSwitcher)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -20,6 +21,7 @@ class PINActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_pin)
|
setContentView(R.layout.activity_pin)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
val attempts = intent.getIntExtra(PIN_ACTIVITY_ATTEMPTS, -1)
|
val attempts = intent.getIntExtra(PIN_ACTIVITY_ATTEMPTS, -1)
|
||||||
cardUID = intent.getByteArrayExtra(PIN_ACTIVITY_CARD_UID)!!
|
cardUID = intent.getByteArrayExtra(PIN_ACTIVITY_CARD_UID)!!
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -19,6 +20,8 @@ class PUKActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_puk)
|
setContentView(R.layout.activity_puk)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val attempts = intent.getIntExtra(PUK_ACTIVITY_ATTEMPTS, -1)
|
val attempts = intent.getIntExtra(PUK_ACTIVITY_ATTEMPTS, -1)
|
||||||
|
|
||||||
val attemptLabel = findViewById<TextView>(R.id.attemptLabel)
|
val attemptLabel = findViewById<TextView>(R.id.attemptLabel)
|
||||||
|
@ -2,6 +2,7 @@ package im.status.keycard.connect.ui
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -16,6 +17,7 @@ class PairingActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_pairing)
|
setContentView(R.layout.activity_pairing)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
val passText = findViewById<EditText>(R.id.passwordText)
|
val passText = findViewById<EditText>(R.id.passwordText)
|
||||||
passText.doAfterTextChanged { findViewById<Button>(R.id.okButton).isEnabled = passText.text.toString().isNotEmpty() }
|
passText.doAfterTextChanged { findViewById<Button>(R.id.okButton).isEnabled = passText.text.toString().isNotEmpty() }
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.CheckBox
|
import android.widget.CheckBox
|
||||||
@ -14,6 +15,7 @@ class ReinstallActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_reinstall)
|
setContentView(R.layout.activity_reinstall)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
fun reinstall(@Suppress("UNUSED_PARAMETER") view: View) {
|
fun reinstall(@Suppress("UNUSED_PARAMETER") view: View) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
@ -11,6 +12,7 @@ class ShowMnemonicActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_show_mnemonic)
|
setContentView(R.layout.activity_show_mnemonic)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val mnemonic = intent.getStringArrayExtra(MNEMONIC_PHRASE)
|
val mnemonic = intent.getStringArrayExtra(MNEMONIC_PHRASE)
|
||||||
val mnemonicView = findViewById<TextView>(R.id.mnemonicView)
|
val mnemonicView = findViewById<TextView>(R.id.mnemonicView)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
@ -13,6 +14,8 @@ class SignMessageActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_sign_message)
|
setContentView(R.layout.activity_sign_message)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
val signText = findViewById<TextView>(R.id.signText)
|
val signText = findViewById<TextView>(R.id.signText)
|
||||||
signText.text = intent.getStringExtra(SIGN_TEXT_MESSAGE)
|
signText.text = intent.getStringExtra(SIGN_TEXT_MESSAGE)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package im.status.keycard.connect.ui
|
package im.status.keycard.connect.ui
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.pm.ActivityInfo
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
@ -16,6 +17,7 @@ class SignTransactionActivity : NoNFCActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_sign_transaction)
|
setContentView(R.layout.activity_sign_transaction)
|
||||||
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||||
|
|
||||||
findViewById<TextView>(R.id.signTxAmount).text = intent.getStringExtra(SIGN_TX_AMOUNT)
|
findViewById<TextView>(R.id.signTxAmount).text = intent.getStringExtra(SIGN_TX_AMOUNT)
|
||||||
findViewById<TextView>(R.id.signTxCurrency).text = intent.getStringExtra(SIGN_TX_CURRENCY)
|
findViewById<TextView>(R.id.signTxCurrency).text = intent.getStringExtra(SIGN_TX_CURRENCY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user