Search in sources :

Example 41 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project Music-Player by andremion.

the class MainActivity method onFabClick.

public void onFabClick(View view) {
    // noinspection unchecked
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, new Pair<>(mCoverView, ViewCompat.getTransitionName(mCoverView)), new Pair<>(mTitleView, ViewCompat.getTransitionName(mTitleView)), new Pair<>(mTimeView, ViewCompat.getTransitionName(mTimeView)), new Pair<>(mDurationView, ViewCompat.getTransitionName(mDurationView)), new Pair<>(mProgressView, ViewCompat.getTransitionName(mProgressView)), new Pair<>(mFabView, ViewCompat.getTransitionName(mFabView)));
    ActivityCompat.startActivity(this, new Intent(this, DetailActivity.class), options.toBundle());
}
Also used : Intent(android.content.Intent) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 42 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project android-page-transition by xmuSistone.

the class CommonFragment method gotoDetail.

@Override
public void gotoDetail() {
    Activity activity = (Activity) getContext();
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, new Pair(imageView, DetailActivity.IMAGE_TRANSITION_NAME), new Pair(address1, DetailActivity.ADDRESS1_TRANSITION_NAME), new Pair(address2, DetailActivity.ADDRESS2_TRANSITION_NAME), new Pair(address3, DetailActivity.ADDRESS3_TRANSITION_NAME), new Pair(address4, DetailActivity.ADDRESS4_TRANSITION_NAME), new Pair(address5, DetailActivity.ADDRESS5_TRANSITION_NAME), new Pair(ratingBar, DetailActivity.RATINGBAR_TRANSITION_NAME), new Pair(head1, DetailActivity.HEAD1_TRANSITION_NAME), new Pair(head2, DetailActivity.HEAD2_TRANSITION_NAME), new Pair(head3, DetailActivity.HEAD3_TRANSITION_NAME), new Pair(head4, DetailActivity.HEAD4_TRANSITION_NAME));
    Intent intent = new Intent(activity, DetailActivity.class);
    intent.putExtra(DetailActivity.EXTRA_IMAGE_URL, imageUrl);
    ActivityCompat.startActivity(activity, intent, options.toBundle());
}
Also used : Activity(android.app.Activity) Intent(android.content.Intent) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) Pair(android.support.v4.util.Pair)

Example 43 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project EffectiveAndroid by rallat.

the class TopImagesListActivity method onClick.

private void onClick(View view) {
    int position = recyclerView.getChildLayoutPosition(view);
    Image data = adapter.getItem(position);
    View innerContainer = view.findViewById(R.id.container_inner_item);
    Intent startIntent = new Intent(this, ImageActivity.class);
    startIntent.putExtra(ImageActivity.EXTRA_IMAGE, data);
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, innerContainer, ImageActivity.TRANSITION_SHARED_ELEMENT);
    ActivityCompat.startActivity(this, startIntent, options.toBundle());
}
Also used : Intent(android.content.Intent) Image(com.israelferrer.effectiveandroid.entities.Image) ImageRecyclerView(com.israelferrer.effectiveandroid.ui.recycler.ImageRecyclerView) RecyclerView(android.support.v7.widget.RecyclerView) TopImagesListView(com.israelferrer.effectiveandroid.ui.views.TopImagesListView) View(android.view.View) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 44 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project mosby by sockeqwe.

the class DetailsFragment method onReplayClicked.

@OnClick(R.id.replay)
public void onReplayClicked() {
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(getActivity(), replayView, getString(R.string.shared_write_action));
    intentStarter.showWriteMail(getActivity(), mail, options.toBundle());
}
Also used : ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) OnClick(butterknife.OnClick)

Example 45 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project bugzy by cpunq.

the class CaseEditActivity method openImageActivity.

public void openImageActivity(View v, String filePath) {
    Pair<View, String> bug = new Pair<>(v, "image");
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, bug);
    Intent intent = new Intent(this, FullScreenImageActivity.class);
    Bundle arg = new Bundle();
    arg.putString("img_path", filePath);
    intent.putExtras(arg);
    ActivityCompat.startActivity(this, intent, options.toBundle());
}
Also used : Bundle(android.os.Bundle) Intent(android.content.Intent) BindView(butterknife.BindView) NachoTextView(com.hootsuite.nachos.NachoTextView) View(android.view.View) AdapterView(android.widget.AdapterView) ImagePickerSheetView(com.flipboard.bottomsheet.commons.ImagePickerSheetView) TextView(android.widget.TextView) RecyclerView(android.support.v7.widget.RecyclerView) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) Pair(android.support.v4.util.Pair)

Aggregations

ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)92 Intent (android.content.Intent)72 View (android.view.View)31 Pair (android.support.v4.util.Pair)18 ImageView (android.widget.ImageView)15 TextView (android.widget.TextView)14 RecyclerView (android.support.v7.widget.RecyclerView)13 Activity (android.app.Activity)12 OnClick (butterknife.OnClick)7 ActivityOptions (android.app.ActivityOptions)4 Context (android.content.Context)4 Bundle (android.os.Bundle)4 Handler (android.os.Handler)4 BindView (butterknife.BindView)4 CardView (android.support.v7.widget.CardView)3 Explode (android.transition.Explode)3 AdapterView (android.widget.AdapterView)3 LinearLayout (android.widget.LinearLayout)3 Uri (android.net.Uri)2 LayoutInflater (android.view.LayoutInflater)2