Skip to content

Commit

Permalink
Use View.setPaddingRelative directly
Browse files Browse the repository at this point in the history
  • Loading branch information
t895 authored and thestinger committed Jan 4, 2025
1 parent 806ddcf commit 9503223
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class BottomTabLayout @JvmOverloads constructor(
val firstTab = tabParent.getChildAt(0)
val lastTab = tabParent.getChildAt(tabParent.childCount - 1)
sp = width / 2 - firstTab.width / 2
ViewCompat.setPaddingRelative(
getChildAt(0),
getChildAt(0).setPaddingRelative(
sp,
0,
width / 2 - lastTab.width / 2,
Expand Down

0 comments on commit 9503223

Please sign in to comment.