use of com.flaviofaria.kenburnsview.KenBurnsView in project ion by koush.
the class KenBurnsSample method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
KenBurnsView view = new KenBurnsView(this);
setContentView(view);
final ProgressDialog dlg = new ProgressDialog(this);
dlg.setTitle("Loading...");
dlg.setIndeterminate(false);
dlg.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dlg.show();
// this is going to load a 30mb download...
Ion.with(this).load("file:///android_asset/telescope.jpg").progressDialog(dlg).setLogging("DeepZoom", Log.VERBOSE).withBitmap().deepZoom().intoImageView(view).setCallback(new FutureCallback<ImageView>() {
@Override
public void onCompleted(Exception e, ImageView result) {
dlg.cancel();
}
});
}
use of com.flaviofaria.kenburnsview.KenBurnsView in project KenBurnsView by flavioarfaria.
the class MultiImageActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.multi_image);
mViewSwitcher = (ViewSwitcher) findViewById(R.id.viewSwitcher);
KenBurnsView img1 = (KenBurnsView) findViewById(R.id.img1);
img1.setTransitionListener(this);
KenBurnsView img2 = (KenBurnsView) findViewById(R.id.img2);
img2.setTransitionListener(this);
}
use of com.flaviofaria.kenburnsview.KenBurnsView in project KenBurnsView by flavioarfaria.
the class MultiImageActivity method onPauseClick.
@Override
protected void onPauseClick() {
KenBurnsView currentImage = (KenBurnsView) mViewSwitcher.getCurrentView();
currentImage.pause();
}
use of com.flaviofaria.kenburnsview.KenBurnsView in project KenBurnsView by flavioarfaria.
the class MultiImageActivity method onPlayClick.
@Override
protected void onPlayClick() {
KenBurnsView currentImage = (KenBurnsView) mViewSwitcher.getCurrentView();
currentImage.resume();
}
Aggregations