Comments (6)
If you want that functionality I must code it π and add next button into layout
from steppers.
But that Previous button completes the idea of this library. It would be great if you do that. Thanks!
from steppers.
Hi, In the SteppersAdapter.java file add the below code
private void previousStep() {
if(this.currentStep > 0){
this.removeStep = currentStep;
this.beforeStep = currentStep;
this.currentStep = this.currentStep - 1;
Log.e("Library", "remove : "+removeStep+" before : "+beforeStep + "cureent : "+ currentStep);
notifyItemRangeChanged(removeStep, currentStep);
notifyItemChanged(currentStep);
} else Toast.makeText(context,"Cant go back on this one", Toast.LENGTH_SHORT).show();
}
And change this method
if(config.getOnCancelAction() != null)
holder.buttonCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
config.getOnCancelAction().onCancel();
previousStep();
}
});
from steppers.
I'll put that code in my project. Anyway thanks man!
from steppers.
@Sehalsein can you make Pull Request?
from steppers.
Hello guys,
There is no need to check if current position > 0, However you should add in the the bindViewHolder method another condition because there is no need to show the previous button if we are in the first step
if (position == 0) holder.buttonCancel.setVisibility(View.GONE);
The previousStep() method should now then be like this: (Note that the method notifyItemRangeChanged(removeStep, 1) is the right one AND NOT notifyItemRangeChanged(removeStep, currentStep) )
` private void previousStep() {
this.removeStep = currentStep;
this.beforeStep = currentStep;
this.currentStep = this.currentStep - 1;
Log.e("Library", "remove : "+removeStep+" before : "+beforeStep + "current : "+ currentStep);
notifyItemRangeChanged(removeStep, 1);
notifyItemChanged(currentStep);
}`
Finally, we might also change the text of the cancel button to "Previous" instead of "Cancel".
from steppers.
Related Issues (20)
- Reset the view again HOT 1
- Color options HOT 7
- Add data dynamically to Next Step
- Step Fragment doesn't show in Release HOT 1
- issues while double clicking on button
- NullPointerException in drawChecked HOT 1
- get edittext value HOT 2
- Screenshots in the README are dead
- Is there a way to keep track of userΒ΄s progress ? HOT 6
- Change Button Label HOT 3
- Load custom current position in the stepper? HOT 1
- Modify text size of the Label and Sublabel
- Questions duplicate HOT 2
- Is it possible if I need to modify and implements to time line on one day?
- Android Studio can't resolve the library. HOT 5
- My stepper app has crashed
- Vertical Recycler does not get scrolled inside the layout HOT 2
- Adding third fragment to the list returns null pointer exception. HOT 7
- allow jump to random step
- Override continue button? and Previous button? HOT 4
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 steppers.