Skip to content

Commit

Permalink
refactor(ScheduledStatusListFragment): refactor the apply window inse…
Browse files Browse the repository at this point in the history
…ts method

This allows for a smoother experience in my views
  • Loading branch information
LucasGGamerM committed Sep 21, 2023
1 parent 1edcf84 commit 885b3e3
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,7 @@ protected ScheduledStatus getStatusByID(String id){
public void onApplyWindowInsets(WindowInsets insets){
if(contentView!=null){
if(Build.VERSION.SDK_INT>=29 && insets.getTappableElementInsets().bottom==0){
int insetBottom=insets.getSystemWindowInsetBottom();
((ViewGroup.MarginLayoutParams) list.getLayoutParams()).bottomMargin=insetBottom;
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+insetBottom;
insets=insets.inset(0, 0, 0, insetBottom);
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16)+insets.getSystemWindowInsetBottom();
}else{
((ViewGroup.MarginLayoutParams) fab.getLayoutParams()).bottomMargin=V.dp(16);
}
Expand Down

0 comments on commit 885b3e3

Please sign in to comment.