@OnClick(R.id.row_browse_activity_adapter_root) protected void onRootViewClick() { if (isDeviceOk()) { activity.startActivity(new Intent(activity, exampleDetail.getActivity())); } else { Snackbar.make( activity.findViewById(android.R.id.content), String.format( activity.getString(R.string.wrong_device_version), exampleDetail.getMinSdk()), Snackbar.LENGTH_LONG) .show(); } }
private boolean isDeviceOk() { return android.os.Build.VERSION.SDK_INT >= exampleDetail.getMinSdk(); }