1. #36. URL default value fix

This commit is contained in:
vadym 2020-12-07 09:46:45 +02:00
parent 5a4074b868
commit 22db3c2343
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ android {
applicationId "io.github.chronosx88.yggdrasil"
minSdkVersion 15
targetSdkVersion 30
versionCode 9
versionCode 10
versionName "1.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", project.getParent().name+"-"+versionName)

View File

@ -213,8 +213,10 @@ class PeerListActivity : AppCompatActivity() {
ab.setCancelable(true).setView(view)
var ad = ab.show()
var saveButton = view.findViewById<Button>(R.id.save)
var urlInput = view.findViewById<TextView>(R.id.urlInput)
urlInput.text = peerListUrl
saveButton.setOnClickListener{
var urlInput = view.findViewById<TextView>(R.id.urlInput)
var url = urlInput.text.toString()
if(!URLUtil.isValidUrl(url)){
urlInput.error = "The URL is invalid!"