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

Commit 21a1cf5

Browse files
committed
fixing rotation issue
1 parent a6f5536 commit 21a1cf5

File tree

3 files changed

+7
-47
lines changed

3 files changed

+7
-47
lines changed

criminalintent-sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 21
5-
buildToolsVersion "21.0.2"
5+
buildToolsVersion "21.1.2"
66

77
defaultConfig {
88
applicationId "com.bignerdranch.android.criminalintent"

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import android.support.v7.app.ActionBarActivity;
1010
import android.support.v7.view.ActionMode;
1111
import android.support.v7.widget.LinearLayoutManager;
12+
import android.support.v7.widget.RecyclerView;
13+
import android.util.Log;
1214
import android.view.ContextMenu;
1315
import android.view.ContextMenu.ContextMenuInfo;
1416
import android.view.LayoutInflater;
@@ -18,7 +20,6 @@
1820
import android.view.View;
1921
import android.view.ViewGroup;
2022
import android.widget.CheckBox;
21-
import android.support.v7.widget.RecyclerView;
2223
import android.widget.TextView;
2324

2425
import com.bignerdranch.android.multiselector.ModalMultiSelectorCallback;
@@ -30,7 +31,7 @@
3031
public class CrimeListFragment extends BaseFragment {
3132

3233
private RecyclerView mRecyclerView;
33-
34+
private static final String TAG="crimeListFragment";
3435
private MultiSelector mMultiSelector = new MultiSelector();
3536

3637
private ArrayList<Crime> mCrimes;
@@ -118,7 +119,7 @@ public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
118119
// not after. No idea why, but it crashes.
119120
actionMode.finish();
120121

121-
for (int i = mCrimes.size(); i > 0; i--) {
122+
for (int i = mCrimes.size(); i >= 0; i--) {
122123
if (mMultiSelector.isSelected(i, 0)) {
123124
Crime crime = mCrimes.get(i);
124125
CrimeLab.get(getActivity()).deleteCrime(crime);
@@ -234,6 +235,7 @@ public CrimeHolder onCreateViewHolder(ViewGroup parent, int pos) {
234235
public void onBindViewHolder(CrimeHolder holder, int pos) {
235236
Crime crime = mCrimes.get(pos);
236237
holder.bindCrime(crime);
238+
Log.d(TAG,"binding crime"+crime+"at position"+pos);
237239
}
238240

239241
@Override

recyclerview-multiselect/build.gradle

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def isSnapshot = version.endsWith('-SNAPSHOT')
99

1010
android {
1111
compileSdkVersion 21
12-
buildToolsVersion "21.0.2"
12+
buildToolsVersion "21.1.2"
1313

1414
defaultConfig {
1515
minSdkVersion 11
@@ -35,48 +35,6 @@ android {
3535
sign configurations.archives
3636
}
3737

38-
uploadArchives {
39-
repositories {
40-
mavenDeployer {
41-
beforeDeployment { MavenDeployment deployment ->
42-
signing.signPom(deployment)
43-
}
44-
45-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
46-
authentication(userName: ossrhUsername, password: ossrhPassword)
47-
}
48-
49-
pom.project {
50-
packaging 'aar'
51-
name 'RecyclerView MultiSelect'
52-
description 'An Android library that handles displaying and managing selections in RecyclerView.'
53-
54-
url 'https://bignerdranch.github.io/recyclerview-multiselect/'
55-
56-
scm {
57-
url 'https://github.com/bignerdranch/recyclerview-multiselect'
58-
connection 'scm:git:https://github.com/bignerdranch/recyclerview-multiselect.git'
59-
}
60-
61-
licenses {
62-
license {
63-
name 'MIT License'
64-
url 'http://opensource.org/licenses/MIT'
65-
distribution 'repo'
66-
}
67-
}
68-
69-
developers {
70-
developer {
71-
id 'jingibus'
72-
name 'Bill Phillips'
73-
email 'phillips@bignerdranch.com'
74-
}
75-
}
76-
}
77-
}
78-
}
79-
}
8038

8139
android.libraryVariants.all { variant ->
8240
task("generate${variant.name.substring(0,1).toUpperCase() + variant.name.substring(1)}Javadoc", type: Javadoc) {

0 commit comments

Comments
 (0)