Search in sources :

Example 1 with ImageFragment

use of org.horaapps.leafpic.fragments.ImageFragment in project LeafPic by HoraApps.

the class SingleMediaActivity method rotateImage.

private void rotateImage(int rotationDegree) {
    Fragment mediaFragment = adapter.getRegisteredFragment(position);
    if (!(mediaFragment instanceof ImageFragment))
        throw new RuntimeException("Trying to rotate a wrong media type!");
    ((ImageFragment) mediaFragment).rotatePicture(rotationDegree);
}
Also used : ImageFragment(org.horaapps.leafpic.fragments.ImageFragment) ImageFragment(org.horaapps.leafpic.fragments.ImageFragment) Fragment(android.support.v4.app.Fragment) BaseMediaFragment(org.horaapps.leafpic.fragments.BaseMediaFragment)

Aggregations

Fragment (android.support.v4.app.Fragment)1 BaseMediaFragment (org.horaapps.leafpic.fragments.BaseMediaFragment)1 ImageFragment (org.horaapps.leafpic.fragments.ImageFragment)1