public void addMenuItem(FloatingActionButton item){
  mMenuItems.add(item);
  mMenuItemAnimators.add(new ItemAnimator(item));
  TextView button=new TextView(getContext());
  LayoutParams params=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
  button.setLayoutParams(params);
  button.setBackgroundResource(R.drawable.rounded_corners);
  button.setTextColor(Color.WHITE);
  button.setText(item.getContentDescription());
  Integer paddingSize=(int)button.getTextSize() / 3;
  button.setPadding(paddingSize,paddingSize,paddingSize,paddingSize);
  addView(button);
  mMenuItemLabels.add(button);
  item.setTag(button);
  item.setOnClickListener(mOnItemClickListener);
  button.setOnClickListener(mOnItemClickListener);
}

public void addMenuItem ( FloatingActionButton item ) { mMenuItems . add ( item ) ; mMenuItemAnimators . add ( new ItemAnimator ( item ) ) ; TextView button = new TextView ( getContext ( ) ) ; LayoutParams params = new LayoutParams ( LayoutParams . WRAP_CONTENT , LayoutParams . WRAP_CONTENT ) ; button . setLayoutParams ( params ) ; button . setBackgroundResource ( R . drawable . rounded_corners ) ; button . setTextColor ( Color . WHITE ) ; button . setText ( item . getContentDescription ( ) ) ; Integer paddingSize = ( int ) button . getTextSize ( ) / 3 ; button . setPadding ( paddingSize , paddingSize , paddingSize , paddingSize ) ; addView ( button ) ; mMenuItemLabels . add ( button ) ; item . setTag ( button ) ; item . setOnClickListener ( mOnItemClickListener ) ; button . setOnClickListener ( mOnItemClickListener ) ; }
adds a new menu item to the floatingactionmenu .
