我的问题与this有关.
当我打开NavigationDrawer时,浮动按钮位于其顶部,但必须位于下方.
我尝试这样做:
@Override
public void onDrawerSlide(View drawerView,float slideOffset) {
Log.i(TAG," inner onDrawerSlide");
super.onDrawerSlide(drawerView,slideOffset);
fabButton.setAlpha(25);
float alpha = 0.2f;
AlphaAnimation alphaUp = new AlphaAnimation(alpha,alpha);
alphaUp.setFillAfter(true);
fabButton.startAnimation(alphaUp);
syncState();
}
和那样:
@Override
public void onDrawerSlide(View drawerView,float slideOffset) {
super.onDrawerClosed(view);
invalidateOptionsMenu();
fabButton.setAlpha(255);
syncState();
}
我的布局:
stemWindows="true"
android:orientation="vertical">