setActive is not working
Closed this issue · 3 comments
csaq7151 commented
Hi,
I need to set the steps dynamically to active or not depending on a status.
So I thought I set it programatically. But the setActive is not working.
However setTitle works fine. What is wrong with this code?
I dont want to use the Adapter if there is another way.
SequenceStep step_accepted;
step_accepted = rootView.findViewById(R.id.stepAccepted);
step_accepted.setActive(true);
xml
<com.transferwise.sequencelayout.SequenceLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.transferwise.sequencelayout.SequenceStep
android:id="@+id/stepAccepted"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:anchor="13:50"
app:title="@string/status_layout_order_accepted"
app:subtitle="@string/status_layout_order_accepted_subtitle"
app:subtitleTextAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
/>
</com.transferwise.sequencelayout.SequenceLayout>
saschoar commented
Hey, could you try running sequenceLayout.start()
after setting the active step programmatically? And, if you had another step set to active before, call .setActive(false)
on that previous step?
csaq7151 commented
@saschoar awesome thanks for the quick help. Calling sequenceLayout.start()
worked!
pratikbutani commented
@saschoar so I have to call start() everytime when I active next step?
I have 25 steps, can you please tell me step to active it step by step.