few code cleanups #334

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

krishnakumarp commented Mar 27, 2013

removed unnecessary casts
replace String.indexOf with String.contains

@krishnakumarp krishnakumarp few code refactoring/cleanup
removed unnecessary casts
replace String.indexOf with String.contains
08e859a

@kevinsawicki kevinsawicki and 1 other commented on an outdated diff Apr 26, 2013

app/src/main/java/com/github/mobile/ui/ViewPager.java
@@ -112,7 +112,7 @@ public void run() {
protected boolean canScroll(final View v, final boolean checkV,
final int dx, final int x, final int y) {
if (SDK_INT < ICE_CREAM_SANDWICH && v instanceof WebView)
- return ((WebView) v).canScrollHorizontally(-dx);
+ return v.canScrollHorizontally(-dx);
@kevinsawicki

kevinsawicki Apr 26, 2013

Contributor

canScrollHorizontally was added in API level 14 to View so this cast is still needed.

@coyotini22

coyotini22 May 2, 2013

-----Original Message-----
From: Kevin Sawicki notifications@github.com
To: github/android android@noreply.github.com
Sent: Fri, Apr 26, 2013 7:52 pm
Subject: Re: [android] few code cleanups (#334)

In app/src/main/java/com/github/mobile/ui/ViewPager.java:

@@ -112,7 +112,7 @@ public void run() {
protected boolean canScroll(final View v, final boolean checkV,
final int dx, final int x, final int y) {
if (SDK_INT < ICE_CREAM_SANDWICH && v instanceof WebView)

  •        return ((WebView) v).canScrollHorizontally(-dx);
    
  •        return v.canScrollHorizontally(-dx);
    

canScrollHorizontally was added in API level 14 to View so this cast is still needed.

Reply to this email directly or view it on GitHub.

@krishnakumarp krishnakumarp Reverting removal of a cast
canScrollHorizontally was added in API level 14 to View. Adding the type
cast back into code.
d720b3d
Contributor

kevinsawicki commented May 2, 2013

Thanks, merged into master as commit 836de09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment