1

I have an issue related to KenBurnsEffect library.

In this library they set an images from remote URL.. like this..

 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);

This works perfectly.

But in my project, i need to set images from drawable folder..

To reference a drawable as URL string, i have used drawable://" + R.drawable.img_splash_1,

Implementation is like this...

     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);

But this does not work.. It shows a blank screen. No Exceptions nothing. I can't understand what is the issue...

Please help me..

iMDroid
  • 2,108
  • 1
  • 16
  • 29
  • Even i know that there are thousands of way to do that.. but my question is related to KenburnsView library. they are using some Glide Image Loader library. and i am not sure how to load local image through that library. – iMDroid May 13 '15 at 09:48

2 Answers2

1

Take a look at this library, It may be helpful:

https://github.com/flavioarfaria/KenBurnsView

Flávio Faria
  • 6,575
  • 3
  • 39
  • 59
0

Did you solve ?

I think you should write like below.

List<Integer> resourceIDs = Arrays.asList(...);
kenBurnsView.initResourceIDs(resourceIDs);
katsuya
  • 11
  • 1
  • 2