Skip to content

Commit

Permalink
Update dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaeldivita committed Jul 9, 2020
1 parent 0a6851c commit 5805bf4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class VerticalMenuItemView @JvmOverloads constructor(
private val container by lazy { findViewById<View>(R.id.cbn_item_internal_container) }
private val containerBackground = GradientDrawable()
private val containerForeground = GradientDrawable()
private val doubleSpace = resources.getDimension(R.dimen.cnb_double_space).toInt()
private val doubleSpace = resources.getDimension(R.dimen.cnb_space_2).toInt()
private val originalTypeFace: Typeface
private var badgeCount = -1
private var radius = 0f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
android:layout_gravity="center"
android:duplicateParentState="true"
android:gravity="start"
android:layout_margin="@dimen/cnb_space"
android:orientation="horizontal"
android:padding="@dimen/cnb_medium_space"
android:paddingStart="@dimen/cnb_space_3"
android:paddingTop="@dimen/cnb_space_1"
android:paddingEnd="@dimen/cnb_space_3"
android:paddingBottom="@dimen/cnb_space_1"
tools:background="#000">

<com.ismaeldivita.chipnavigation.view.BadgeImageView
Expand All @@ -30,8 +32,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="@dimen/cnb_space"
android:layout_marginEnd="@dimen/cnb_space"
android:layout_marginStart="@dimen/cnb_space_1"
android:duplicateParentState="true"
android:singleLine="true"
android:visibility="gone"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
android:id="@+id/cbn_item_internal_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/cnb_space"
android:layout_marginEnd="@dimen/cnb_double_space"
android:layout_marginBottom="@dimen/cnb_space"
android:layout_marginTop="@dimen/cnb_space_0"
android:layout_marginEnd="@dimen/cnb_space_2"
android:layout_marginBottom="@dimen/cnb_space_0"
android:duplicateParentState="true"
android:gravity="start"
android:orientation="horizontal"
android:padding="@dimen/cnb_double_space"
android:padding="@dimen/cnb_space_2"
tools:background="#000"
tools:layout_width="200dp">

<com.ismaeldivita.chipnavigation.view.BadgeImageView
android:id="@+id/cnb_item_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/cnb_double_space"
android:layout_marginEnd="@dimen/cnb_space_2"
android:duplicateParentState="true"
tools:src="@android:drawable/btn_star_big_off"
tools:visibility="visible" />
Expand All @@ -34,8 +34,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/cnb_double_space"
android:layout_marginEnd="@dimen/cnb_space"
android:layout_marginStart="@dimen/cnb_space_2"
android:layout_marginEnd="@dimen/cnb_space_0"
android:duplicateParentState="true"
android:singleLine="true"
tools:text="Discover"
Expand All @@ -47,7 +47,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/cnb_space"
android:layout_marginEnd="@dimen/cnb_space_0"
android:layout_weight="1"
android:duplicateParentState="true"
android:ellipsize="middle"
Expand Down
8 changes: 5 additions & 3 deletions chip-navigation-bar/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="cnb_space">6dp</dimen>
<dimen name="cnb_medium_space">8dp</dimen>
<dimen name="cnb_double_space">12dp</dimen>
<dimen name="cnb_space_0">6dp</dimen>
<dimen name="cnb_space_1">8dp</dimen>
<dimen name="cnb_space_2">12dp</dimen>
<dimen name="cnb_space_3">16dp</dimen>

<dimen name="cnb_icon_size">24dp</dimen>

<dimen name="cnb_badge_size">12dp</dimen>
Expand Down

0 comments on commit 5805bf4

Please sign in to comment.