Search in sources :

Example 6 with SharedElementCallback

use of android.app.SharedElementCallback in project android_frameworks_base by crdroidandroid.

the class ActivityTransition method setupHero.

private void setupHero() {
    String name = getIntent().getStringExtra(KEY_ID);
    mHero = null;
    if (name != null) {
        mHero = (ImageView) findViewById(getIdForKey(name));
        setEnterSharedElementCallback(new SharedElementCallback() {

            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                sharedElements.put("hero", mHero);
            }
        });
    }
}
Also used : SharedElementCallback(android.app.SharedElementCallback) ImageView(android.widget.ImageView) View(android.view.View)

Example 7 with SharedElementCallback

use of android.app.SharedElementCallback in project platform_frameworks_base by android.

the class ActivityTransition method setupHero.

private void setupHero() {
    String name = getIntent().getStringExtra(KEY_ID);
    mHero = null;
    if (name != null) {
        mHero = (ImageView) findViewById(getIdForKey(name));
        setEnterSharedElementCallback(new SharedElementCallback() {

            @Override
            public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {
                sharedElements.put("hero", mHero);
            }
        });
    }
}
Also used : SharedElementCallback(android.app.SharedElementCallback) ImageView(android.widget.ImageView) View(android.view.View)

Aggregations

SharedElementCallback (android.app.SharedElementCallback)7 View (android.view.View)7 ImageView (android.widget.ImageView)5 RecyclerView (android.support.v7.widget.RecyclerView)3 TextView (android.widget.TextView)3 BindView (butterknife.BindView)3 ArrayList (java.util.ArrayList)3 ActivityOptions (android.app.ActivityOptions)2 BadgedFourThreeImageView (io.plaidapp.ui.widget.BadgedFourThreeImageView)2 List (java.util.List)2 Intent (android.content.Intent)1 NonNull (android.support.annotation.NonNull)1 CustomTabsIntent (android.support.customtabs.CustomTabsIntent)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 SpannableString (android.text.SpannableString)1 Toolbar (android.widget.Toolbar)1 Bypass (in.uncod.android.bypass.Bypass)1 Comment (io.plaidapp.data.api.designernews.model.Comment)1 Story (io.plaidapp.data.api.designernews.model.Story)1 AuthorTextView (io.plaidapp.ui.widget.AuthorTextView)1