dont do anything if the fragment gets hidden

This commit is contained in:
tibbi 2016-06-09 14:50:42 +02:00
parent e7e31e25f6
commit 4e3efeb9ff
4 changed files with 1 additions and 16 deletions

View File

@ -33,10 +33,6 @@ public class MyPagerAdapter extends FragmentStatePagerAdapter {
@Override
public Fragment getItem(int position) {
if (fragment != null) {
fragment.fragmentHidden();
}
final Medium medium = media.get(position);
final Bundle bundle = new Bundle();
bundle.putSerializable(Constants.MEDIUM, medium);

View File

@ -8,9 +8,9 @@ import android.view.ViewGroup;
import com.davemorrissey.labs.subscaleview.ImageSource;
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
import com.simplemobiletools.gallery.Constants;
import com.simplemobiletools.gallery.models.Medium;
import com.simplemobiletools.gallery.R;
import com.simplemobiletools.gallery.activities.ViewPagerActivity;
import com.simplemobiletools.gallery.models.Medium;
public class PhotoFragment extends ViewPagerFragment implements View.OnClickListener {
@ -45,9 +45,4 @@ public class PhotoFragment extends ViewPagerFragment implements View.OnClickList
public void itemDragged() {
}
@Override
public void fragmentHidden() {
}
}

View File

@ -77,10 +77,6 @@ public class VideoFragment extends ViewPagerFragment
pauseVideo();
}
public void fragmentHidden() {
cleanup();
}
private void initTimeHolder(View view) {
RelativeLayout timeHolder = (RelativeLayout) view.findViewById(R.id.video_time_holder);
final Resources res = getResources();

View File

@ -4,6 +4,4 @@ import android.support.v4.app.Fragment;
public abstract class ViewPagerFragment extends Fragment {
public abstract void itemDragged();
public abstract void fragmentHidden();
}