Search in sources :

Example 6 with Explode

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);
}
Also used : Explode(android.transition.Explode)

Example 7 with 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());
        }
    });
}
Also used : Explode(android.transition.Explode) Intent(android.content.Intent) CardView(android.support.v7.widget.CardView) View(android.view.View) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) ActivityOptions(android.app.ActivityOptions)

Example 8 with Explode

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);
}
Also used : Explode(android.transition.Explode) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 9 with Explode

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);
}
Also used : Window(android.view.Window) Explode(android.transition.Explode) Transition(android.transition.Transition) TargetApi(android.annotation.TargetApi)

Example 10 with 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());
        }
    });
}
Also used : Explode(android.transition.Explode) Intent(android.content.Intent) CardView(android.support.v7.widget.CardView) View(android.view.View) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) ActivityOptions(android.app.ActivityOptions)

Aggregations

Explode (android.transition.Explode)19 ActivityOptions (android.app.ActivityOptions)3 Intent (android.content.Intent)3 ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)3 Fade (android.transition.Fade)3 TargetApi (android.annotation.TargetApi)2 Point (android.graphics.Point)2 CardView (android.support.v7.widget.CardView)2 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 RecyclerView (android.support.v7.widget.RecyclerView)2 Slide (android.transition.Slide)2 View (android.view.View)2 AbsListView (android.widget.AbsListView)2 SampleListener (com.example.gsyvideoplayer.listener.SampleListener)2 ColorDrawable (android.graphics.drawable.ColorDrawable)1 Toolbar (android.support.v7.widget.Toolbar)1 Transition (android.transition.Transition)1 Window (android.view.Window)1 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)1 OnClick (butterknife.OnClick)1