我想用View参数启动一个类 我无法解释,但这是我的班级
public void presentActivity(View view)
{
ActivityOptionsCompat activityOptionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation
(this,view,"transition");
int revealX = (int) (view.getX() + view.getWidth() / 2);
int revealY = (int) (view.getY() + view.getHeight()/ 2);
Intent search = new Intent(this,search_activity.class);
search.putExtra(search_activity.EXTRA_CIRCULAR_REVEAL_X,revealX);
search.putExtra(search_activity.EXTRA_CIRCULAR_REVEAL_Y, revealY);
ActivityCompat.startActivity(this, search, activityOptionsCompat.toBundle());
}
我需要知道如何从
启动presentActivity public boolean onOptionsItemSelected(MenuItem menuItem)
{
return super.onOptionsItemSelected(menuItem);
}
请帮助我,真的需要一种方法来做到这一点;
感谢。