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


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




allprojects {
		repositories {
			maven { url '' }
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()
Controller controller = NewbieGuide.with(this)
                .setOnGuideChangedListener(new OnGuideChangedListener() {//add listener
                    public void onShowed(Controller controller) {
                        //when guide layer display

                    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, 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.remove();//remove the guide layer;//show the guide layer


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

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

评论 0

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