gpt4 book ai didi

java - Android Showcase View怎么用?

转载 作者:太空狗 更新时间:2023-10-29 16:03:45 28 4
gpt4 key购买 nike

Well For Showcase View

enter image description here

我用这个:

https://github.com/amlcurran/ShowcaseView

导入文件后出现错误。这是我的错误和改进的 .jar 文件

enter image description here

错误说

在Java中

R cannot be resolved to a variable

时尚

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.

再次,时尚

error: Error: No resource found that matches the given name: attr 'android:fontFamily'.

另外,在我的项目中是否有任何使用 Showcase View 的教程。我找不到,也没有从 github 项目中理解。不清楚。

最佳答案

这个图书馆对所有人来说都很棒。怎么运行的??我想突出显示一个工具栏选项。现在只需添加库并像这样编写代码。

show my toolbar highlight

another toolbar

您可以使用此代码使用多个 showCaseView

1在我们的 Gradle.build 中添加库 implementation 'com.github.mreram:ShowCaseView:1.0.5'

使用传递标题、描述文本、 View 或 View ID 和类型简单地调用此方法

  ShowIntro("SetTheme", "Select Theme and Apply on your video", R.id.button_tool_theme, 1);

方法是这样创建的

 private void ShowIntro(String title, String text, int viewId, final int type) {

new GuideView.Builder(this)
.setTitle(title)
.setContentText(text)
.setTargetView((LinearLayout)findViewById(viewId))
.setContentTextSize(12)//optional
.setTitleTextSize(14)//optional
.setDismissType(GuideView.DismissType.targetView) //optional - default dismissible by TargetView
.setGuideListener(new GuideView.GuideListener() {
@Override
public void onDismiss(View view) {
if (type == 1) {
ShowIntro("Editor", "Edit any photo from selected photos than Apply on your video", R.id.button_tool_editor, 6);
} else if (type == 6) {
ShowIntro("Duration", "Set duration between photos", R.id.button_tool_duration, 2);
} else if (type == 2) {
ShowIntro("Filter", "Add filter to video ", R.id.button_tool_effect, 4);
} else if (type == 4) {
ShowIntro("Add Song", "Add your selected song on your video ", R.id.button_tool_music, 3);
} else if (type == 3) {
ShowIntro("Overlay", "Add your selected overlay effect on your video ", R.id.button_tool_overlay, 5);
} else if (type == 5) {
SharePrefUtils.putBoolean("showcase", false);
}
}
})
.build()
.show();
}

关于java - Android Showcase View怎么用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22141856/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com