Skip to content
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

Demo not working #1

Open
bansalayush opened this issue Jun 13, 2019 · 0 comments
Open

Demo not working #1

bansalayush opened this issue Jun 13, 2019 · 0 comments

Comments

@bansalayush
Copy link

Hey , i tried your demo but it's not working . Moreover shouldn't circuit.xml and circuit_detail.xml be any different . on clicking on the image nothing is happening it just sits there . Following is the code

ConstraintLayout constraint;
    AppCompatImageView backgroundImage;

    private static final String TAG = "MainActivity";

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.circuit);

        constraint = findViewById(R.id.constraint);
        backgroundImage = findViewById(R.id.backgroundImage);

        backgroundImage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.d(TAG, "onCLick");

                ConstraintSet constraintSet = new ConstraintSet();
                constraintSet.clone(getBaseContext(),R.layout.circuit_detail);
                ChangeBounds transition = new ChangeBounds();
                transition.setInterpolator(new AnticipateOvershootInterpolator(1.0f));
                transition.setDuration(1200);
                TransitionManager.beginDelayedTransition(constraint, transition);
                constraintSet.applyTo(constraint);
            }
        });
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant