Skip to content

Skip option  #129

Open
Open

Description

@amarsaurabh

It is not an issue, it's my suggestion that, There should be one skip button so that user can skip the tutorial any time instead of going one by one at the last and finish the tutorial.

Activity

  1. ugochirico commented on Feb 26, 2018

    @ugochirico

    I agree with @amarsaurabh. How can we add a skip button to allos the user to skip the tutorial at any time?

  2. insessor commented on Jan 23, 2019

    @insessor

    You can add Skip button or any other ui on overlay, like I added Skip button,

    FrameLayout frameLayout = tourGuideHandler.getOverlay();

                    if (frameLayout != null) {
                        //set the properties for button
                        Button btnTag = new Button(context);
                        final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    
                        params.gravity = Gravity.TOP | Gravity.RIGHT;
    
                        Rect rectangle = new Rect();
                        Window window = context.getWindow();
                        window.getDecorView().getWindowVisibleDisplayFrame(rectangle);
                        int statusBarHeight = rectangle.top;
    
                        int marginTop = 10 + statusBarHeight;
                        int marginBottom = 10 + statusBarHeight*2;
                        int marginRight = 10;
                        int marginLeft = 10;
    
                        params.setMargins(marginLeft, marginTop, marginRight, marginBottom);
                        btnTag.setLayoutParams(params);
                        btnTag.setText("Skip");
                        btnTag.setId((int) System.currentTimeMillis());
    
                        //add button to the layout
                        frameLayout.addView(btnTag);
    
                        btnTag.setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
    
                            }
                        });
                    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions