public static ChooseAuthenticationFragment createChooseAuthenticationFragment ( final Context context , final ArrayList < BoxAuthentication . BoxAuthenticationInfo > listOfAuthInfo ) { ChooseAuthenticationFragment fragment = createAuthenticationActivity ( context ) ; Bundle b = fragment . getArguments ( ) ; if ( b == null ) { b = new Bundle ( ) ; } ArrayList < CharSequence > jsonSerialized = new ArrayList < CharSequence > ( listOfAuthInfo . size ( ) ) ; for ( BoxAuthentication . BoxAuthenticationInfo info : listOfAuthInfo ) { jsonSerialized . add ( info . toJson ( ) ) ; } b . putCharSequenceArrayList ( EXTRA_BOX_AUTHENTICATION_INFOS , jsonSerialized ) ; fragment . setArguments ( b ) ; return fragment ; }
Create an instance of this fragment to display the given list of BoxAuthenticationInfos .