From efca13b58fbe940a041e818bcafb43a39070aed4 Mon Sep 17 00:00:00 2001 From: vadym Date: Thu, 2 Jul 2020 10:53:00 -0700 Subject: [PATCH] 1. minor GUI fixes --- .../github/chronosx88/yggdrasil/PeerListActivity.kt | 13 ++++++++----- app/src/main/res/layout/new_peer_dialog.xml | 6 ++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt index 8c1875c..67d0e86 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/PeerListActivity.kt @@ -133,13 +133,17 @@ class PeerListActivity : AppCompatActivity() { this.resources.configuration.locale.country } var schemaInput = view.findViewById(R.id.schemaInput) + var ipInput = view.findViewById(R.id.ipInput) + ipInput.requestFocus() schemaInput.showSoftInputOnFocus = false schemaInput.setOnFocusChangeListener { v, b -> if(schemaInput.isFocused) { - val height = -1 * v.height +30 - getAddressListPopup()?.showAsDropDown(v, -10, height) + onClickSchemaList(v) } } + schemaInput.setOnClickListener { v-> + onClickSchemaList(v) + } getPopupWindow(R.layout.spinner_item, resources.getStringArray(R.array.schemas), schemaInput, getString(R.string.schema)); var ccp = view.findViewById(R.id.ccp) ccp.setCountryForNameCode(countryCode) @@ -148,7 +152,6 @@ class PeerListActivity : AppCompatActivity() { var ad = ab.show() var addButton = view.findViewById