public static < T extends View > T findViewById ( Activity act , int viewId ) { View containerView = act . getWindow ( ) . getDecorView ( ) ; return findViewById ( containerView , viewId ) ; }
This method returns the reference of the View with the given Id in the layout of the Activity passed as parameter