MaterialDesignLibrary icon indicating copy to clipboard operation
MaterialDesignLibrary copied to clipboard

problem with mark position of checkbox in android L

Open rexi1r opened this issue 10 years ago • 5 comments

hi. CheckBox work fine in some android L but in LG G3 i got a wrong position for Checkmark. screenshot_2015-06-06-17-08-46

rexi1r avatar Jun 06 '15 12:06 rexi1r

The problem is in the below code Rect src = new Rect(40 * step, 0, (40 * step) + 40, 40); Rect dst = new Rect(0, 0, this.getWidth() - 2, this.getHeight()); wrong size and wrong position. how can i solve this?

rexi1r avatar Jun 07 '15 13:06 rexi1r

Same here. Need help ;)

Remasky avatar Jul 09 '15 07:07 Remasky

no solution???????

rexi1r avatar Jul 28 '15 11:07 rexi1r

This library uses drawable to provide this type of checkBox. This problem happens because the resolution of G3 is too big and the file at resource can't handle this resolution.

ppamorim avatar Jul 28 '15 11:07 ppamorim

I had the same problem in a LG G4. Simple workaround (not the best temporary helps):

int slice = sprite.getWidth() / 12;
int height = sprite.getHeight();
Rect src = new Rect(slice * step, 0, (slice * step) + slice, height);
Rect dst = new Rect(0, 0, this.getWidth() - 2, this.getHeight());

josefigueredo avatar Oct 23 '15 15:10 josefigueredo