android新手引导页面,GuideHelper 实现Android新手引导页

GuideHelper 实现Android新手引导页

可以在提示也绘制实际的view,在view的上下左右位置添加提示信息的图片

gradle导入

compile 'com.shizhefei:GuideHelper:1.0.5'

#代码如下:

final GuideHelper guideHelper = new GuideHelper(MainActivity.this);

TipData tipData1 = new TipData(R.drawable.tip1, Gravity.RIGHT | Gravity.BOTTOM, iconView);

tipData1.setLocation(0, -DisplayUtils.dipToPix(v.getContext(), 50));

guideHelper.addPage(tipData1);

//

TipData tipData2 = new TipData(R.drawable.tip2, citysView);

guideHelper.addPage(tipData2);

//

TipData tipData3 = new TipData(R.drawable.tip3, infoLayout);

guideHelper.addPage(tipData3);

guideHelper.addPage(tipData1, tipData2, tipData3);

//add custom view

LayoutInflater ll = LayoutInflater.from(MainActivity.this);

View testView = ll.inflate(R.layout.custom_view,null);

TipData tipDataCustom= new TipData(Gravity.CENTER,new Rect(),testView);

testView.findViewById(R.id.guide_close).setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View v) {

guideHelper.dismiss();

}

});

guideHelper.setAutoDismiss(false);//一般不设置,默认是true

guideHelper.addPage(tipDataCustom);

guideHelper.show(false);

// guideHelper.show(true);

#效果如下:

625332134c6f4d4600884b99daebf603.png

##主力类库##

有了这些类库,让你6的飞起

联系方式和问题建议

QQ 群: 开源项目使用交流,问题解答: 549284336(开源盛世)

License

Copyright 2016 shizhefei(LuckyJayce)

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值