@Test public void preConditions() { ImageDetailActivity activity = activityRule.launchActivity(intent); onView(withId(R.id.container)) .check(matches(ViewMatchers.withContentDescription(R.string.detail_container))); String args = activity.getIntent().getStringExtra(ImageDetailActivity.EXTRA_CONTENT); assertEquals(args, DataHolder.LIST_ITEM_JSON); }
@Override public void enterImageDetails( String sharedImageTransitionName, File imageFile, ImageView image, Image imageModel) { // ActivityOptions options = // ActivityOptions.makeSceneTransitionAnimation(this,image,sharedImageTransitionName); int[] los = new int[2]; image.getLocationOnScreen(los); ActivityOptions options1 = ActivityOptions.makeScaleUpAnimation( image, image.getWidth() / 2, image.getHeight() / 2, 0, 0); getWindow().setSharedElementEnterTransition(new ChangeImageTransform(this, null)); Intent intent = ImageDetailActivity.getStartIntent(this, sharedImageTransitionName, imageFile); startActivity(intent, options1.toBundle()); }