9 Unstar Star 23 Fork 3

xiaozhuai / AndroidUserGuide

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Android UserGuide

[English README] [中文说明]

Android User Guide is a framework to build user guide steps easily for android application.

Under MIT LICENSE

author: xiaozhuai - xiaozhuai7@gmail.com

Demo

Here is a simple demo

public class MainActivity extends AppCompatActivity {

    private UserGuide mUserGuide;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mUserGuide = new UserGuide(this, (FrameLayout) findViewById(R.id.user_guide_frame));
        mUserGuide.setUserGuideListener(mUserGuideListener);

        float density = getResources().getDisplayMetrics().density;

        mUserGuide.add(
                GuideBinder.build()
                        .bind(findViewById(R.id.btn_1))
                        .img(R.drawable.touch_me_1)
                        .size(400*density, 400*density)
                        .shadowType(GuideBinder.SHADOW_TYPE_FULL)
        );
        mUserGuide.add(
                GuideBinder.build()
                        .bind(findViewById(R.id.btn_2))
                        .img(R.drawable.touch_me_2)
                        .size(400*density, 400*density)
                        .shadowType(GuideBinder.SHADOW_TYPE_CIRCLE)
        );
        mUserGuide.add(
                GuideBinder.build()
                        .bind(findViewById(R.id.btn_3))
                        .img(R.drawable.touch_me_1)
                        .size(400*density, 400*density)
                        .shadowType(GuideBinder.SHADOW_TYPE_RECT)
        );
        mUserGuide.add(
                GuideBinder.build()
                        .bind(findViewById(R.id.btn_4))
                        .img(R.drawable.touch_me_2)
                        .size(400*density, 400*density)
                        .shadowType(GuideBinder.SHADOW_TYPE_FANTASY)
        );

        mUserGuide.next();

    }

    private UserGuide.UserGuideListener mUserGuideListener = new UserGuide.UserGuideListener() {
        @Override
        public void onStep(int step) {
            Toast.makeText(MainActivity.this, "on step "+step, Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onBoundViewTouched(View v, PointF begin, PointF end) {
            Toast.makeText(MainActivity.this, "bound view touched", Toast.LENGTH_SHORT).show();
            mUserGuide.next();
        }

        @Override
        public void onEnd() {
            Toast.makeText(MainActivity.this, "guide end", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onBackgroundTouched() {
            Toast.makeText(MainActivity.this, "background touched", Toast.LENGTH_SHORT).show();
        }
    };
}

Imgs

preview

Finally

Forget my poor ps skill, I mean that red arrow. : )

Comments ( 0 )

Sign in for post a comment

About

Android User Guide是一个用于为安卓应用构建用户向导(帮助教程)的框架。 spread retract
Android
MIT
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
Android
1
https://gitee.com/xiaozhuai/android_user_guide.git
git@gitee.com:xiaozhuai/android_user_guide.git
xiaozhuai
android_user_guide
AndroidUserGuide
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542