从动画中提取图像路径
我有一个简单横幅的标准图像动画。我试图使其可点击,以便当用户单击横幅(特色文章列表)时,会将他们带到该文章。
为了在我们的 Android 版本中实现这一目标,我们有一个可运行程序,允许我们同时更改图像资源和参考链接。
我的动画设置如下:
mBannerImageView.animationImages = newArray;
mBannerImageView.animationDuration = 10;
mBannerImageView.animationRepeatCount = 0;
mBannerImageView.startAnimating;
有没有办法/如何从当前时间的图像视图中提取资源名称?我的想法是让 IBAction 来提取资源并从那里引导您(将图像名称与我们的核心数据中保存的内容相匹配)。如果没有办法,对于这种性质的事情最好的方法是什么?
感谢您的帮助!
I have a standard image animation for a simple banner. I'm trying to make it clickable so when the user clicks on the banner(a featured article list), it takes them to that article.
To achieve this in our Android version, we have a runnable that allows us to change both the image resource and the reference link at the same time.
I have the animation set up like this:
mBannerImageView.animationImages = newArray;
mBannerImageView.animationDuration = 10;
mBannerImageView.animationRepeatCount = 0;
mBannerImageView.startAnimating;
Is there a way/how can I pull the resource name from the image view at the current time? My thought is to have the IBAction for it to pull the resource and direct you from there(matching the image name to something saved in our coredata). If there isn't a way, what would be the best approach for something of this nature?
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你想设置图像动画,那么我有一些html代码,通过你可以轻松生成图像动画。以下步骤向您展示如何创建图像动画。
创建一个简单的动画并将图像另存为一系列 JPG 图像。
构建一个 HTML 页面,并使用标记将图像显示在页面上的某处。
将文件另存为 logo1.htm。在标签内,包含一个如下所示的标签:
在 HTML 文件仍然打开的情况下,更改标记以使其显示动画的第二帧,然后更改标记以打开 logo3.htm 并将文件另存为 logo2.htm。
对动画的所有帧重复此过程。
If you wish to set up image animation, so I have some html code which through you are easily generate image animation. The steps below show you how to create a image animation.
Create a simple animation and save the images as a series of JPG images.
Build an HTML page with the image displayed somewhere on the page using the tag.
Save the file as logo1.htm. Within the tag, include a tag that looks like this:
With the HTML file still open, change the tag so that it displays the second frame of your animation, and change the tag to open logo3.htm and save the file as logo2.htm.
Repeat this process for all frames of the animation.