在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:AndroidUserGuide开源软件地址:https://gitee.com/xiaozhuai/android_user_guide开源软件介绍:Android UserGuide[English README] [中文说明] Android User Guide 是一个用于为安卓应用构建用户向导(帮助教程)的框架。 Under MIT LICENSE author: xiaozhuai - [email protected] 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(); } };} ImgsFinally原谅我的ps技术。我是说那个红色的箭头。 : ) |
请发表评论