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

AN_491 changes in the floating action menu class to suit our requirement #331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,26 @@ public class FloatingActionMenu extends ViewGroup {
private String mMenuLabelText;
private boolean mUsingMenuLabel;

public static final int VIEW_MODE_MENU = 0;
public static final int VIEW_MODE_BUTTON = 1;

public int getViewMode() {
return viewMode;
}

public void setViewMode(int viewMode) {
this.viewMode = viewMode;
}

private int viewMode = 1;


public void setClickListener(OnClickListener mClickListener) {
this.mClickListener = mClickListener;
}

private OnClickListener mClickListener = null;

public interface OnMenuToggleListener {
void onMenuToggle(boolean opened);
}
Expand Down Expand Up @@ -467,6 +487,7 @@ private void createLabels() {
@Override
public void onClick(View v) {
toggle(mIsAnimated);
fab.setOnClickListener(mClickListener);
}
});
}
Expand Down Expand Up @@ -601,7 +622,7 @@ public boolean onTouchEvent(MotionEvent event) {
close(mIsAnimated);
handled = true;
}

this.setViewMode(VIEW_MODE_MENU);
return handled;
}

Expand Down