use of android.transition.ChangeBounds in project LookLook by xinghongfei.
the class MeiziPhotoDescribeActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_picture);
ButterKnife.bind(this);
parseIntent();
getData();
setupPhotoAttacher();
mToolbar.setAlpha(0.7f);
mRelativeLayout.setAlpha(0.3f);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().getSharedElementEnterTransition().addListener(mListener);
getWindow().setSharedElementEnterTransition(new ChangeBounds());
// setStatusColor();
}
}
use of android.transition.ChangeBounds in project LookLook by xinghongfei.
the class ZhihuDescribeActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.zhihudescribe);
ButterKnife.bind(this);
mDeviceInfo = DensityUtil.getDeviceInfo(this);
width = mDeviceInfo[0];
heigh = width * 3 / 4;
setSupportActionBar(mToolbar);
initlistenr();
initData();
initView();
getData();
chromeFader = new ElasticDragDismissFrameLayout.SystemChromeFader(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().getSharedElementReturnTransition().addListener(zhihuReturnHomeListener);
getWindow().setSharedElementEnterTransition(new ChangeBounds());
}
enterAnimation();
}
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());
}
use of android.transition.ChangeBounds in project android_frameworks_base by ResurrectionRemix.
the class CrossfadeMultiple method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.crossfade_multiple);
ViewGroup container = (ViewGroup) findViewById(R.id.container);
mSceneRoot = container;
mButton = (Button) findViewById(R.id.button);
mImageView = (ImageView) findViewById(R.id.imageview);
mTextView = (TextView) findViewById(R.id.textview);
mCrossfade = new Crossfade();
mCrossfade.addTarget(R.id.button).addTarget(R.id.textview).addTarget(R.id.imageview);
mCrossfadeGroup = new TransitionSet();
mCrossfadeGroup.setDuration(300);
mCrossfadeGroup.addTransition(mCrossfade).addTransition(new ChangeBounds());
mTransition = mCrossfadeGroup;
mInOutGroup = new TransitionSet();
Crossfade inOut = new Crossfade();
inOut.setDuration(300);
inOut.setFadeBehavior(Crossfade.FADE_BEHAVIOR_OUT_IN);
ChangeBounds changeBounds = new ChangeBounds();
changeBounds.setStartDelay(150);
changeBounds.setDuration(0);
mInOutGroup.addTransition(inOut).addTransition(changeBounds);
mTextChangeGroup1 = new TransitionSet();
ChangeText changeTextInOut = new ChangeText();
changeTextInOut.setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT_IN);
mTextChangeGroup1.addTransition(changeTextInOut).addTransition(new ChangeBounds());
mTextChangeGroup2 = new TransitionSet();
mTextChangeGroup2.setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
ChangeText changeTextOut = new ChangeText();
changeTextOut.setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT);
mTextChangeGroup2.addTransition(changeTextOut).addTransition(new ChangeBounds());
mTextChangeGroup3 = new TransitionSet();
mTextChangeGroup3.setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
ChangeText changeTextIn = new ChangeText();
changeTextIn.setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_IN);
mTextChangeGroup3.addTransition(changeTextIn).addTransition(new ChangeBounds());
}
use of android.transition.ChangeBounds in project android_frameworks_base by ResurrectionRemix.
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();
}
});
}
Aggregations