Skip to content
Slideshow. Android ImageViews are animated by Ken Burns Effect. (Inspired by Heyday)
Java
Branch: master
Clone or download
Latest commit a9e1fce Jan 14, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Refactoring Jan 14, 2016
gradle/wrapper Initial commit Apr 17, 2015
library Refactoring Jan 14, 2016
.gitignore Initial commit Apr 17, 2015
LICENSE Refactoring Jan 14, 2016
README.md Update README.md Jan 14, 2016
build.gradle Bump version to 1.0.3 Oct 24, 2015
demo.gif Mod demo Jan 14, 2016
gradle.properties Bump version to 1.0.3 Oct 24, 2015
gradlew Initial commit Apr 17, 2015
gradlew.bat Initial commit Apr 17, 2015
settings.gradle Initial commit Apr 17, 2015

README.md

KenBurnsView

Android ImageViews are animated by Ken Burns Effect.

Demo

Demo

How to use

private void initializeKenBurnsView(){
    // KenBurnsView
    final KenBurnsView kenBurnsView = (KenBurnsView) findViewById(R.id.ken_burns_view);
    // kenBurnsView.setScaleType(ImageView.ScaleType.CENTER_CROP);

    // File path, or a uri or url
    List<String> urls = Arrays.asList(SampleImages.IMAGES_URL);
    kenBurnsView.loadStrings(urls);

    // ResourceID
    //List<Integer> resourceIDs = Arrays.asList(SampleImages.IMAGES_RESOURCE);
    //kenBurnsView.loadResourceIDs(resourceIDs);

    // MIX (url & id)
    //List<Object> mixingList = Arrays.asList(SampleImages.IMAGES_MIX);
    //kenBurnsView.loadMixing(mixingList);

    // LoopViewListener
    LoopViewPager.LoopViewPagerListener listener = new LoopViewPager.LoopViewPagerListener() {
        @Override
        public View OnInstantiateItem(int page) {
            TextView counterText = new TextView(getApplicationContext());
            counterText.setText(String.valueOf(page));
            return counterText;
        }

        @Override
        public void onPageScroll(int position, float positionOffset, int positionOffsetPixels) {
        }

        @Override
        public void onPageSelected(int position) {
            kenBurnsView.forceSelected(position);
        }

        @Override
        public void onPageScrollChanged(int page) {
        }
    };

    // LoopView
    LoopViewPager loopViewPager = new LoopViewPager(this, urls.size(), listener);

    //LoopViewPager loopViewPager = new LoopViewPager(this, resourceIDs.size(), listener);

    //LoopViewPager loopViewPager = new LoopViewPager(this, mixingList.size(), listener);


    FrameLayout viewPagerFrame = (FrameLayout) findViewById(R.id.view_pager_frame);
    viewPagerFrame.addView(loopViewPager);

    kenBurnsView.setPager(loopViewPager);
}

You should check sample code.

Gradle

repositories {
    jcenter()
}

dependencies {
    compile 'com.github.goka.kenburnsview:library:1.0.3'
}

Develop

1.0.4

Easy to use

Released

1.0.3

Delete unneeded resources.

1.0.2

Fix initializing size.

1.0.1

Enable to load images from res. Enable to mix. (Enable to load images from url & res)

iOS

CPKenburnsSlideshowView

Detail Demo Movie

youtube

Library

Thanks for Glide

You can’t perform that action at this time.