LoginActivity password max length

This commit is contained in:
Balazs Toldi 2023-07-29 15:37:44 +02:00
parent 442310cad3
commit 20c317b63f
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58
2 changed files with 5 additions and 4 deletions

View File

@ -139,8 +139,8 @@ public class LoginActivity extends BaseActivity {
Log.i("LoginActivity", "Login button clicked");
loginButton.setEnabled(false);
progressBar.setVisibility(ProgressBar.VISIBLE);
String username = username_input.getText().toString();
String instance = correctURL(instance_input.getText().toString());
String username = username_input.getText().toString().trim();
String instance = correctURL(instance_input.getText().toString().trim());
if (!Patterns.WEB_URL.matcher(instance).matches()) {
instance_input.setError("Invalid instance URL");
Toast.makeText(LoginActivity.this, "Invalid instance URL", Toast.LENGTH_SHORT).show();

View File

@ -90,6 +90,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/user_password"
android:maxLength="60"
android:maxLines="1"
android:password="true" />