Search in sources :

Example 81 with ActivityOptionsCompat

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

the class CaseDetailsActivity method openImageActivity.

@Override
public void openImageActivity(View view, String imagePath) {
    Pair<View, String> bug = new Pair<>(view, "image");
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, bug);
    Intent intent = new Intent(this, FullScreenImageActivity.class);
    Bundle arg = new Bundle();
    arg.putString("img_path", imagePath);
    intent.putExtras(arg);
    ActivityCompat.startActivity(this, intent, options.toBundle());
}
Also used : Bundle(android.os.Bundle) Intent(android.content.Intent) BindView(butterknife.BindView) View(android.view.View) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) Pair(android.support.v4.util.Pair)

Example 82 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project Ruisi by freedom10086.

the class ViewImgActivity method open.

public static void open(Context context, String url) {
    Intent intent = new Intent(context, ViewImgActivity.class);
    intent.putExtra("url", url);
    needAnimate = true;
    ActivityOptionsCompat compat = ActivityOptionsCompat.makeCustomAnimation(context, R.anim.fade_in, R.anim.fade_out);
    ActivityCompat.startActivity(context, intent, compat.toBundle());
}
Also used : Intent(android.content.Intent) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 83 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project FastHub by k0shk0sh.

the class ActivityHelper method start.

@SafeVarargs
public static void start(@NonNull Activity activity, Class cl, Pair<View, String>... sharedElements) {
    Intent intent = new Intent(activity, cl);
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElements);
    activity.startActivity(intent, options.toBundle());
}
Also used : CustomTabsIntent(android.support.customtabs.CustomTabsIntent) Intent(android.content.Intent) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 84 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project FastHub by k0shk0sh.

the class ActivityHelper method start.

public static void start(@NonNull Activity activity, Intent intent, @NonNull View sharedElement) {
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElement, ViewHelper.getTransitionName(sharedElement));
    activity.startActivity(intent, options.toBundle());
}
Also used : ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 85 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project FastHub by k0shk0sh.

the class ActivityHelper method start.

@SafeVarargs
public static void start(@NonNull Activity activity, @NonNull Intent intent, @NonNull Pair<View, String>... sharedElements) {
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElements);
    activity.startActivity(intent, options.toBundle());
}
Also used : ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Aggregations

ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)94 Intent (android.content.Intent)74 View (android.view.View)32 Pair (android.support.v4.util.Pair)18 RecyclerView (android.support.v7.widget.RecyclerView)15 Activity (android.app.Activity)14 ImageView (android.widget.ImageView)14 TextView (android.widget.TextView)13 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