Android 应用程序新手引导,任意视图高亮提示,使用简单
Android app新手引导高亮提示,简单易用
compile 'com.yuyh.easyguideview:library:1.2.2'…如何判断绘制完成?可重写activity的void onWindowFocusChanged(boolean hasFocus)方法,建议使用以下方式:
// 等待高亮View加载完成之后再调用显示引导层,例如对于hightLightView高亮来说:
hightLightView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {// 加载完成后回调
// 务必取消监听,否则会多次调用
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
hightLightView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
} else {
hightLightView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
// TODO 显示高亮布局!
}
});
新手引导层状态改变监听
easyGuide.setOnStateChangedListener(new OnStateChangedListener() {
@Override
public void onShow() {
}
@Override
public void onDismiss() {
}
@Override
public void onHeightlightViewClick(View view) {
Log.i("TAG", "点击了view:" + view.getId());
}
});Copyright (C) 2016 smuyyh
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.暂无开放 Issues,或尚未同步最近议题。