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

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -