Skip to content
This repository was archived by the owner on Oct 23, 2021. It is now read-only.

Commit 50c55d5

Browse files
committed
fixed Parceable selection state issue: this works for retained and unretained Fragments
2 parents 4a21f5a + 569d1d2 commit 50c55d5

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

criminalintent-sample/src/main/java/com/bignerdranch/android/criminalintent/CrimeListFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
5959
if( mMultiSelector==null)return;
6060

6161
Bundle bundle=savedInstanceState;
62-
if(bundle!=null) mMultiSelector=bundle.getParcelable(MultiSelector.TAG);
62+
if(bundle!=null) mMultiSelector=bundle.getParcelable(MultiSelector.TAG);
6363

6464
if(mMultiSelector.isSelectable()){
6565
if(mDeleteMode !=null){
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.bignerdranch.android.multiselector;
2+
3+
import java.io.Serializable;
4+
import java.lang.ref.WeakReference;
5+
6+
/**
7+
* Created by Genius on 1/30/2015.
8+
*/
9+
public class WeakReferenceSelectableHolder<T extends SelectableHolder> extends WeakReference implements Serializable{
10+
11+
public WeakReferenceSelectableHolder(T r) {
12+
super(r);
13+
14+
}
15+
}

0 commit comments

Comments
 (0)