shripal17 / MaterialIntroView-v2

Beautiful and highly customisable material-design based android library to help your users get started with your awesome app!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ideas

RGregat opened this issue · comments

Hey,
I'm using currently your version of the MaterialIntroView to add several IntroTours in my App. First of all, the sequences are awesome. But it would be nice to skip a tour. I know you can set dismissOnTouch to true, but this will dismiss the tour immediately. A callback to have the option to show a dialog would be nice.
And the dotview, it is nice to change the color, but it is not possible to set an alpha value. If you use the Intro mainly to explain Icons and Buttons, it is a little bit annoying to see an animated dot over the icon which is explained (even with the option to set the icon in the infobox).
Well both are actually simple to implement, I guess. But I'm more a Java guy than a Kotlin guy. Maybe these are changes you are also interested in and be able to do it quick. If not, well I fork it and try my best to do it by myself ;).

Hey,

  1. I am right now working on adding a skip button, would you like to contribute some ideas on it's appearance and customizations?

  2. I did not get why do you want a dialog?

  3. I will see what I can do about setting alpha value on the dotview

  4. I will try to add separate README for java implementation too

I have just published version 2.1.1, please check the releases page for full changelog

Hey sorry for my Absence. Thx for the update.
Is it actually possible to stop an ongoing sequence?

Hey sorry for my Absence. Thx for the update.
Is it actually possible to stop an ongoing sequence?

Yes, I have added experimental support for the skip button, please do try it out and give feedback

Ah yeah I noticed the skip button. I meant a programmatical way to just say, ok stop from here because something else happened (an event, display shut off, etc.).
For the skip button. I get it only after a second run of my sequences. But then I have the problem that the initial delay is not working.

First time:

  • No skip button but with initial delay

Second time:

  • Skip button but no initial delay

The creation process is always the same

Can you please post your code snippet here for the same?

I wrote a wrapper with an additional model to configure a intro tour. The execution function looks like this

/**
* <pre>
*     Setup a new IntroSequence and start it afterwards.
* </pre>
*/
public void executeIntro() {
   MaterialIntroSequence materialIntroSequence = MaterialIntroSequence.Companion.getInstance(mFragmentActivity);

   for (IntroTour introTour : mIntroTourList) {
      MaterialIntroConfiguration introConfiguration = new MaterialIntroConfiguration();
      introConfiguration.setDelayMillis(introTour.getDelay());
      introConfiguration.setTargetView(introTour.getTargetView());
      introConfiguration.setInfoText(introTour.getIntroText());
      introConfiguration.setShowOnlyOnce(introTour.isShowOnlyOnce());
      introConfiguration.setHelpIconResource(introTour.getHelpIconResource());
      introConfiguration.setShapeType(introTour.getShapeType());
      introConfiguration.setDotViewEnabled(introTour.isShowDotView());
      introConfiguration.setSkipLocation(introTour.getSkipLocation());
      introConfiguration.setSkipText(introTour.getSkipText());
      materialIntroSequence.add(introConfiguration);
   }
   materialIntroSequence.setShowSkip(mShowSkip);
   materialIntroSequence.setInitialDelay(mInitialDelay);
   materialIntroSequence.setMaterialIntroSequenceListener(mMaterialIntroSequenceListener);
   materialIntroSequence.start();
 }

I can't see anything odd to be fair.

This is how I construct a Tour

introTourList.add(new IntroTour.Builder()
   .setTargetView(...)
   .setIntroText(...)
   .setHelpIconResource(...)
   .build());

IntroTourSequence introTourSequence = new IntroTourSequence.Builder()
   .setIntroTourList(introTourList)
   .setFragmentActivity(fragmentActivity)
   .setMaterialIntroSequenceListener(new MaterialIntroSequenceListener() {
      @Override
      public void onProgress(boolean b, @NonNull String s, int i, int i1) {
       }

      @Override
      public void onCompleted() {
         getListeners().forEach(Listener::introTourStopped);
         ...
      }
})
.build();
introTourSequence.executeIntro();