增加浮动子操作按钮的大小
Increasing the size of a floating sub-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));
您可以在 SubactionButton.Builder
中设置 LayoutParams
SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(this);
LayoutParams params=new LayoutParams(200,200);
rLSubBuilder.setLayoutParams(params);
LayoutParams params=new LayoutParams(80,80);
button1.setLayoutParams(params)
更多参考[循环浮动操作菜单][2]
我正在使用 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));
您可以在 SubactionButton.Builder
LayoutParams
SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(this);
LayoutParams params=new LayoutParams(200,200);
rLSubBuilder.setLayoutParams(params);
LayoutParams params=new LayoutParams(80,80);
button1.setLayoutParams(params)
更多参考[循环浮动操作菜单][2]