iMDroid
iMDroid

Reputation: 2138

Android KenBurnEffect Issue

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..

Upvotes: 1

Views: 306

Answers (2)

katsuya
katsuya

Reputation: 31

Did you solve ?

I think you should write like below.

List<Integer> resourceIDs = Arrays.asList(...);
kenBurnsView.initResourceIDs(resourceIDs);

Upvotes: 0

Fl&#225;vio Faria
Fl&#225;vio Faria

Reputation: 6605

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

https://github.com/flavioarfaria/KenBurnsView

Upvotes: 1

Related Questions