error: cannot access AttachedBehavior
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: com.leinardi.android:speed-dial:1.0-alpha05
- Android version: 7.0
- Support library version: 26.1.0
- Device brand: Samsung
- Device model: S6
Step 3: Describe the problem:
Steps to reproduce:
- Add a
SpeedDialView
to your view as per the readme. - Add a corresponding SpeedDialView member to your activity class.
- Attempt to compile.
Observed Results:
During compilation, you will receive the following message, which occurs at the first reference to the member in the activity class (after definition):
error: cannot access AttachedBehavior
class file for android.support.design.widget.CoordinatorLayout$AttachedBehavior not found
Expected Results:
I’d have expected the app to compile as normal. It’s not clear to me what’s missing or what’s wrong.
So far I’ve found no reference to this particular error message or what might be causing it. I was previously not using a CoordinatorLayout
but adding one (and ensuring that the SpeedDialView
is a direct child of it) does not seem to have changed the compilation error (or gotten rid of it).
I have also tried with an without the app:layout_behavior
parameter.
Relevant Code:
...
<com.leinardi.android.speeddial.SpeedDialView
android:id="@+id/fab_actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
app:srcCompat="@drawable/ic_add_white_24dp"
app:layout_behavior="@string/speeddial_scrolling_view_snackbar_behavior"
/>
</android.support.design.widget.CoordinatorLayout>
and:
@BindView(R.id.fab_actions) SpeedDialView fab_actions;
(I’m using ButterKnife to do the binding)
fab_actions.setEnabled(view != null);
(this is where the error appears)
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
Thanks for the additional info.
You can control the width of the label and, consequently, where the text will be truncated, overriding the dimen
sd_label_max_width
: https://github.com/leinardi/FloatingActionButtonSpeedDial#how-can-i-change-the-maximum-length-of-the-label You can change the label text size overriding the styleSpeedDial.FabLabelStyle
: https://github.com/leinardi/FloatingActionButtonSpeedDial/blob/1fab81cfb5076ac9e7809296f6c2616544b06491/library/src/main/res/values/styles.xml#L34Let me know if you manage to put a sample project together 😃
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.