Fixed bug: toast message infinitely repeated
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / AuthenticatorActivity.java
index c26c004..7321f6a 100644 (file)
@@ -54,6 +54,7 @@ import android.view.View;
 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
@@ -125,6 +126,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         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
@@ -299,7 +305,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     }\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