我有一个与KenBurnsEffect库相关的问题。
在这个库中,他们设置了来自远程 URL 的图像.. 像这样..
public static final String[] IMAGES20 = new String[] {
"http://simpozia.com/pages/images/stories/windows-icon.png",
"http://radiotray.sourceforge.net/radio.png",
"http://www.bandwidthblog.com/wp-content/uploads/2011/11/twitter-logo.png",
"http://weloveicons.s3.amazonaws.com/icons/100907_itunes1.png"
};
List<String> urls = Arrays.asList(IMAGES20);
final KenBurnsView kenBurnsView = (KenBurnsView)findViewById(R.id.ken_burns_view);
kenBurnsView.initUrls(urls);
这完美地工作。
但是在我的项目中,我需要从drawable
文件夹中设置图像..
要将可绘制对象引用为 URL 字符串,我使用了drawable://" + R.drawable.img_splash_1,
实现是这样的...
List<String> IMAGES20= Arrays.asList(
"drawable://" + R.drawable.img_splash_1,
"drawable://" + R.drawable.img_splash_2,
"drawable://" + R.drawable.img_splash_3,
"drawable://" + R.drawable.img_splash_4,
"drawable://" + R.drawable.img_splash_5,
"drawable://" + R.drawable.img_splash_6,
"drawable://" + R.drawable.img_splash_7
);
List<String> urls = Arrays.asList(IMAGES20);
final KenBurnsView kenBurnsView = (KenBurnsView)findViewById(R.id.ken_burns_view);
kenBurnsView.initUrls(urls);
但这不起作用..它显示一个空白屏幕。没有例外。我不明白这是什么问题...
请帮我..