diff --git a/src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java b/src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java index 8eb68e5aea..779556038b 100644 --- a/src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java +++ b/src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java @@ -115,6 +115,10 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh hostOwnServerTextView.setTextColor(getResources().getColor(R.color.login_text_color)); hostOwnServerTextView.setVisibility(isProviderOrOwnInstallationVisible ? View.VISIBLE : View.GONE); + if(!isProviderOrOwnInstallationVisible) { + hostOwnServerTextView.setOnClickListener(v -> onHostYourOwnServerClick()); + } + progressIndicator = findViewById(R.id.progressIndicator); ViewPager viewPager = findViewById(R.id.contentPanel); @@ -200,7 +204,7 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh // unused but to be implemented due to abstract parent } - public void onHostYourOwnServerClick(View view) { + public void onHostYourOwnServerClick() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_server_install))); DisplayUtils.startIntentIfAppAvailable(intent, this, R.string.no_browser_available); } diff --git a/src/main/res/layout/first_run_activity.xml b/src/main/res/layout/first_run_activity.xml index ad764b9d44..0935b92667 100644 --- a/src/main/res/layout/first_run_activity.xml +++ b/src/main/res/layout/first_run_activity.xml @@ -101,7 +101,6 @@ android:layout_marginBottom="10dp" android:layout_marginTop="10dp" android:gravity="center_horizontal" - android:onClick="onHostYourOwnServerClick" android:text="@string/host_your_own_server"/>