import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.v4.view.ViewPager;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.View.OnTouchListener;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.view.MenuItem;
* @author David A. Velasco
*/
public class PreviewImageActivity extends FileActivity implements
-FileFragment.ContainerActivity, OnTouchListener,
+ FileFragment.ContainerActivity,
ViewPager.OnPageChangeListener, OnRemoteOperationListener {
public static final int DIALOG_SHORT_WAIT = 0;
requestForDownload(currentFile);
}
}
+
+ // Call to reset image zoom to initial state
+ ((PreviewImagePagerAdapter) mViewPager.getAdapter()).resetZoom();
}
+
}
/**
}
-
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (event.getAction() == MotionEvent.ACTION_UP) {
- toggleFullScreen();
- }
- return true;
- }
-
-
- private void toggleFullScreen() {
+ public void toggleFullScreen() {
ActionBar actionBar = getSupportActionBar();
if (mFullScreen) {
actionBar.show();