Comments (10)
Hey, you can simply add SequenceLayout
to your layout programmatically, something like
yourViewGroup.addView(new SequenceLayout(...))
Then you can either add SequenceStep
s to your SequenceLayout
one-by-one, or use a SequenceAdapter
.
from sequence-layout.
@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.
from sequence-layout.
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.
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.
code looks alright to me, could you try adding sequenceLayout.start()
at the end?
from sequence-layout.
@saschoar : It has nothing to do with the steps you see badly, are set badly. See image above.
from sequence-layout.
Hey @Angelk90 , is this problem still happening with the latest version?
from sequence-layout.
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.
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)
- Starting from first point every time when I call start() HOT 4
- Failed to resolve: com.github.transferwise:sequence-layout:1.0.7 HOT 1
- with many items, it doesn't scroll HOT 3
- can we manually decide that when a step will active HOT 6
- how to enlarge the text HOT 2
- setActive() seems to work when called in onCreate but not from Observable callback HOT 2
- vertical progress line now showing in Right to left layout(Arabic) HOT 3
- animation not working first time why? HOT 3
- Library is not importing in new Android Studio Arctic Fox HOT 2
- Unable to Remove Anchor Space HOT 2
- Any way to increase anchor textView width? HOT 6
- Progress bar not shown HOT 3
- Is there a way to use the EditText for this? HOT 2
- Jitpack download issue.
- Is there a way to slow down the animation time of progress HOT 1
- Causes Memory Leak when used in Fragment
- Partial Status HOT 1
- Caused by: java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library HOT 1
- Please realease jar of this library.
- Scroll to particular SequenceStep HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sequence-layout.