百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

KenBurnsView

> 编程语言
开源

由 Ken Burns 效果动画化的 Android ImageViews

2.7K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

由 Ken Burns 效果动画化的 Android ImageViews

KenBurnsView

Android library that provides an extension to ImageView that creates an immersive experience by animating its drawable using the Ken Burns Effect.

Overview

KenBurnsView provides the following advantages:

  • Control: you can change the duration and the interpolator of transitions and pause/resume them. You can also listen to events like onTransitionStart() and onTransitionEnd();
  • Highly extensible: you can define how the rectangles to be zoomed and panned will be generated;
  • Libs friendly: since KenBurnsView is a direct extension of ImageView, it seamlessly works out of the box with your favorite image loader library;
  • Easy to use: you can start using it right away. All you need to do is to drop the JAR file into your project and replace ImageView elements in your XML layout files by com.flaviofaria.kenburnsview.KenBurnsView ones.

Changelog

Latest version: 1.0.7

  • Download JAR from Maven Central

Gradle integration

If you're using Gradle, you can declare this library as a dependency:

dependencies {
    compile 'com.flaviofaria:kenburnsview:1.0.7'
}

Basic usage

For a working implementation, see the sample/ folder.

The simplest way to use KenBurnsView is by dropping the library JAR file into your project adding a view to an XML layout file:

<com.flaviofaria.kenburnsview.KenBurnsView
    android:id="@+id/image"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/your_drawable" />

Advanced usage

  1. You can set a listener to your view:
KenBurnsView kbv = (KenBurnsView) findViewById(R.id.image);
kbv.setTransitionListener(new TransitionListener() {
    @Override
    public void onTransitionStart(Transition transition) {

    }
    @Override
    public void onTransitionEnd(Transition transition) {

    }
});
  1. You can pause the animation by calling kbv.pause() and resume it by calling kbv.resume();

  2. You can change the duration and the interpolator of transitions:

RandomTransitionGenerator generator = new RandomTransitionGenerator(duration, interpolator);
kbv.setTransitionGenerator(generator);
  1. If you're willing to have even more control over transitions, you can implement your own TransitionGenerator.

Questions

You can ask any question on Stack Overflow using the android-kenburnsview tag.

License

Apache Version 2.0

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Control: you can change the duration and the interpolator of transitions and
  • •Highly extensible: you can define how the rectangles to be zoomed
  • •Libs friendly: since KenBurnsView is a direct extension of *ImageView*,
  • •Easy to use: you can start using it right away. All you need to do
  • •[Download JAR from Maven Central][Maven]

> 标签

Javaandroidandroid-libraryimageviewkenburnsview

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言