Skip to content

Stack overflow and fabImageResource not working. #168

@fei0316

Description

@fei0316

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.2.0
  • Android version: 10
  • Support library version: com.google.android.material:material:1.3.0
  • Device brand: OnePlus
  • Device model: 7 Pro
    (Also tested not working on a Xiaomi device)

Step 3: Describe the problem:

Steps to reproduce:

  1. setContentDescription on SpeedDialView
  2. use new SpeedDialActionItem.Builder() as before (unchanged)
  3. Run app and it crashes due to stack overflow by setContentDescription calling itself too many times
  4. Removing the setContentDescription line works, but the icons on the FAB are missing

Relevant Code:

        SpeedDialView speedDialView = findViewById(R.id.speedDial1);
        speedDialView.setContentDescription(getString(R.string.menu_fab_description));
        speedDialView.addActionItem(
                new SpeedDialActionItem
                        .Builder(R.id.fab_justnow, R.drawable.ic_done_black_24dp)
                        .setFabBackgroundColor(getResources().getColor(R.color.colorAccent))
                        .setContentDescription(R.string.menu_justnow)
                        .setLabel(R.string.menu_justnow)
                        .create());
    java.lang.StackOverflowError: stack size 8192KB
        at com.leinardi.android.speeddial.SpeedDialView.setContentDescription(SpeedDialView.java:240)
        at com.leinardi.android.speeddial.SpeedDialView.setContentDescription(SpeedDialView.java:242)
        at com.leinardi.android.speeddial.SpeedDialView.setContentDescription(SpeedDialView.java:242)
        at com.leinardi.android.speeddial.SpeedDialView.setContentDescription(SpeedDialView.java:242)
        ...

Screenshot_20210523-231632

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions