Adding Image Steps Resources Images ID in java or Kotlin file
Java Code to implement Image steps library
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ImageSteps imageSteps = (ImageSteps)findViewById(R.id.imageSteps); // for identifing image steps ID
imageSteps.setScaleUp(4.0f); // setting size if active image steps
imageSteps.setAnimationDuration(1000); // animitation Duration to show image steps images
imageSteps.setSteps(R.drawable.image_one,R.drawable.image_two,R.drawable.image_three); // setting images from drawable
ImageSteps imageSteps = (ImageSteps)findViewById(R.id.imageSteps); // for identifing image steps ID
imageSteps.setScaleUp(4.0f); // setting size if active image steps
imageSteps.setAnimationDuration(1000); // animitation Duration to show image steps images
imageSteps.setSteps(R.drawable.image_one,R.drawable.image_two,R.drawable.image_three); // setting images from drawable
ImageSteps imageSteps = (ImageSteps)findViewById(R.id.imageSteps); // for identifing image steps ID
imageSteps.setScaleUp(4.0f); // setting size if active image steps
imageSteps.setAnimationDuration(1000); // animitation Duration to show image steps images
imageSteps.setSteps(R.drawable.image_one,R.drawable.image_two,R.drawable.image_three); // setting images from drawable
In this above lines of codes we are initialsing image steps by using FindViewById.
setScaleUp() is used to set the size of active image.
setAnimationDuration() is used just to show some animation effect for 1 sec, Here 1000 = 1 sec.
setSteps() is used to set a images for each steps of images, here the number of resources images you will add will be total numbers of steps been added.
[…] Image Steps : Can you used as delivery progress indicator. […]