package Ġab his he kt i 7 . unic orn . file picker Ċ Ċ import Ġab his he kt i 7 . unic orn . file picker . R . style Ċ import Ġab his he kt i 7 . unic orn . file picker . models . Config Ċ import Ġandroidx . annotation . Style Res Ċ import Ġjava . util . ArrayList Ċ import Ġjava . util . Arrays Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠAb his he k ĠT iw ari Ġon Ġ 0 9 - 0 1 - 2 0 2 1 . Ċ Ġ*/ Ċ class ĠConfig Builder ( private Ġval Ġfile Picker : ĠFile Picker ) Ġ{ Ċ ĉ private Ġvar Ġroot Dir : ĠString ? Ġ= Ġnull Ċ ĉ private Ġvar Ġshow Hidden Ġ= Ġfalse Ċ ĉ private Ġvar Ġselect Multiple Ġ= Ġfalse Ċ ĉ private Ġvar Ġadd Divider Ġ= Ġfalse Ċ ĉ private Ġvar Ġshow Only Dir Ġ= Ġfalse ĊĊ ĉ @ Style Res Ġprivate Ġvar Ġtheme Id Ġ= Ġstyle . Un icorn File Picker _ Default Ċ ĉ private Ġvar Ġextension Filters : ĠArrayList < String >? Ġ= Ġnull Ċ ĉ private Ġval Ġconfig : ĠConfig Ġ= ĠConfig . get Clean Instance () ĊĊĊ ĉ fun Ġset Root Directory ( dir Path : ĠString ?): ĠConfig Builder Ġ{ Ċĉ ĉ rootDir Ġ= Ġdir Path Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġshow Hidden Files ( value : ĠBoolean ): ĠConfig Builder Ġ{ Ċĉ ĉ show Hidden Ġ= Ġvalue Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġselect Multiple Files ( value : ĠBoolean ): ĠConfig Builder Ġ{ Ċĉ ĉ select Multiple Ġ= Ġvalue Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġset Filters ( filters : ĠArray < String ?> ): ĠConfig Builder Ġ{ Ċĉ ĉ extension Filters Ġ= ĠArrayList ( Arrays . asList (* filters )) Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġadd Item Divider ( value : ĠBoolean ): ĠConfig Builder Ġ{ Ċĉ ĉ add Divider Ġ= Ġvalue Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġtheme (@ Style Res Ġtheme : ĠInt ): ĠConfig Builder Ġ{ Ċĉ ĉ theme Id Ġ= Ġtheme Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġshow Only Directory ( value : ĠBoolean ): ĠConfig Builder Ġ{ Ċĉ ĉ show Only Dir Ġ= Ġvalue Ċĉ ĉ return Ġthis Ċ ĉ } ĊĊ ĉ fun Ġbuild (): ĠFile Picker Ġ{ Ċĉ ĉ config . rootDir Ġ= Ġroot Dir Ċĉ ĉ config . is Select Multiple Ġ= Ġselect Multiple Ċĉ ĉ config . set Show Hidden ( show Hidden ) Ċĉ ĉ config . extension Filters Ġ= Ġextension Filters Ċĉ ĉ config . set AddItem Divider ( add Divider ) Ċĉ ĉ config . theme Id Ġ= Ġtheme Id Ċĉ ĉ config . set Show Only Directory ( show Only Dir ) Ċĉ ĉ return Ġfile Picker Ċ ĉ } Ċ Ċ } Ċ