MaterialIntroView-v2 icon indicating copy to clipboard operation
MaterialIntroView-v2 copied to clipboard

Ideas

Open RGregat opened this issue 5 years ago • 7 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 ;).

RGregat avatar Apr 03 '20 08:04 RGregat

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

shripal17 avatar Apr 29 '20 14:04 shripal17

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

shripal17 avatar Apr 29 '20 16:04 shripal17

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

RGregat avatar Jul 16 '20 06:07 RGregat

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

shripal17 avatar Jul 16 '20 15:07 shripal17

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

RGregat avatar Jul 17 '20 05:07 RGregat

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

shripal17 avatar Jul 17 '20 08:07 shripal17

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();

RGregat avatar Jul 17 '20 12:07 RGregat