GuideView

Project Url: llxdaxia/GuideView
Introduction: Android 引导页,可定制性强
More: Author   ReportBugs   DemoAPK   
Tags:
Android引导页-可定制性强-
  • gradle
  compile 'cn.Lemon:guideview:1.0.0'
  • 方法回调顺序
 * 方法回调:创建 GuideView -- initParams(初始化参数) -- getTargetViewPosition(获取 TargetView 位置核心方法) -- show(添加 GuideView 进 DecorView)
 *  -- addHintView -- GuideView.onMeasure -- GuideView.onLayout -- GuideView.onDraw
  • 使用
public void onResume() {
super.onResume();
fragment.post(new Runnable() {
    @Override
    public void run() {
        showGuideViews();
    }
});
}

public void showGuideViews() {
TextView mHintView = new TextView(getActivity());
mHintView.setText("hello word");
mHintView.setTextSize(15);
mHintView.setTextColor(Color.WHITE);

mGVOne = new GuideView.Builder(getActivity())
        .setTargetView(R.id.text_one)
        .setHintView(mHintView)
        .setHintViewDirection(Direction.BOTTON)
        .setTransparentOvalPadding(20)
        .setHintViewMarginTop(100)
        .setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mGVOne.hide();
                mGVTwo.show();
            }
        })
        .create();
mGVOne.show();

}
  • Demo 效果图

License

This project is licensed under the terms of the Apache License 2.0

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools