增加浮动子操作按钮的大小

时间:2015-11-02 19:00:05

标签: android floating-action-button action-button

使用CircularFloatingActionMenu库,我已成功实现此库,但我想增加4子操作按钮的大小

请在下面找到使用

的代码
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

2 个答案:

答案 0 :(得分:6)

您可以在LayoutParams

中设置SubactionButton.Builder
SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(this);
LayoutParams params=new LayoutParams(200,200);
rLSubBuilder.setLayoutParams(params);

答案 1 :(得分:1)

enter image description here

LayoutParams params=new LayoutParams(80,80);
button1.setLayoutParams(params)

了解更多参考资料circular floating action menu