66import androidx .appcompat .app .AppCompatActivity ;
77import androidx .appcompat .widget .AppCompatTextView ;
88import androidx .constraintlayout .widget .Group ;
9- import androidx .coordinatorlayout .widget .CoordinatorLayout ;
109import androidx .core .app .ActivityCompat ;
1110import androidx .core .app .ActivityOptionsCompat ;
1211import androidx .core .app .SharedElementCallback ;
1312import androidx .core .content .ContextCompat ;
1413import androidx .core .content .FileProvider ;
1514import androidx .core .graphics .Insets ;
16- import androidx .core .graphics .drawable .BitmapDrawableKt ;
1715import androidx .core .graphics .drawable .DrawableKt ;
1816import androidx .core .view .ViewCompat ;
1917import androidx .core .view .WindowCompat ;
2826import android .Manifest ;
2927import android .animation .Animator ;
3028import android .animation .AnimatorListenerAdapter ;
31- import android .animation .StateListAnimator ;
3229import android .animation .ValueAnimator ;
3330import android .annotation .SuppressLint ;
3431import android .app .Activity ;
3936import android .content .pm .ResolveInfo ;
4037import android .content .res .TypedArray ;
4138import android .graphics .Bitmap ;
42- import android .graphics .BitmapFactory ;
39+ import android .graphics .Color ;
4340import android .graphics .Rect ;
44- import android .graphics .drawable .BitmapDrawable ;
41+ import android .graphics .drawable .ColorDrawable ;
4542import android .net .Uri ;
4643import android .os .Build ;
4744import android .os .Bundle ;
6259import android .view .ViewTreeObserver ;
6360import android .view .Window ;
6461import android .view .WindowManager ;
65- import android .view .animation .Animation ;
6662import android .view .animation .OvershootInterpolator ;
6763import android .widget .Button ;
6864import android .widget .FrameLayout ;
6965import android .widget .ImageButton ;
7066import android .widget .ImageView ;
7167import android .widget .TextView ;
7268import android .widget .Toast ;
73- import android .window .OnBackInvokedCallback ;
74- import android .window .OnBackInvokedDispatcher ;
7569
7670
7771import com .aurelhubert .ahbottomnavigation .AHBottomNavigation ;
10599import ir .smartdevelopers .smartfilebrowser .customClasses .OnItemChooseListener ;
106100import ir .smartdevelopers .smartfilebrowser .customClasses .OnItemClickListener ;
107101import ir .smartdevelopers .smartfilebrowser .customClasses .OnItemSelectListener ;
108- import ir .smartdevelopers .smartfilebrowser .customClasses .RoundViewGroup ;
102+ import ir .smartdevelopers .smartfilebrowser .customClasses .RoundLinearLayout ;
109103import ir .smartdevelopers .smartfilebrowser .customClasses .SFBFileFilter ;
110104import ir .smartdevelopers .smartfilebrowser .customClasses .SearchView ;
111105import ir .smartdevelopers .smartfilebrowser .models .AlbumModel ;
@@ -127,7 +121,7 @@ public class FileBrowserMainActivity extends AppCompatActivity {
127121 private static final int REQ_CODE_AUDIO_PERMISSION = 307 ;
128122 private static final int REQ_CODE_FILE_PERMISSION = 308 ;
129123 private AppBarLayout mAppBarLayout ;
130- private RoundViewGroup mBottomSheetRoot ;
124+ private RoundLinearLayout mBottomSheetRoot ;
131125 private MyBehavior <View > mBottomSheetBehavior ;
132126 private AHBottomNavigation mBottomNavigationView ;
133127 private View mMainRootView ;
@@ -250,12 +244,18 @@ public boolean accept(File pathname) {
250244
251245 @ Override
252246 protected void onCreate (Bundle savedInstanceState ) {
253- WindowCompat .enableEdgeToEdge (getWindow ());
254- getWindow ().requestFeature (Window .FEATURE_ACTIVITY_TRANSITIONS );
255-
256- getWindow ().setAllowEnterTransitionOverlap (false );
247+ setTheme (R .style .sfb_MainAppTheme_sfb_AppTheme );
248+ Window window = getWindow ();
249+ WindowCompat .enableEdgeToEdge (window );
250+ window .setBackgroundDrawable (new ColorDrawable (Color .TRANSPARENT ));
251+ window .addFlags (WindowManager .LayoutParams .FLAG_DIM_BEHIND );
252+ // window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
253+ window .setDimAmount (0.6f );
254+
255+ window .requestFeature (Window .FEATURE_ACTIVITY_TRANSITIONS );
256+ window .setAllowEnterTransitionOverlap (false );
257257 Transition transition = TransitionInflater .from (this ).inflateTransition (R .transition .iten_transition_in );
258- getWindow () .setSharedElementExitTransition (transition );
258+ window .setSharedElementExitTransition (transition );
259259 setExitSharedElementCallback (new SharedElementCallback () {
260260 @ Override
261261 public void onMapSharedElements (List <String > names , Map <String , View > sharedElements ) {
@@ -282,6 +282,9 @@ public void onMapSharedElements(List<String> names, Map<String, View> sharedElem
282282 .get (FilesViewModel .class );
283283 mResultListener = ResultListener .getInstance ();
284284 findViews ();
285+ // if ((window.getAttributes().flags & WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) == WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION){
286+ // String s="true";
287+ // }
285288 manageEdgeToEdge ();
286289 getDataFromIntent ();
287290 if (savedInstanceState == null ) {
0 commit comments