Monday 15 April 2013

android - Images won't shrink when thumbnail area is pressed in an imageview -



android - Images won't shrink when thumbnail area is pressed in an imageview -

i'm trying implement imageview users can press on thumbnail , have image expand , press on same image 1 time again , have image shrink thumbnail.

the problem i'm having after image has expanded if user presses on area on original thumbnail was, refreshes expanded image instead of shrinking it, user has press on part of screen doesn't cover original thumbnail in order shrink downwards again.

is there kind of property need alter in xml prepare or related java code?

you should have status thumbnail button won't same thing twice. ex:

boolean thumbnailclicked = false; ... @override onclick(view v) { if(thumbnailclicked){ //code decrease image size here thumbnailclicked = false; } else { //code increment image size here thumbnailclicked = true; } }

android imageview

No comments:

Post a Comment