Skip to content

Commit

Permalink
Merge pull request #4 from saurabharora90/develop
Browse files Browse the repository at this point in the history
Version 1.1.1
  • Loading branch information
saurabharora90 committed Dec 27, 2015
2 parents 21c472b + 05eb2a6 commit eb4d50c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Usage
Add a dependency to your `build.gradle`:

dependencies {
compile 'com.sa90.materialarcmenu:library:1.1.0'
compile 'com.sa90.materialarcmenu:library:1.1.1'
}

and include the `com.sa90.materialarcmenu.ArcMenu` as a viewgroup (with the sub-menu's as child) in your layout.
Expand Down Expand Up @@ -108,6 +108,7 @@ Currently the library offers the following customization options:
- `menu_color`: Controls the background color of the FAB Menu. Default to the `colorAccent`
- `menu_ripple_color`: Controls the ripple color of the FAB Menu. Defaults to `colorControlHighlight`
- `menu_radius`: Controls the radius of the arc
- `menu_elevation`: Controls elevation (shadow cast) of the FAB Menu. Default to 6dp.
- `menu_open`: Controls which side of the FAB menu is the arc menu displayed on. Currently supports one of `arc_left` or `arc_right`
- `menu_animation_time`: Controls the animation time to transition the menu from close to open state and vice versa. The time is represented in milli-seconds

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.1.0"
versionName "1.1.1"
}
buildTypes {
release {
Expand All @@ -32,7 +32,7 @@ ext {
artifact = 'library'

libraryDescription = 'An android custom view which allows you to have a arc style-menu on your pages'
libraryVersion = '1.1.0'
libraryVersion = '1.1.1'

developerId = 'saurabharora90'
developerName = 'Saurabh Arora'
Expand Down
6 changes: 5 additions & 1 deletion library/src/main/java/com/sa90/materialarcmenu/ArcMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ArcMenu extends ViewGroup {
ColorStateList mColorStateList;
int mRippleColor;
long mAnimationTime;
float mCurrentRadius, mFinalRadius;
float mCurrentRadius, mFinalRadius, mElevation;
boolean mIsOpened = false;
double mQuadrantAngle;
MenuSideEnum mMenuSideEnum;
Expand All @@ -56,6 +56,7 @@ private void init(TypedArray attr) {
mDrawable = attr.getDrawable(R.styleable.ArcMenu_menu_scr);
mColorStateList = attr.getColorStateList(R.styleable.ArcMenu_menu_color);
mFinalRadius = attr.getDimension(R.styleable.ArcMenu_menu_radius, resources.getDimension(R.dimen.default_radius));
mElevation = attr.getDimension(R.styleable.ArcMenu_menu_elevation, resources.getDimension(R.dimen.default_elevation));
mMenuSideEnum = MenuSideEnum.fromId(attr.getInt(R.styleable.ArcMenu_menu_open, 0));
mAnimationTime = attr.getInteger(R.styleable.ArcMenu_menu_animation_time, ANIMATION_TIME);
mCurrentRadius = 0;
Expand Down Expand Up @@ -97,6 +98,9 @@ private void addMainMenu() {
fabMenu.setOnClickListener(mMenuClickListener);
fabMenu.setRippleColor(mRippleColor);

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
fabMenu.setElevation(mElevation);

addView(fabMenu);
}

Expand Down
1 change: 1 addition & 0 deletions library/src/main/res/values/attr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<enum name="arc_right" value="1"/>
</attr>
<attr name="menu_animation_time" format="integer"/>
<attr name="menu_elevation" format="dimension"/>
</declare-styleable>
</resources>
1 change: 1 addition & 0 deletions library/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<dimen name="default_radius">150dp</dimen>
<dimen name="default_elevation">6dp</dimen>
</resources>

0 comments on commit eb4d50c

Please sign in to comment.