Skip to content

Commit

Permalink
Merge pull request #30 from ankitpopli1891/master
Browse files Browse the repository at this point in the history
closes #29, adds attr to modify center button icon, update will be as soon as possible. Thanks!
  • Loading branch information
armcha authored Oct 14, 2016
2 parents 30789d7 + 69bf4f0 commit ec259c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ private void init(AttributeSet attrs) {
centreButtonColor = typedArray.getColor(com.luseen.spacenavigation.R.styleable.SpaceNavigationView_centre_button_color, resources.getColor(com.luseen.spacenavigation.R.color.centre_button_color));
activeSpaceItemColor = typedArray.getColor(com.luseen.spacenavigation.R.styleable.SpaceNavigationView_active_item_color, resources.getColor(com.luseen.spacenavigation.R.color.space_white));
inActiveSpaceItemColor = typedArray.getColor(com.luseen.spacenavigation.R.styleable.SpaceNavigationView_inactive_item_color, resources.getColor(com.luseen.spacenavigation.R.color.default_inactive_item_color));
centreButtonIcon = typedArray.getResourceId(R.styleable.SpaceNavigationView_centre_button_icon, R.drawable.near_me);
centreButtonIconColor = typedArray.getColor(R.styleable.SpaceNavigationView_centre_button_icon_color, resources.getColor(R.color.space_white));

typedArray.recycle();
Expand Down Expand Up @@ -328,6 +329,7 @@ public boolean onLongClick(View v) {
*/
LayoutParams centreContentParams = new LayoutParams(centreContentWight, spaceNavigationHeight);
centreContentParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
centreContentParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);

/**
* Centre Background View content size and position
Expand Down
1 change: 1 addition & 0 deletions spacelib/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<attr name="centre_button_color" format="color" />
<attr name="active_item_color" format="color" />
<attr name="inactive_item_color" format="color" />
<attr name="centre_button_icon" format="reference" />
<attr name="centre_button_icon_color" format="color" />
</declare-styleable>

Expand Down

0 comments on commit ec259c8

Please # to comment.