Giter VIP home page Giter VIP logo

Comments (10)

saschoar avatar saschoar commented on June 1, 2024

Hey, you can simply add SequenceLayout to your layout programmatically, something like

yourViewGroup.addView(new SequenceLayout(...))

Then you can either add SequenceSteps to your SequenceLayout one-by-one, or use a SequenceAdapter.

from sequence-layout.

Angelk90 avatar Angelk90 commented on June 1, 2024

@saschoar :
I did this:

SequenceLayout sequenceLayout = new SequenceLayout(context);

How can I add the various steps?

If you would like to reconvert the example you proposed here:
https://github.com/transferwise/sequence-layout#in-xml-layout

Use java not kotlin.

from sequence-layout.

Angelk90 avatar Angelk90 commented on June 1, 2024

from sequence-layout.

saschoar avatar saschoar commented on June 1, 2024

How can I add the various steps?

You would have to do something like sequenceLayout.addView(new SequenceStep(...)) then.

If you're finished adding your steps, call sequenceLayout.start() to start the animation to the active step.

from sequence-layout.

Angelk90 avatar Angelk90 commented on June 1, 2024
        SequenceLayout sequenceLayout = new SequenceLayout(reactContext.getCurrentActivity());
        sequenceLayout.setProgressBackgroundColor(Color.parseColor("#cccccc"));
        sequenceLayout.setProgressForegroundColor(Color.parseColor("#3872e0"));

        SequenceStep sequenceStepFirst = new SequenceStep(reactContext.getCurrentActivity());
        sequenceStepFirst.setAnchor("30 Nov");
        sequenceStepFirst.setTitle("First step");

        SequenceStep sequenceStepSecond = new SequenceStep(reactContext.getCurrentActivity());
        sequenceStepSecond.setTitle("Second step");

        SequenceStep sequenceStepThird = new SequenceStep(reactContext.getCurrentActivity());
        sequenceStepThird.setActive(true);
        sequenceStepThird.setAnchor("Today");
        sequenceStepThird.setSubtitle("This is the subtitle of this step.\\nIt should describe steps (especially the active step) in a detailed way.");
        sequenceStepThird.setTitle("Third step");

        SequenceStep sequenceStepFourth = new SequenceStep(reactContext.getCurrentActivity());
        sequenceStepFourth.setTitle("Fourth step");

        SequenceStep sequenceStepFifth = new SequenceStep(reactContext.getCurrentActivity());
        sequenceStepFifth.setAnchor("2 Dec");
        sequenceStepFifth.setTitle("Fifth step");

        sequenceLayout.addView(sequenceStepFirst);
        sequenceLayout.addView(sequenceStepSecond);
        sequenceLayout.addView(sequenceStepThird);
        sequenceLayout.addView(sequenceStepFourth);
        sequenceLayout.addView(sequenceStepFifth);

        final FrameLayout frameLayout = new FrameLayout(reactContext.getCurrentActivity());
        frameLayout.addView(sequenceLayout);

@saschoar : I did this, but as you can see the effect obtained is that in the image above.
I get a strange problem with the line sequences.

from sequence-layout.

saschoar avatar saschoar commented on June 1, 2024

code looks alright to me, could you try adding sequenceLayout.start() at the end?

from sequence-layout.

Angelk90 avatar Angelk90 commented on June 1, 2024

@saschoar : It has nothing to do with the steps you see badly, are set badly. See image above.

from sequence-layout.

saschoar avatar saschoar commented on June 1, 2024

Hey @Angelk90 , is this problem still happening with the latest version?

from sequence-layout.

github-actions avatar github-actions commented on June 1, 2024

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from sequence-layout.

github-actions avatar github-actions commented on June 1, 2024

This issue has now been closed. Please raise a new Issue instead of re-opening existing ones, unless you believe this was closed by accident.

from sequence-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.