All Projects → outlander24 → Showcaseview

outlander24 / Showcaseview

Licence: apache-2.0
This ShowcaseView library can be used to showcase any specific part of the UI or can even be used during OnBoarding of a user to give a short intro about different widgets visible on the screen.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Showcaseview

Material Onboarding
A simple library which allows easy replication of several* app onboarding techniques.
Stars: ✭ 217 (+214.49%)
Mutual labels:  tutorial, onboarding
React Native Onboarding Swiper
🛳 Delightful onboarding for your React-Native app
Stars: ✭ 596 (+763.77%)
Mutual labels:  tutorial, onboarding
Tutti
Tutti is a Swift library that lets you create tutorials, hints and onboarding experiences.
Stars: ✭ 224 (+224.64%)
Mutual labels:  tutorial, onboarding
Trip.js
🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.
Stars: ✭ 789 (+1043.48%)
Mutual labels:  tutorial, onboarding
Pvview
A small library that helps you to make an amazing parallax view
Stars: ✭ 227 (+228.99%)
Mutual labels:  tutorial, onboarding
Ahoy Onboarding
Android onboarding library.
Stars: ✭ 951 (+1278.26%)
Mutual labels:  tutorial, onboarding
Tetris Tutorial
From rags to riches; building Tetris with no programming experience.
Stars: ✭ 64 (-7.25%)
Mutual labels:  tutorial
Tweenkit
Animation library for iOS in Swift
Stars: ✭ 1,146 (+1560.87%)
Mutual labels:  onboarding
Python.howtocode.dev
Open Source Book "Learn Python in Bangla" - Nuhil Mehdy
Stars: ✭ 63 (-8.7%)
Mutual labels:  tutorial
Generate Pages Tutorial
教你一步步从零构建 webpack 开发多页面环境
Stars: ✭ 63 (-8.7%)
Mutual labels:  tutorial
Docker Elk Tutorial
docker-elk-tutorial + django + logging
Stars: ✭ 69 (+0%)
Mutual labels:  tutorial
Vue Essentials
Github Repo for my Vue.js Essential Training course on LinkedIn learning.
Stars: ✭ 68 (-1.45%)
Mutual labels:  tutorial
Sru Deeplearning Workshop
دوره 12 ساعته یادگیری عمیق با چارچوب Keras
Stars: ✭ 66 (-4.35%)
Mutual labels:  tutorial
Fr.javascript.info
Modern JavaScript Tutorial
Stars: ✭ 65 (-5.8%)
Mutual labels:  tutorial
Snake
🐍🎮 Snake game made with Expo & PIXI.js 👾 iOS, Android, and Web
Stars: ✭ 67 (-2.9%)
Mutual labels:  tutorial
D3
This is the repository for my course, Learning Data Visualization with D3.js on LinkedIn Learning and Lynda.com.
Stars: ✭ 64 (-7.25%)
Mutual labels:  tutorial
Node Distance Addon
Native NodeJS add-on creation tutorial using C++
Stars: ✭ 68 (-1.45%)
Mutual labels:  tutorial
Swift Framework C Library Example
Example of a simple Swift framework that integrates with a C library without bridging headers.
Stars: ✭ 63 (-8.7%)
Mutual labels:  tutorial
Deeplearning
Deep Learning From Scratch
Stars: ✭ 66 (-4.35%)
Mutual labels:  tutorial
Github Bot Tutorial
GitHub bot tutorial using gidgethub and aiohttp
Stars: ✭ 67 (-2.9%)
Mutual labels:  tutorial

ShowcaseView

This ShowcaseView library can be used to showcase any specific part of the UI or can even be used during OnBoarding of a user to give a short intro about different widgets visible on the screen. You may add any number of views (ImageView, TextView, FrameLayout, etc displaying images, videos, GIF, text etc) to describe the showcasing view.

Try out sample application on Android PlayStore

Usage

For a working implementation of this project see the /app folder

  1. Include the library as local library project or add this dependency in your build.gradle.

          
            dependencies {
              compile 'com.outlander.showcaseview:showcaseview:1.3.0'
            }
          
        
  2. Initialise the ShowcaseViewBuilder as follows:

          
            ShowcaseViewBuilder showcaseViewBuilder;
            ...
            showcaseViewBuilder = ShowcaseViewBuilder.init(this)
                    .setTargetView(fab)
                    .setBackgroundOverlayColor(0xdd4d4d4d)
                    .setRingColor(0xcc8e8e8e)
                    .setRingWidth((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, getResources().getDisplayMetrics()))
                    .setMarkerDrawable(getResources().getDrawable(R.drawable.arrow_up), Gravity.LEFT)
                    .addCustomView(R.layout.description_view, Gravity.TOP)
                    .addCustomView(R.layout.skip_layout)
                    .setCustomViewMargin((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 70, getResources().getDisplayMetrics()));
    
        showcaseViewBuilder.show();
      </code>
    </pre>
    
  3. Register click listeners on the customView added as follows:

            
              showcaseViewBuilder.setClickListenerOnView(R.id.exit_btn, new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    //TODO: Add thing to do when clicked.
                }
              });
            
          
  4. To hide the showcaseView just call:

            
              showcaseViewBuilder.hide()
            
          
  5. To hide the showcaseView when user clicks on the overlay, just set the following flag: showcaseViewBuilder.setHideOnTouchOutside(true); By default, this is always false.

#Things to keep in mind

  • Call the showcaseViewBuilder.show() only after adding all the customViews and MarkerDrawable.

  • setRingWidth(float width) and other margin setters take pixels as parameters. So make sure to send into density independent pixels (dp) value to support multiple screen sizes (See the sample code snippet above for reference)

  • Once showcaseViewBuilder.hide() is called, all the click listeners get deregistered. Thus, you will have to set them back if showing it again. Better to register all the click listeners in a single method which can be called when showing the showcaseView.

#Method Definitions

  • setTargetView(View v): Sets the view which needs to be showcased.

  • setBackgroundOverlayColor(int color): Sets the color of the overlay to be shown.

  • setRingColor(int color): Sets the color of the ring around the showcaseView.

  • setRingWidth(float width): Sets the width of the ring around the showcaseView. Default value is 10px

  • setMarkerDrawable(Drawable drawable, int gravity): Sets the marker drawable if any to point the showcaseView. Also, sets a gravity for the drawable (TOP, LEFT, RIGHT, BOTTOM) around the showcasing view.

  • setDrawableLeftMargin(float margin): Sets the marker drawable left margin.

  • setDrawableTopMargin(float margin): Sets the marker drawable top margin.

  • addCustomView(View view, int gravity): Sets the custom description view to describe the showcaseView. Also, sets a gravity for the view (TOP, LEFT, RIGHT, BOTTOM) around the showcasing view.

  • addCustomView(View view): Sets the custom description view to describe the showcaseView. This doesn't takes any gravity as an argument and renders the view as per the gravity defined in the layout file.

  • setCustomViewMargin(int margin): Sets the custom description view margin from the showcaseView in the direction of the gravity defined, if any. If no gravity defined, then no point in using this method.

  • setHideOnTouchOutside(boolean hide): Sets the flag which decide whether to hide the showcase overlay when user touches on the screen anywhere.

  • setClickListenerOnView(int id, View.OnClickListener clickListener): Sets clicklistener on the components of the customView(s) added.

  • show(): Start showcasing the targetView.

  • hide(): Stop showcasing the targetView.

#Developed by

#License

Copyright Aashish Totla © 2016. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].