import android.view.View.OnClickListener;\r
import android.view.View.OnFocusChangeListener;\r
import android.view.Window;\r
+import android.widget.Button;\r
import android.widget.ImageView;\r
import android.widget.TextView;\r
import com.owncloud.android.R;\r
iv2.setOnClickListener(this);\r
tv.setOnFocusChangeListener(this);\r
tv2.setOnFocusChangeListener(this);\r
+\r
+ Button b = (Button) findViewById(R.id.account_register);\r
+ if (b != null) {\r
+ b.setText(String.format(getString(R.string.auth_register), getString(R.string.app_name)));\r
+ }\r
}\r
\r
@Override\r
// NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens\r
}\r
TextView tv = (TextView) findViewById(R.id.account_username);\r
- tv.setError(message);\r
+ tv.setError(message + " "); // the extra spaces are a workaround for an ugly bug: \r
+ // 1. insert wrong credentials and connect\r
+ // 2. put the focus on the user name field with using hardware controls (don't touch the screen); the error is shown UNDER the field\r
+ // 3. touch the user name field; the software keyboard appears; the error popup is moved OVER the field and SHRINKED in width, losing the last word\r
+ // Seen, at least, in Android 2.x devices\r
}\r
}\r
public void onCancelClick(View view) {\r
}\r
\r
public void onRegisterClick(View view) {\r
- Intent register = new Intent(Intent.ACTION_VIEW, Uri.parse("https://owncloud.com/mobile/new"));\r
+ Intent register = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_account_register)));\r
setResult(RESULT_CANCELED);\r
startActivity(register);\r
}\r