Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Android: How to get a View position before and after an layout update? -


i'm trying create animation link 2 position of view. position of view defined overridden method onlayout. i'm getting position before , after position update getlocationonscreen method.

here code simplified:

int[] startposition = new int[2]; view.getlocationonscreen(startposition);  // layout update changed view position on screen  requestlayout(); invalidate();  int[] endposition = new int[2]; view.getlocationonscreen(endposition);  animation anim = new translateanimation(startposition[0], endposition[0], startposition[1], endposition[1]); anim.setduration(100); view.startanimation(anim); 

the problem onlayout method isn't called after layout update , call requestlayout... found calling requestlayout schedule layout pass of view tree. question is: how make layout calculation synchronously ? or wait end ? use postdelayed or add event system onlayout method, i'd test cleaner methods first... call onlayout method myself, don't know how calculate arguments.

any idea welcomed !


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -