Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed references to SparseArray.removeAt() to SparseArray.remove() wit... #2

Merged
merged 2 commits into from
Sep 9, 2013

Conversation

eschlenz
Copy link
Contributor

@eschlenz eschlenz commented Sep 7, 2013

Jake,

Great idea (this project). I made a few beneficial changes that I would like you to accept:

  1. I believe there was a small bug in the static retrieveFromScrap function. Within the loop, where you break out early, you were removing from the scrapViews using the for loop's index. I believe you meant to remove by key here.

  2. I have changed references to removeAt to remove() with a key look up. This makes the code compatible with versions prior to API level 11.

  3. I wrapped the setAccessibilityDelegate in an SDK version check, making it compatible with API levels below 14.

Please accept these changes.

Eric Schlenz

P.S. I am using your ViewPagerIndicator library. Love it! Nice stuff you are contributing.

…with key look up. Wrapped setAccessibilityDelegate with an SDK version check.
@@ -98,7 +100,9 @@ void scrapActiveViews() {
}
scrapViews.put(i, victim);

victim.setAccessibilityDelegate(null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
victim.setAccessibilityDelegate(null);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be two space indent.

@eschlenz
Copy link
Contributor Author

eschlenz commented Sep 9, 2013

2 spaces rather than 4, per your request.

JakeWharton added a commit that referenced this pull request Sep 9, 2013
Changed references to SparseArray.removeAt() to SparseArray.remove() wit...
@JakeWharton JakeWharton merged commit ad5d596 into JakeWharton:master Sep 9, 2013
@JakeWharton
Copy link
Owner

Awesome. Thanks!

@eschlenz
Copy link
Contributor Author

eschlenz commented Sep 9, 2013

No worries. Thank you for your contributions!

Eric

On Mon, Sep 9, 2013 at 9:56 AM, Jake Wharton notifications@github.comwrote:

Awesome. Thanks!@


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-24089050
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants