3
我需要能夠將FAB的app:layout_anchorGravity="center"
從代碼中的「center」更改爲「bottom | start」。 我發現這個例子:動態設置FAB錨重力
CoordinatorLayout.LayoutParams p = (CoordinatorLayout.LayoutParams) fab.getLayoutParams();
p.setAnchorId(xxxx);
fab.setLayoutParams(p);
但它的設置錨,而不是錨重力。