-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not Working!! #49
Comments
Can you please provide more info? What is happening? What do you expect to happen? |
My guess is that you are missing this in your styles.xml
|
@MarijanGazica I was setting the basic slide and fade transitions programmatically(no xml),but they aren't working,I see no effect |
@s1mar even though you did it programmatically, you still, from my experience, need to add that flag. Also, which version of Android is running on your test device(s)? |
@lgvalle @MarijanGazica the same happened with me. I have set animation via program way, setup flag |
Hello @s1mar I think you have to start the activity with this code
|
@Davids89 Hey, I'm having the same issues, I got the enter animation to work by adding the startActivity parameter but my exit transitions still don't work. Do you know if there is anything else necessary? |
@Davids89 its working with this solution, but on my back press my activity is full grey, without UI |
@Davids89
still not working. @pcegarra try adding the FLAG_ACTIVITY_NO_HISTORY, this will prevent your activity from going into the back stack,hope it works for you |
I've followed every instruction available on the internet and still couldn't get it to work. What I've observed is that on a cold start,you just cant see the enter transition of our launcher activity.Also, if you use a transition activity code,android simply seems to skip through the transition effects and launch the next activity. I believe there is something that you're forgetting to mention or tell us @lgvalle |
I'm having the same issues,setExitTransition(Slide)not working,but the enter return and reenter is working public class OneActivity extends AppCompatActivity implements View.OnClickListener {
private Button mBack;
private Button mNext;
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_one);
setupWindowAnimations();
mBack = findViewById(R.id.btn_back);
mNext = findViewById(R.id.btn_next);
mBack.setOnClickListener(this);
mNext.setOnClickListener(this);
}
private void setupWindowAnimations() {
Slide enter = new Slide();
enter.setDuration(DURATION);
enter.setSlideEdge(Gravity.RIGHT);
enter.setInterpolator(new DecelerateInterpolator());
Slide exit = new Slide();
exit.setDuration(DURATION);
exit.setSlideEdge(Gravity.LEFT);
exit.setInterpolator(new DecelerateInterpolator());
Slide reenter = new Slide();
reenter.setSlideEdge(Gravity.LEFT);
reenter.setDuration(DURATION);
reenter.setInterpolator(new DecelerateInterpolator());
Slide returnT = new Slide();
returnT.setDuration(DURATION);
returnT.setSlideEdge(Gravity.RIGHT);
returnT.setInterpolator(new DecelerateInterpolator());
getWindow().setReenterTransition(reenter);
getWindow().setEnterTransition(enter);
getWindow().setReturnTransition(returnT);
getWindow().setExitTransition(exit);
getWindow().setAllowEnterTransitionOverlap(true);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btn_back:
finishAfterTransition();
break;
case R.id.btn_next:
Intent i = new Intent(this, TowActivity.class);
startActivity(i, ActivityOptionsCompat.makeSceneTransitionAnimation(this).toBundle());
break;
default:
}
}
} please help me,thanks! |
I'm doing this,it is not working for me,any pointers guys
The text was updated successfully, but these errors were encountered: