Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

java.lang.IllegalArgumentException: path must be convex #11

Closed
onuryurtturk opened this issue Mar 9, 2017 · 5 comments
Closed

java.lang.IllegalArgumentException: path must be convex #11

onuryurtturk opened this issue Mar 9, 2017 · 5 comments

Comments

@onuryurtturk
Copy link

When I change height of diagonalLayout on xml, app is crashing. Just I can set 250dp.
Any solution?

@florent37
Copy link
Owner

have you try on the new version ?

@mradzinski
Copy link

mradzinski commented Apr 10, 2017

@florent37, I've tried it. It seems (and it's pretty obvious) that if your view is too small for the angle of the diagonal path to be convex then this error gets thrown. I wouldn't mind that much considering that if the user wants the layout to be of 50dp then he/she will have to reduce the angle accordingly.

In other words: You CAN'T have a rectangle of 5cm (h) x 50cm (w) and expect to trace a diagonal of 75 degrees from top right corner to bottom left corner.

untitled diagram

@onuryurtturk
Copy link
Author

@florent37 yeap, I also tried it

@mradzinski
Copy link

mradzinski commented Apr 11, 2017

@onuryurtturk I understand that, but this is not certainly an issue. This library's idea is to allow you to have a diagonal cut that goes from corner to corner. If you refer to the picture I uploaded in my previous answer you'll see why the exception is being thrown... that's pretty much what you are trying to achieve and that's not the main purpose of this library.

@florent37
Copy link
Owner

try with . 1.0.9

compile 'com.github.florent37:diagonallayout:1.0.9'

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

No branches or pull requests

3 participants