Exemplo n.º 1
0
 @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();
   }
 }
Exemplo n.º 2
0
 private boolean isDeviceOk() {
   return android.os.Build.VERSION.SDK_INT >= exampleDetail.getMinSdk();
 }