Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Set help or show case view on screen

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 283
    Comment on it

    Showcase view or Help view is basically used to show some useful content on any screen when user comes first time there.

    This is the github library you can use to set showcase in easy way like this :

    add library in gradle file :

    compile 'com.github.amlcurran.showcaseview:library:5.4.3'
    

    now in your code just try this codes :

    Here you will apply only target view in ViewTarget like i am using view with id btnLogin.

    You can also set title and context on that view.

    public void showHelpView(){
        RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        lps.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
        int margin = ((Number) (getResources().getDisplayMetrics().density * 12)).intValue();
        lps.setMargins(margin, margin, margin, margin);
    
        ViewTarget target = new ViewTarget(R.id.btnLogin, this);
        sv = new ShowcaseView.Builder(this)
                .withMaterialShowcase()
                .setTarget(target)
                .setContentTitle("Title comes here")
                .setContentText(getString(R.string.credit_report_card_hint_txt))
                .setStyle(R.style.CustomShowcaseTheme2)
                .replaceEndButton(R.layout.view_custom_button)
                .build();
        sv.setButtonPosition(lps);
    
    }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: