0 mobile android sequence showcaseview
我必须在我的活动上实现一个Showcase View序列(重要!),这个Showcase View seqeunce必须在Activity的对象之间移动(如EditText,TextView,Button等).我没有找到很多文档,而且文档不能满足我的需要,所以如果有人知道怎么做,我会问这里.
谢谢你们!
感谢@ThinkingMonkey获取该链接.这个对我有用!有点晚了,但我希望这可以帮助某人一段时间.
根据Material Showcase View的文件:
1.maven { url "https://jitpack.io" }在allproject的存储库下添加到项目的build.gradle.
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
Run Code Online (Sandbox Code Playgroud)
2.添加模块的build.gradle compile 'com.github.deano2390:MaterialShowcaseView:1.1.0@aar'内部dependencies {...}.
3.宣布目标:
ToggleButton target1 = (ToggleButton) findViewById(R.id.togglebutton);
TextView target2 = (TextView) findViewById(R.id.text);
Button target3 = (Button) findViewById(R.id.button);
Run Code Online (Sandbox Code Playgroud)
4.如果一次性使用,请提供ID.
private static final String SHOWCASE_ID = "1";
Run Code Online (Sandbox Code Playgroud)
5.这是Material Showcase View的序列代码示例.
ShowcaseConfig config = new ShowcaseConfig();
config.setDelay(500); // half second between each showcase view
MaterialShowcaseSequence sequence = new MaterialShowcaseSequence(this, SHOWCASE_ID);
sequence.setConfig(config);
sequence.addSequenceItem(target1,
"This is button one", "GOT IT");
sequence.addSequenceItem(target2,
"This is button two", "GOT IT");
sequence.addSequenceItem(target3,
"This is button three", "GOT IT");
sequence.start();
Run Code Online (Sandbox Code Playgroud)
这一切都取决于你,如果你想穿上它onclick,menu options或oncreate.
| 归档时间: |
|
| 查看次数: |
2456 次 |
| 最近记录: |