leinardi/FloatingActionButtonSpeedDial

Menu Item Focus Color

Open

#133 opened on Sep 11, 2019

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Java (1,418 stars) (137 forks)batch import
Status: StaleType: Enhancementhelp wanted

Description

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the library.

Step 2: Describe your environment

  • Library version: 3.1.0
  • Android version: 8.0.0 (Oreo)
  • Support library version: ?
  • Device brand: Sony
  • Device model: BRAVIA 4K GB ATV3

Step 3: Describe the problem:

The SpeedDialActionItems are not highlighted when the focus is on them. With the normal FAB this is the case and I need that for the menu as well. Especially on an AndroidTV

Steps to reproduce:

  1. Grab an AndroidTV and create a sample app with this lib
  2. click on the main fab
  3. then request focus on a menu item or navigate on it

Observed Results:

Default Main FAB Focused Main FAB Focused Main FAB and Menu Visisble Focused Menu FAB

Expected Results:

Highlighted Menu FAB on focus request

Relevant Code:

menuItems.add(new SpeedDialActionItem.Builder(downloadID, R.drawable.ic_cloud_download_white_24dp)
                .setFabImageTintColor(Color.WHITE)
                .create());
        menuItems.add(new SpeedDialActionItem.Builder(uploadID, R.drawable.ic_cloud_upload_white_24dp)
                .setFabImageTintColor(Color.WHITE)
                .create());
        speedDialView.addAllActionItems(menuItems);
<com.leinardi.android.speeddial.SpeedDialView
                        android:id="@+id/speedDial"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom|end"
                        android:layout_margin="8dp"
                        app:sdMainFabOpenedSrc="@drawable/ic_close_white_24dp"
                        app:sdMainFabClosedSrc="@drawable/ic_cloud_white_24dp"
                        app:sdExpansionMode="top"
                        app:sdMainFabClosedBackgroundColor="@color/primaryColor"
                        app:sdMainFabOpenedBackgroundColor="@color/primaryColor"
                        app:sdMainFabClosedIconColor="@android:color/white"
                        app:sdMainFabOpenedIconColor="@android:color/white" />

Contributor guide