lint: Using android:onClick on older version of the platform is broken

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-09-27 12:53:48 +02:00 committed by Álvaro Brey (Rebase PR Action)
parent 9e5fbf9397
commit 2fc814bf39
2 changed files with 5 additions and 2 deletions

View file

@ -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);
}

View file

@ -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"/>
</LinearLayout>