Android 快速实现新手引导层的库

描述:

Android 快速实现新手引导层的库

应用截图:

1113

使用说明:

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
dependencies {
     compile 'com.github.huburt-Hu:NewbieGuide:v1.0.3'
   }
NewbieGuide.with(this)//activity or fragment
               .setLabel("guide1")//Set guide layer labeling to distinguish different guide layers, must be passed! Otherwise throw an error
               .addHighLight(textView, HighLight.Type.RECTANGLE)//Add the view that needs to be highlighted
               .setLayoutRes(R.layout.view_guide)//Custom guide layer layout, do not add background color, the boot layer background color is set by setBackgroundColor()
               .show();
Controller controller = NewbieGuide.with(this)
                .setOnGuideChangedListener(new OnGuideChangedListener() {//add listener
                    @Override
                    public void onShowed(Controller controller) {
                        //when guide layer display
                    }

                    @Override
                    public void onRemoved(Controller controller) {
                        //when guide layer dismiss
                    }
                })
                .setBackgroundColor(Color.BLACK)//Set the background color of the guide layer and suggest translucent. The default background color is: 0xb2000000
                .setEveryWhereCancelable(false)//The Settings click anywhere to dismiss, and default is true
                .setLayoutRes(R.layout.view_guide, R.id.textView)//The second variable parameter is to click on the view's id of the hidden guide layer view
                .alwaysShow(true)//Show the boot layer each time,default is false
                .build();//Build the controller for the guide layer
        controller.resetLabel("guide1");
        controller.remove();//remove the guide layer
        controller.show();//show the guide layer

源码下载:https://github.com/superSp/RulerView

未经允许不得转载:安度博客 » Android 快速实现新手引导层的库

赞 (0)
分享到:更多 ()

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址