mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 04:28:00 +01:00
dont do anything if the fragment gets hidden
This commit is contained in:
parent
e7e31e25f6
commit
4e3efeb9ff
4 changed files with 1 additions and 16 deletions
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -4,6 +4,4 @@ import android.support.v4.app.Fragment;
|
|||
|
||||
public abstract class ViewPagerFragment extends Fragment {
|
||||
public abstract void itemDragged();
|
||||
|
||||
public abstract void fragmentHidden();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue