Closed liaopen123 closed 8 years ago
I have used it within a Fragment. Can you show a code snippet of what you have tried? You actually need to start the animation in the onCreateView() method and stop it in the onDestroy(). Something like this in a Fragment:
KenBurnsView image;
...
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_event_details, container, false);
image = (KenBurnsView) view.findViewById(R.id.image);
image.resume();
return view;
}
...
@Override
public void onDestroy() {
super.onDestroy();
if (image != null) {
image.pause();
}
}
...
Thanks,It's my mistake,Now I have solved it.
when I use KenBurnsView in Fragment , the animation doesn't work,How to solve it