Show Floating action button to request manage credentials

Background
* This is part of the work to support
  a credential management app on
  unmanaged devices.
Changes
* Show FAB for detailed/long manage credentials
  authentication policy.
* Hide FAB for short manage credentials
  authentication policy.
* Unexpand FAB once the user start starts
  scrolling.
* Hide FAB once the user has scrolled to
  the bottom.

Manual Testing
* Verify FAB is shown for a detailed/long policy:
  https://screenshot.googleplex.com/BUb4LGz3GD6AozS
* Verify FAB is hidden for a short policy
* Verify FAB is hidden when user has scrolled to the
  bottom:
  https://screenshot.googleplex.com/6FQRqto3r3jzfXH
* Verify FAB is unexpanded (text hidden)
  when the users start scrolling:
  https://screenshot.googleplex.com/4FfAt5MsCfrAwQK

Bug: 165641221
Test: Manual Testing
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.security.RequestManageCredentialsTest
Change-Id: Ied2ef726ad4dcc3f92c20249f80294f0a3071a8a
This commit is contained in:
Alex Johnston
2020-12-01 20:36:38 +00:00
parent 580b7af1a4
commit a12b402f36
4 changed files with 65 additions and 0 deletions

View File

@@ -59,4 +59,17 @@
</RelativeLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/extended_fab"
style="@style/RequestManageCredentialsFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/request_manage_credentials_more"
app:layout_anchor="@id/apps_list"
app:layout_anchorGravity="bottom|center"
app:elevation="3dp"
app:icon="@drawable/ic_arrow_downward"
app:iconTint="?android:attr/colorAccent"
app:backgroundTint="?android:attr/colorPrimary"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>