From: masensio Date: Tue, 25 Jun 2013 12:13:04 +0000 (+0200) Subject: OC-460:URL-input GONE. OC-394 X-Git-Tag: oc-android-1.4.3~5^2~7 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/2df8f56e5edc1b3a2c750099f58c30730a6a14c9?ds=inline;hp=--cc OC-460:URL-input GONE. OC-394 --- 2df8f56e5edc1b3a2c750099f58c30730a6a14c9 diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 3c34be61..ce704ca4 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -143,6 +143,8 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList private TextView mOAuthTokenEndpointText; private boolean mRefreshButtonEnabled; + + private boolean mHostUrlInputEnabled; /** @@ -165,6 +167,9 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList mOAuth2Check = (CheckBox) findViewById(R.id.oauth_onOff_check); mOkButton = findViewById(R.id.buttonOK); mAuthStatusLayout = (TextView) findViewById(R.id.auth_status_text); + + /// set Host Url Input Enabled + mHostUrlInputEnabled = getResources().getBoolean(R.bool.show_server_url_input); /// complete label for 'register account' button Button b = (Button) findViewById(R.id.account_register); @@ -178,6 +183,12 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList mAction = getIntent().getByteExtra(EXTRA_ACTION, ACTION_CREATE); mAccount = null; mHostBaseUrl = ""; + if (!mHostUrlInputEnabled) + { + mHostUrlInput.setText(getString(R.string.server_url)); + mHostUrlInput.setVisibility(View.GONE); + checkOcServer(); + } if (savedInstanceState == null) { /// connection state and info @@ -451,6 +462,11 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList private void checkOcServer() { String uri = trimUrlWebdav(mHostUrlInput.getText().toString().trim()); + + if (!mHostUrlInputEnabled){ + uri = getString(R.string.server_url); + } + mServerIsValid = false; mServerIsChecked = false; mOkButton.setEnabled(false);