private Fragment getSupportFragment ( String tag , int id ) { FragmentActivity fragmentActivity = null ; try { fragmentActivity = ( FragmentActivity ) activityUtils . getCurrentActivity ( false ) ; } catch ( Throwable ignored ) { } if ( fragmentActivity != null ) { try { if ( tag == null ) return fragmentActivity . getSupportFragmentManager ( ) . findFragmentById ( id ) ; else return fragmentActivity . getSupportFragmentManager ( ) . findFragmentByTag ( tag ) ; } catch ( NoSuchMethodError ignored ) { } } return null ; }
Returns a SupportFragment with a given tag or id .