Skip to content

Commit

Permalink
Bump version in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Mar 18, 2016
1 parent 2e6ee99 commit 622cf19
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Minimum code for Gradle integration, place code in your `build.gradle`

```gradle
dependencies {
compile 'com.commit451:PhotoView:1.2.4'
compile 'com.commit451:PhotoView:1.2.5'
}
```

Expand Down Expand Up @@ -59,32 +59,10 @@ public void onCreate(Bundle savedInstanceState) {
mAttacher.update();
```

## Issues With ViewGroups
There are some ViewGroups (ones that utilize onInterceptTouchEvent) that throw exceptions when a PhotoView is placed within them, most notably [ViewPager](http://developer.android.com/reference/android/support/v4/view/ViewPager.html) and [DrawerLayout](https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html). This is a framework issue that has not been resolved. In order to prevent this exception (which typically occurs when you zoom out), take a look at [HackyDrawerLayout](https://github.com/chrisbanes/PhotoView/blob/master/sample/src/main/java/uk/co/senab/photoview/sample/HackyDrawerLayout.java) and you can see the solution is to simply catch the exception. Any ViewGroup which uses onInterceptTouchEvent will also need to be extended and exceptions caught. Use the [HackyDrawerLayout](https://github.com/chrisbanes/PhotoView/blob/master/sample/src/main/java/uk/co/senab/photoview/sample/HackyDrawerLayout.java) as a template of how to do so. The basic implementation is:
```java
public class HackyProblematicViewGroup extends ProblematicViewGroup {

public HackyProblematicViewGroup(Context context) {
super(context);
}

@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
try {
return super.onInterceptTouchEvent(ev);
} catch (IllegalArgumentException e) {
e.printStackTrace();
return false;
}
}
}
```

## Pull Requests / Contribution
Development happens in **develop** branch of this repository, and Pull Requests should be filled against that branch.
Any Pull Request against **master** will be rejected


## License

Copyright 2011, 2012 Chris Banes
Expand Down

0 comments on commit 622cf19

Please sign in to comment.