Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page indicator position #25

Closed
paul-ovchinnikov opened this issue Sep 1, 2016 · 4 comments
Closed

Page indicator position #25

paul-ovchinnikov opened this issue Sep 1, 2016 · 4 comments

Comments

@paul-ovchinnikov
Copy link

I didn't find an ability to place indicator on arbitrary place on screen. For example I need to put indicator to top of screen. Please add an ability of layout_gravity for indicators

@Iojjj
Copy link
Contributor

Iojjj commented Sep 1, 2016

Hi @paul-ovchinnikov,

  1. Create your own XML layout for tutorial page. See our layout here.
  2. Extend your tutorial fragment from TutorialFragment or TutorialSupportFragment.
  3. Override all this getters and provide proper resource IDs.
  4. ....
  5. Profit

@paul-ovchinnikov
Copy link
Author

This approach doesn't work. TutorialFragment still trying to use original layout and don't use custom layout.
Also if TransormItem[] size is 0, I get IllegarlArgumentStateExcepton.
One more question is there ability to set another size for focused indicator?

@Iojjj
Copy link
Contributor

Iojjj commented Sep 2, 2016

  1. Thanks for pointing on this issue. It appeared after refactoring. We'll fix it and release new version next week.
  2. We're not supporting tutorials without transform items at this moment. If you need to display tutorial without transform items, you can easily do it on your own using ViewPager and Fragments. If you don't have transform item on one or multiple pages of tutorial, you can pass single TransformItem item with shift coefficient set to zero. Pass any view id in page's layout as viewResId.
  3. It's not supported out of box. You can implement you own Renderer and draw anything you like. Renderer will receive elementBounds parameter which represents a rectangle where you need to draw your indicator and a Canvas object. At this point you can set scale on canvas and enlarge indicator (when flag isActive equals true) or enlarge rectangle and use it for drawing indicator.

@Iojjj
Copy link
Contributor

Iojjj commented Sep 7, 2016

fixed in v.1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants