Search in sources :

Example 1 with ChangeBounds

use of android.transition.ChangeBounds in project Fragmentation by YoKeyword.

the class DetailTransition method init.

private void init() {
    setOrdering(ORDERING_TOGETHER);
    addTransition(new ChangeBounds()).addTransition(new ChangeTransform()).addTransition(new ChangeImageTransform());
}
Also used : ChangeTransform(android.transition.ChangeTransform) ChangeBounds(android.transition.ChangeBounds) ChangeImageTransform(android.transition.ChangeImageTransform)

Example 2 with ChangeBounds

use of android.transition.ChangeBounds in project Material-Movies by saulmm.

the class TransitionUtils method makeSharedElementEnterTransition.

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static Transition makeSharedElementEnterTransition(Context context) {
    Transition changeBounds = new ChangeBounds();
    changeBounds.addTarget(R.id.item_movie_cover);
    return changeBounds;
}
Also used : ChangeBounds(android.transition.ChangeBounds) Transition(android.transition.Transition) TargetApi(android.annotation.TargetApi)

Example 3 with ChangeBounds

use of android.transition.ChangeBounds in project BottomSheet by soarcn.

the class BottomSheet method showFullItems.

private void showFullItems() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Transition changeBounds = new ChangeBounds();
        changeBounds.setDuration(300);
        TransitionManager.beginDelayedTransition(list, changeBounds);
    }
    actions = fullMenuItem;
    updateSection();
    adapter.notifyDataSetChanged();
    list.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
    icon.setVisibility(View.VISIBLE);
    icon.setImageDrawable(close);
    icon.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            showShortItems();
        }
    });
    setListLayout();
}
Also used : ChangeBounds(android.transition.ChangeBounds) Transition(android.transition.Transition) GridView(android.widget.GridView) ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) LinearLayout(android.widget.LinearLayout)

Example 4 with ChangeBounds

use of android.transition.ChangeBounds in project platform_frameworks_base by android.

the class ContactsExpansion method addContact.

private void addContact(ViewGroup container, int dataIndex, int thumbnailID) {
    LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View contactItem = inflater.inflate(R.layout.contact_collapsed, container, false);
    ImageView thumbnailView = (ImageView) contactItem.findViewById(R.id.contact_picture);
    thumbnailView.setImageResource(thumbnailID);
    ((TextView) contactItem.findViewById(R.id.contact_name)).setText(contactsData[dataIndex++]);
    ((TextView) contactItem.findViewById(R.id.contact_street)).setText(contactsData[dataIndex++]);
    ((TextView) contactItem.findViewById(R.id.contact_city)).setText(contactsData[dataIndex++]);
    ((TextView) contactItem.findViewById(R.id.contact_phone)).setText(contactsData[dataIndex++]);
    ((TextView) contactItem.findViewById(R.id.contact_email)).setText(contactsData[dataIndex++]);
    container.addView(contactItem);
    final TransitionSet myTransition = new TransitionSet();
    myTransition.addTransition(new Fade(Fade.IN)).addTransition(new Rotate().addTarget(R.id.contact_arrow)).addTransition(new ChangeBounds()).addTransition(new Fade(Fade.OUT)).addTransition(new Crossfade().addTarget(R.id.contact_picture));
    final ToggleScene toggleScene = new ToggleScene(container, myTransition);
    contactItem.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            currentItem = v;
            toggleScene.changeToScene();
        }
    });
}
Also used : Rotate(android.transition.Rotate) TransitionSet(android.transition.TransitionSet) ChangeBounds(android.transition.ChangeBounds) LayoutInflater(android.view.LayoutInflater) Crossfade(android.transition.Crossfade) TextView(android.widget.TextView) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) View(android.view.View) Fade(android.transition.Fade)

Example 5 with ChangeBounds

use of android.transition.ChangeBounds in project platform_frameworks_base by android.

the class CrossFadeDemo method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.crossfade);
    View container = (View) findViewById(R.id.container);
    mSceneRoot = (ViewGroup) container.getParent();
    mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.crossfade, this);
    mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.crossfade_1, this);
    Crossfade crossfade = new Crossfade();
    crossfade.setFadeBehavior(Crossfade.FADE_BEHAVIOR_CROSSFADE);
    crossfade.setResizeBehavior(Crossfade.RESIZE_BEHAVIOR_NONE);
    crossfade.addTarget(R.id.textview).addTarget(R.id.textview1).addTarget(R.id.textview2);
    mTransitionManager = new TransitionManager();
    TransitionSet moveCrossFade = new TransitionSet();
    moveCrossFade.addTransition(crossfade).addTransition(new ChangeBounds());
    mTransitionManager.setTransition(mScene1, moveCrossFade);
    mTransitionManager.setTransition(mScene2, moveCrossFade);
    mCurrentScene = 1;
}
Also used : TransitionManager(android.transition.TransitionManager) TransitionSet(android.transition.TransitionSet) ChangeBounds(android.transition.ChangeBounds) Crossfade(android.transition.Crossfade) View(android.view.View)

Aggregations

ChangeBounds (android.transition.ChangeBounds)93 TransitionSet (android.transition.TransitionSet)71 View (android.view.View)54 Fade (android.transition.Fade)46 TransitionManager (android.transition.TransitionManager)28 Crossfade (android.transition.Crossfade)20 Recolor (android.transition.Recolor)20 ViewGroup (android.view.ViewGroup)17 Transition (android.transition.Transition)14 ChangeText (android.transition.ChangeText)12 TextView (android.widget.TextView)9 Scene (android.transition.Scene)8 Button (android.widget.Button)8 ImageView (android.widget.ImageView)7 AutoTransition (android.transition.AutoTransition)5 AdapterView (android.widget.AdapterView)5 LinearLayout (android.widget.LinearLayout)5 ChangeImageTransform (android.transition.ChangeImageTransform)4 ChangeTransform (android.transition.ChangeTransform)4 Rotate (android.transition.Rotate)4