9
我正在使用https://github.com/amlcurran/ShowcaseView库用于Showcaseview
如何制作矩形视图而不是圆形?
以及如何将它用于其中一个listview项目? 感谢如何在showcaseview中为列表视图制作矩形视图
1
我正在使用https://github.com/amlcurran/ShowcaseView库用于Showcaseview
如何制作矩形视图而不是圆形?
以及如何将它用于其中一个listview项目? 感谢如何在showcaseview中为列表视图制作矩形视图
1
参考CustomShowcaseActivity
在示例应用程序。它创建了一个矩形展柜。它定义了一个CustomShowcaseView
与设置width
和资源文件dimens.xml陈列柜矩形的height
构造:
width = resources.getDimension(R.dimen.custom_showcase_width);
height = resources.getDimension(R.dimen.custom_showcase_height);
的CustomShowcaseActivity
关联到在Builder
的ShowcaseView。这也是展示目标设定的地方。
CustomShowcaseView
implements ShowcaseDrawer
因此您使用setShowcaseDrawer()
。这不是一个抽屉,而是一个“抽屉”。
下面显示了这一点,并针对一个listview
为你想要的东西:
ViewTarget target = new ViewTarget(R.id.listView, this);
sv = new ShowcaseView.Builder(this)
.setTarget(target)
.setShowcaseDrawer(new CustomShowcaseActivity.CustomShowcaseView(getResources()))
.build();