Search code examples
androidfloating-action-buttonaction-button

Increasing the size of a floating sub-action-button


Am using a CircularFloatingActionMenu library, I have successfully implemented this library, but I want to increase the size of the 4 sub-action button

Please find below the code am using

final ImageView fabIconNew = new ImageView(this);
  fabIconNew.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_new));
final FloatingActionButton rightLowerButton = new FloatingActionButton.Builder(this)
        .setContentView(fabIconNew)
        .build();


SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(this);
ImageView rlIcon1 = new ImageView(this);
ImageView rlIcon2 = new ImageView(this);
ImageView rlIcon3 = new ImageView(this);
ImageView rlIcon4 = new ImageView(this);
//ImageView rlIcon6 = new ImageView(this);


rlIcon1.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_contact));
rlIcon2.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_currency_info));
rlIcon3.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_exhibition));
rlIcon4.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_faq));

Image


Solution

  • You can set LayoutParams in the SubactionButton.Builder

    SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(this);
    LayoutParams params=new LayoutParams(200,200);
    rLSubBuilder.setLayoutParams(params);