android - Define layout content area -


enter image description here

i want define contentarea of frame/linear/relative layout when layout.addview(view); added within boundries , rest of view clipped away. picture of shirt, if want define boundries of shirt area of content...how can that. suggestions/help? thanks

ps: cannot in 9-patch (right , bottom) defines in rectangular shape, in case shape can of shirt. want omit white/transparent part contentarea.

try below code :- in case trying solve same problem, there better solution: bitmap.createbitmap(bitmap, int x, int y, int width, int height). example, if need crop 10 pixels each side of bitmap use this:

bitmap croppedbitmap = bitmap.createbitmap(originalbitmap, 10, 10, originalbitmap.get 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -