My App uses KenBurnsView (wonderful piece of code, thanks!), and it works well with ScaleType.FIT_CENTE mode, but some users just prefer to see the whole, non cropped image instead (non moving in that case), which works pretty well with standard ImageView, but fails miserably with KenBurns:
if (XenoAmp.getWpsCover()) {
final KenBurnsView caly = (KenBurnsView) widok.findViewById(R.id.tlo);
if (XenoAmp.getCoverFill()) {
caly.setScaleType(ScaleType.FIT_CENTER);
} else {
caly.setScaleType(ScaleType.CENTER_INSIDE);
caly.pause();
}
}
What happens with Ken is: he stays small and sticks to upper left corner of parent view. How can I fix that without replacing it with standard ImageView?
You can take two different approaches:
Use a standard ImageView
together with KenBurnsView
and switch visibilities according to what your users want to see.
Write your own TransitionGenerator
that doesn't do any transition at all. You can find some information about how to do it here: Define zoom/pan start position with KenBurnsView
IMO, the former approach is much simpler and makes more sense.