Grey square shown on focused FAB on API 22
See original GitHub issueStep 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.2.0
- Android version:
5.1.1
- Support library version:
1.3.0
(androidx appcompat) - Device brand:
Nexus 6 Emulator
(tried on one other device) - Device model:
Nexus 6 Emulator
Step 3: Describe the problem:
Steps to reproduce:
Open speed dial in basic app on API 22
Observed Results:
A grey square is visible overlaid on top of the first fab menu item (and on the main fab when opening, and any fab when focused or tapped)
Expected Results:
Look the same as e.g. API 23, with no squares
Relevant Code:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
SpeedDialView speedDialView = findViewById(R.id.speedDial);
speedDialView.addActionItem(new SpeedDialActionItem.Builder(R.id.first, getDrawable(R.drawable.ic_launcher_background)).create());
speedDialView.addActionItem(new SpeedDialActionItem.Builder(R.id.second, getDrawable(R.drawable.ic_launcher_background)).create());
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.leinardi.android.speeddial.SpeedDialView
android:id="@+id/speedDial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:sdMainFabClosedSrc="@android:drawable/btn_plus" />
</androidx.constraintlayout.widget.ConstraintLayout>
As a side note, I noticed this while trying to debug why the first FAB item was focused after updating to 3.2.0 before realizing that this was intentional: https://github.com/leinardi/FloatingActionButtonSpeedDial/issues/149 I understand the value of having the first button focused, but the difference in color looks inconsistent. Is it possible to turn off the color change for the focus state? I don’t see an easy way to manually specify the selector.
API 22:
API 23:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Android changing Floating Action Button color - Stack Overflow
Since we often focus on changing View 's color in normal and pressed state ... Below API 21(Lollipop), there is no ripple effect...
Read more >FAB Appears as a square on API 16 [37048319] - Issue Tracker
Version used:22.2.0. The FAB appears as a square, shown in am emulator running 4.1.2. 4.2 doesn't appear to have this issue. device-2015-05-29-084035.png.
Read more >EMDB < EMD-6234 - EMBL-EBI
EMD-6234 - Negative stain single particle electron microscopy of Marburg Virus Glycoproteins bound to antibodies from a human survivor.
Read more >Material Design Box Shadows - CodePen
Based on https://medium.com/@Florian/freebie-google-material-design-shadow-helper-2a0501295a2d...
Read more >BUILDING RESILIENT SUPPLY CHAINS, REVITALIZING ...
E.O. 14017 directed the government to focus initially on four key sets ... Pharmaceuticals and active pharmaceutical ingredients (APIs): The ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have opened an issue upstream, please consider giving it a 👍 for visibility: https://github.com/material-components/material-components-android/issues/2617
I’m opening an issue on the material component library, I can reproduce the issue with just this simple layout: