use of android.transition.Explode in project MaterialLogin by fanrunqi.
the class LoginSuccessActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login_success);
Explode explode = new Explode();
explode.setDuration(500);
getWindow().setExitTransition(explode);
getWindow().setEnterTransition(explode);
}
use of android.transition.Explode in project MaterialLogin by fanrunqi.
the class MainActivity method setListener.
private void setListener() {
btGo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Explode explode = new Explode();
explode.setDuration(500);
getWindow().setExitTransition(explode);
getWindow().setEnterTransition(explode);
ActivityOptionsCompat oc2 = ActivityOptionsCompat.makeSceneTransitionAnimation(MainActivity.this);
Intent i2 = new Intent(MainActivity.this, LoginSuccessActivity.class);
startActivity(i2, oc2.toBundle());
}
});
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getWindow().setExitTransition(null);
getWindow().setEnterTransition(null);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, fab, fab.getTransitionName());
startActivity(new Intent(MainActivity.this, RegisterActivity.class), options.toBundle());
}
});
}
use of android.transition.Explode in project MusicLake by caiyonglong.
the class CommentActivity method initView.
@Override
protected void initView() {
send_comment.setClickable(true);
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (SystemUtils.isLollipop()) {
getWindow().setEnterTransition(new Explode());
}
adapter = new CommentAdapter(getApplicationContext(), comments);
mRecyclerView.setAdapter(adapter);
LinearLayoutManager mLinearLayoutManager = new LinearLayoutManager(this);
mLinearLayoutManager.setSmoothScrollbarEnabled(true);
mRecyclerView.setLayoutManager(mLinearLayoutManager);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setNestedScrollingEnabled(false);
secret_id = getIntent().getStringExtra(Extras.SECRET_ID);
user_id = getIntent().getStringExtra(Extras.USER_ID);
Log.e("rrr", secret_id + "====" + user_id);
getComment(secret_id);
}
use of android.transition.Explode in project Douya by DreaminginCodeZH.
the class TransitionUtils method setEnterReturnExplode.
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static void setEnterReturnExplode(Fragment fragment) {
if (!shouldEnableTransition()) {
return;
}
Window window = fragment.getActivity().getWindow();
Transition explode = new Explode().excludeTarget(android.R.id.statusBarBackground, true).excludeTarget(android.R.id.navigationBarBackground, true);
window.setEnterTransition(explode);
window.setReturnTransition(explode);
}
use of android.transition.Explode in project MaterialLogin by fanrunqi.
the class AActivityOne method setListener.
private void setListener() {
btGo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Explode explode = new Explode();
explode.setDuration(500);
getWindow().setExitTransition(explode);
getWindow().setEnterTransition(explode);
ActivityOptionsCompat oc2 = ActivityOptionsCompat.makeSceneTransitionAnimation(AActivityOne.this);
Intent i2 = new Intent(AActivityOne.this, AActivityThree.class);
startActivity(i2, oc2.toBundle());
}
});
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getWindow().setExitTransition(null);
getWindow().setEnterTransition(null);
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(AActivityOne.this, fab, fab.getTransitionName());
startActivity(new Intent(AActivityOne.this, AActivityTwo.class), options.toBundle());
}
});
}
Aggregations