Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
Rename setter
Browse files Browse the repository at this point in the history
  • Loading branch information
jahirfiquitiva committed Aug 29, 2017
1 parent d700c3a commit 4605331
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void onClick(View view) {
});

final FABsMenu menu = findViewById(R.id.fabs_menu);
menu.setMenuUpdateListener(new FABsMenuListener() {
menu.setMenuListener(new FABsMenuListener() {
// You don't need to override all methods. Just the ones you want.

@Override
Expand Down
18 changes: 16 additions & 2 deletions library/src/main/java/jahirfiquitiva/libs/fabsmenu/FABsMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ private void init(Context context, AttributeSet attributeSet) {
menuButtonRippleColor = attr.getColor(R.styleable.FABsMenu_fab_moreButtonRippleColor,
getColor(android.R.color.holo_blue_light));

menuButtonSize = attr.getInt(R.styleable.FABsMenu_fab_moreButtonSize, TitleFAB
.SIZE_NORMAL);
menuButtonSize = attr.getInt(R.styleable.FABsMenu_fab_moreButtonSize,
TitleFAB.SIZE_NORMAL);

expandDirection = attr.getInt(R.styleable.FABsMenu_fab_expandDirection, EXPAND_UP);

Expand All @@ -165,6 +165,10 @@ private void init(Context context, AttributeSet attributeSet) {

attr.recycle();

if (menuListener == null) {
setMenuListener(new FABsMenuListener() {
});
}
createAddButton(context);
} catch (Exception e) {
e.printStackTrace();
Expand Down Expand Up @@ -823,7 +827,17 @@ public FABsMenuListener getMenuListener() {
return menuListener;
}

/**
* @param menuListener
* the menu listener
* @deprecated Use {@link #setMenuListener(FABsMenuListener)} instead
*/
@Deprecated
public void setMenuUpdateListener(FABsMenuListener menuListener) {
setMenuListener(menuListener);
}

public void setMenuListener(FABsMenuListener menuListener) {
this.menuListener = menuListener;
}

Expand Down

0 comments on commit 4605331

Please sign in to comment.