Search in sources :

Example 1 with KenBurnsView

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();
        }
    });
}
Also used : ImageView(android.widget.ImageView) ProgressDialog(android.app.ProgressDialog) KenBurnsView(com.flaviofaria.kenburnsview.KenBurnsView)

Example 2 with KenBurnsView

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);
}
Also used : KenBurnsView(com.flaviofaria.kenburnsview.KenBurnsView)

Example 3 with KenBurnsView

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();
}
Also used : KenBurnsView(com.flaviofaria.kenburnsview.KenBurnsView)

Example 4 with KenBurnsView

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();
}
Also used : KenBurnsView(com.flaviofaria.kenburnsview.KenBurnsView)

Aggregations

KenBurnsView (com.flaviofaria.kenburnsview.KenBurnsView)4 ProgressDialog (android.app.ProgressDialog)1 ImageView (android.widget.ImageView)1