問題:我已經實現了FloatingActionButton
,我遵循了Androidhive的示例。但是,如果顯示SnackBar
,FloatingActionButton
不會向上移動。浮動動作按鈕不能上下移動
問題:如果FloatingActionButton
會出現SnackBar
會上下移動,我該如何實現?
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout android:id="@+id/maschineCoordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
<include
android:id="@+id/toolbar_main"
layout="@layout/toolbar"></include>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/maschinelistcontainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior = "@string/appbar_scrolling_view_behavior"
/>
<com.github.jorgecastilloprz.FABProgressCircle
android:id="@+id/fabProgressCircle_download_maschinen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_download_maschinen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:borderWidth="0dp"
app:elevation="@dimen/fab_elevation"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email" />
</com.github.jorgecastilloprz.FABProgressCircle>
</android.support.design.widget.CoordinatorLayout>
我加入您的建議我的代碼。不幸的是,按鈕仍然不想移動。 FABProgressCircle可能是這裏的問題嗎? – jublikon
你是否需要進步? – Ironman
是的,我需要進度指標。是否有可能實施移動行爲? – jublikon