Skip to content

Commit

Permalink
- added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Nkgohil007 committed Aug 17, 2021
1 parent a710c0f commit 6cf04a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,23 @@ class LiquidNavBarView : BottomNavigationView, NavigationBarView.OnItemSelectedL
defStyleAttr
) {

val a = resources.obtainAttributes(attrs, R.styleable.LiquidTabBarView)
val a = resources.obtainAttributes(attrs, R.styleable.LiquidNavbarView)

val typedValue = TypedValue()
context.theme?.resolveAttribute(R.attr.colorPrimary, typedValue, true)
val backgroundTint =
a.getColor(R.styleable.LiquidTabBarView_backgroundTint, typedValue.data)
a.getColor(R.styleable.LiquidNavbarView_backgroundTint, typedValue.data)

val liquidNavbarItemRadius = a.getDimensionPixelSize(
R.styleable.LiquidTabBarView_liquidNavbarItemRadius,
R.styleable.LiquidNavbarView_liquidNavbarItemRadius,
dpToPx(64f).toInt()
).toFloat()
val liquidNavbarVerticalOffset = a.getDimensionPixelSize(
R.styleable.LiquidTabBarView_liquidNavbarVerticalOffset,
R.styleable.LiquidNavbarView_liquidNavbarVerticalOffset,
dpToPx(8f).toInt()
).toFloat()
val liquidNavbarCornerRadius = a.getDimensionPixelSize(
R.styleable.LiquidTabBarView_liquidNavbarCornerRadius,
R.styleable.LiquidNavbarView_liquidNavbarCornerRadius,
dpToPx(128f).toInt()
).toFloat()
a.recycle()
Expand Down
2 changes: 1 addition & 1 deletion LiquidNavBar/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LiquidTabBarView">
<declare-styleable name="LiquidNavbarView">
<attr name="backgroundTint" format="color" />
<attr name="liquidNavbarItemRadius" format="dimension" />
<attr name="liquidNavbarVerticalOffset" format="dimension" />
Expand Down

0 comments on commit 6cf04a1

Please sign in to comment.