release 0.1 #30

Manually merged
noemi3 merged 150 commits from release/0.1 into master 2020-01-18 14:59:02 +00:00
Showing only changes of commit ac590e418d - Show all commits

View File

@ -3,6 +3,7 @@ package it.unisannio.ding.ids.wedroid.app.view
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.webkit.URLUtil
import android.widget.Toast
import it.unisannio.ding.ids.wedroid.app.R
import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper
@ -39,10 +40,17 @@ class LoginActivity : AppCompatActivity() {
val userNameText = username.text.toString()
val passwordText = password.text.toString()
val instanceServerText = instanceServer.text.toString()
if (!URLUtil.isValidUrl(instanceServerText)){
Toast.makeText(this, "Formato URL non valido", Toast.LENGTH_LONG)
.show()
return
}
val service = Retrofit.Builder()
.addConverterFactory(GsonConverterFactory.create())
.baseUrl(instanceServer.text.toString())
.baseUrl(instanceServerText)
.build()
.create(LoginService::class.java)